Mekanism-tilera-Edition/src/main/java/mekanism/common/CommonProxy.java

578 lines
29 KiB
Java
Raw Normal View History

package mekanism.common;
import java.io.File;
import mekanism.api.Coord4D;
import mekanism.api.MekanismAPI;
import mekanism.api.MekanismConfig.general;
import mekanism.api.MekanismConfig.machines;
import mekanism.api.MekanismConfig.usage;
2014-09-14 06:20:16 +02:00
import mekanism.api.Pos3D;
2015-02-27 18:33:01 +01:00
import mekanism.api.util.UnitDisplayUtils.EnergyType;
import mekanism.api.util.UnitDisplayUtils.TempType;
import mekanism.client.ThreadSparkle.INodeChecker;
import mekanism.common.base.IUpgradeTile;
2014-09-03 19:25:06 +02:00
import mekanism.common.block.BlockMachine.MachineType;
import mekanism.common.entity.EntityRobit;
import mekanism.common.inventory.container.ContainerAdvancedElectricMachine;
import mekanism.common.inventory.container.ContainerChanceMachine;
import mekanism.common.inventory.container.ContainerChemicalCrystallizer;
import mekanism.common.inventory.container.ContainerChemicalDissolutionChamber;
import mekanism.common.inventory.container.ContainerChemicalInfuser;
import mekanism.common.inventory.container.ContainerChemicalOxidizer;
import mekanism.common.inventory.container.ContainerChemicalWasher;
import mekanism.common.inventory.container.ContainerDictionary;
import mekanism.common.inventory.container.ContainerDigitalMiner;
import mekanism.common.inventory.container.ContainerDynamicTank;
import mekanism.common.inventory.container.ContainerElectricMachine;
import mekanism.common.inventory.container.ContainerElectricPump;
import mekanism.common.inventory.container.ContainerElectrolyticSeparator;
import mekanism.common.inventory.container.ContainerEnergyCube;
import mekanism.common.inventory.container.ContainerFactory;
import mekanism.common.inventory.container.ContainerFilter;
2014-06-19 12:42:59 +02:00
import mekanism.common.inventory.container.ContainerFluidicPlenisher;
import mekanism.common.inventory.container.ContainerGasTank;
2015-03-03 19:16:58 +01:00
import mekanism.common.inventory.container.ContainerInductionMatrix;
import mekanism.common.inventory.container.ContainerLaserAmplifier;
import mekanism.common.inventory.container.ContainerLaserTractorBeam;
import mekanism.common.inventory.container.ContainerMetallurgicInfuser;
import mekanism.common.inventory.container.ContainerNull;
2015-03-13 15:14:57 +01:00
import mekanism.common.inventory.container.ContainerOredictionificator;
2014-04-06 02:16:09 +02:00
import mekanism.common.inventory.container.ContainerPRC;
import mekanism.common.inventory.container.ContainerPortableTank;
import mekanism.common.inventory.container.ContainerRobitCrafting;
import mekanism.common.inventory.container.ContainerRobitInventory;
import mekanism.common.inventory.container.ContainerRobitMain;
import mekanism.common.inventory.container.ContainerRobitRepair;
import mekanism.common.inventory.container.ContainerRobitSmelting;
import mekanism.common.inventory.container.ContainerRotaryCondensentrator;
2014-03-16 01:05:26 +01:00
import mekanism.common.inventory.container.ContainerSeismicVibrator;
import mekanism.common.inventory.container.ContainerSolarEvaporationController;
import mekanism.common.inventory.container.ContainerSolarNeutronActivator;
import mekanism.common.inventory.container.ContainerTeleporter;
import mekanism.common.inventory.container.ContainerUpgradeManagement;
import mekanism.common.network.PacketPortableTeleporter.PortableTeleporterMessage;
import mekanism.common.tile.TileEntityAdvancedElectricMachine;
import mekanism.common.tile.TileEntityAdvancedFactory;
import mekanism.common.tile.TileEntityAmbientAccumulator;
import mekanism.common.tile.TileEntityBin;
import mekanism.common.tile.TileEntityChanceMachine;
import mekanism.common.tile.TileEntityChargepad;
import mekanism.common.tile.TileEntityChemicalCrystallizer;
2014-01-26 23:12:03 +01:00
import mekanism.common.tile.TileEntityChemicalDissolutionChamber;
import mekanism.common.tile.TileEntityChemicalInfuser;
import mekanism.common.tile.TileEntityChemicalInjectionChamber;
import mekanism.common.tile.TileEntityChemicalOxidizer;
2014-01-26 23:12:03 +01:00
import mekanism.common.tile.TileEntityChemicalWasher;
import mekanism.common.tile.TileEntityCombiner;
import mekanism.common.tile.TileEntityContainerBlock;
import mekanism.common.tile.TileEntityCrusher;
import mekanism.common.tile.TileEntityDigitalMiner;
import mekanism.common.tile.TileEntityDynamicTank;
import mekanism.common.tile.TileEntityDynamicValve;
import mekanism.common.tile.TileEntityElectricChest;
import mekanism.common.tile.TileEntityElectricMachine;
import mekanism.common.tile.TileEntityElectricPump;
import mekanism.common.tile.TileEntityElectrolyticSeparator;
import mekanism.common.tile.TileEntityEliteFactory;
import mekanism.common.tile.TileEntityEnergizedSmelter;
import mekanism.common.tile.TileEntityEnergyCube;
import mekanism.common.tile.TileEntityEnrichmentChamber;
import mekanism.common.tile.TileEntityFactory;
2014-06-19 12:42:59 +02:00
import mekanism.common.tile.TileEntityFluidicPlenisher;
import mekanism.common.tile.TileEntityGasTank;
2015-03-03 05:05:54 +01:00
import mekanism.common.tile.TileEntityInductionCasing;
import mekanism.common.tile.TileEntityInductionCell;
2015-03-03 05:05:54 +01:00
import mekanism.common.tile.TileEntityInductionPort;
import mekanism.common.tile.TileEntityInductionProvider;
2014-07-15 01:13:20 +02:00
import mekanism.common.tile.TileEntityLaser;
import mekanism.common.tile.TileEntityLaserAmplifier;
import mekanism.common.tile.TileEntityLaserTractorBeam;
import mekanism.common.tile.TileEntityLogisticalSorter;
import mekanism.common.tile.TileEntityMetallurgicInfuser;
import mekanism.common.tile.TileEntityMultiblock;
import mekanism.common.tile.TileEntityObsidianTNT;
2015-03-13 15:14:57 +01:00
import mekanism.common.tile.TileEntityOredictionificator;
import mekanism.common.tile.TileEntityOsmiumCompressor;
2014-04-06 02:16:09 +02:00
import mekanism.common.tile.TileEntityPRC;
2014-06-18 03:01:23 +02:00
import mekanism.common.tile.TileEntityPortableTank;
import mekanism.common.tile.TileEntityPrecisionSawmill;
import mekanism.common.tile.TileEntityPurificationChamber;
import mekanism.common.tile.TileEntityRotaryCondensentrator;
2014-03-16 01:05:26 +01:00
import mekanism.common.tile.TileEntitySeismicVibrator;
import mekanism.common.tile.TileEntitySolarEvaporationController;
import mekanism.common.tile.TileEntitySolarNeutronActivator;
import mekanism.common.tile.TileEntityTeleporter;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.inventory.Container;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
import cpw.mods.fml.common.registry.GameRegistry;
2014-01-12 17:46:25 +01:00
import cpw.mods.fml.relauncher.FMLInjectionData;
/**
* Common proxy for the Mekanism mod.
* @author AidanBrady
*
*/
public class CommonProxy
{
public static int MACHINE_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
public static int BASIC_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
public static int PLASTIC_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
public static int CTM_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
/**
* Register tile entities that have special models. Overwritten in client to register TESRs.
*/
public void registerSpecialTileEntities()
{
GameRegistry.registerTileEntity(TileEntityEnrichmentChamber.class, "EnrichmentChamber");
GameRegistry.registerTileEntity(TileEntityOsmiumCompressor.class, "OsmiumCompressor");
GameRegistry.registerTileEntity(TileEntityCombiner.class, "Combiner");
GameRegistry.registerTileEntity(TileEntityCrusher.class, "Crusher");
GameRegistry.registerTileEntity(TileEntityFactory.class, "SmeltingFactory");
GameRegistry.registerTileEntity(TileEntityAdvancedFactory.class, "AdvancedSmeltingFactory");
GameRegistry.registerTileEntity(TileEntityEliteFactory.class, "UltimateSmeltingFactory");
GameRegistry.registerTileEntity(TileEntityPurificationChamber.class, "PurificationChamber");
GameRegistry.registerTileEntity(TileEntityEnergizedSmelter.class, "EnergizedSmelter");
GameRegistry.registerTileEntity(TileEntityMetallurgicInfuser.class, "MetallurgicInfuser");
2013-11-03 17:38:36 +01:00
GameRegistry.registerTileEntity(TileEntityGasTank.class, "GasTank");
GameRegistry.registerTileEntity(TileEntityEnergyCube.class, "EnergyCube");
GameRegistry.registerTileEntity(TileEntityElectricPump.class, "ElectricPump");
GameRegistry.registerTileEntity(TileEntityElectricChest.class, "ElectricChest");
GameRegistry.registerTileEntity(TileEntityDynamicTank.class, "DynamicTank");
GameRegistry.registerTileEntity(TileEntityDynamicValve.class, "DynamicValve");
GameRegistry.registerTileEntity(TileEntityChargepad.class, "Chargepad");
GameRegistry.registerTileEntity(TileEntityLogisticalSorter.class, "LogisticalSorter");
2013-11-12 01:27:36 +01:00
GameRegistry.registerTileEntity(TileEntityBin.class, "Bin");
GameRegistry.registerTileEntity(TileEntityDigitalMiner.class, "DigitalMiner");
2013-11-24 15:27:52 +01:00
GameRegistry.registerTileEntity(TileEntityObsidianTNT.class, "ObsidianTNT");
GameRegistry.registerTileEntity(TileEntityRotaryCondensentrator.class, "RotaryCondensentrator");
2013-12-08 18:39:26 +01:00
GameRegistry.registerTileEntity(TileEntityTeleporter.class, "MekanismTeleporter");
GameRegistry.registerTileEntity(TileEntityChemicalOxidizer.class, "ChemicalOxidizer");
GameRegistry.registerTileEntity(TileEntityChemicalInfuser.class, "ChemicalInfuser");
GameRegistry.registerTileEntity(TileEntityChemicalInjectionChamber.class, "ChemicalInjectionChamber");
GameRegistry.registerTileEntity(TileEntityElectrolyticSeparator.class, "ElectrolyticSeparator");
GameRegistry.registerTileEntity(TileEntitySolarEvaporationController.class, "SalinationController");
GameRegistry.registerTileEntity(TileEntityPrecisionSawmill.class, "PrecisionSawmill");
2014-01-26 23:12:03 +01:00
GameRegistry.registerTileEntity(TileEntityChemicalDissolutionChamber.class, "ChemicalDissolutionChamber");
GameRegistry.registerTileEntity(TileEntityChemicalWasher.class, "ChemicalWasher");
GameRegistry.registerTileEntity(TileEntityChemicalCrystallizer.class, "ChemicalCrystallizer");
2014-06-16 01:50:40 +02:00
GameRegistry.registerTileEntity(TileEntitySeismicVibrator.class, "SeismicVibrator");
GameRegistry.registerTileEntity(TileEntityPRC.class, "PressurizedReactionChamber");
2014-06-18 03:01:23 +02:00
GameRegistry.registerTileEntity(TileEntityPortableTank.class, "PortableTank");
2014-06-19 12:42:59 +02:00
GameRegistry.registerTileEntity(TileEntityFluidicPlenisher.class, "FluidicPlenisher");
2014-07-15 01:13:20 +02:00
GameRegistry.registerTileEntity(TileEntityLaser.class, "Laser");
GameRegistry.registerTileEntity(TileEntityLaserAmplifier.class, "LaserAmplifier");
GameRegistry.registerTileEntity(TileEntityLaserTractorBeam.class, "LaserTractorBeam");
GameRegistry.registerTileEntity(TileEntitySolarNeutronActivator.class, "SolarNeutronActivator");
GameRegistry.registerTileEntity(TileEntityAmbientAccumulator.class, "AmbientAccumulator");
2015-03-03 05:05:54 +01:00
GameRegistry.registerTileEntity(TileEntityInductionCasing.class, "InductionCasing");
GameRegistry.registerTileEntity(TileEntityInductionPort.class, "InductionPort");
GameRegistry.registerTileEntity(TileEntityInductionCell.class, "InductionCell");
GameRegistry.registerTileEntity(TileEntityInductionProvider.class, "InductionProvider");
2015-03-13 15:14:57 +01:00
GameRegistry.registerTileEntity(TileEntityOredictionificator.class, "Oredictionificator");
}
public void handleTeleporterUpdate(PortableTeleporterMessage message) {}
2013-04-13 03:32:43 +02:00
/**
* Handles an ELECTRIC_CHEST_CLIENT_OPEN packet via the proxy, not handled on the server-side.
* @param entityplayer - player the packet was sent from
* @param id - the electric chest gui ID to open
* @param windowId - the container-specific window ID
* @param isBlock - if the chest is a block
* @param x - x coordinate
* @param y - y coordinate
* @param z - z coordinate
*/
public void openElectricChest(EntityPlayer entityplayer, int id, int windowId, boolean isBlock, int x, int y, int z) {}
/**
* Register and load client-only render information.
*/
public void registerRenderInformation() {}
/**
* Gets the armor index number from ClientProxy.
* @param string - armor indicator
* @return armor index number
*/
public int getArmorIndex(String string)
{
return 0;
}
/**
* Set and load the mod's common configuration properties.
*/
public void loadConfiguration()
{
general.updateNotifications = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "UpdateNotifications", true).getBoolean(true);
general.controlCircuitOreDict = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ControlCircuitOreDict", true).getBoolean(true);
general.logPackets = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "LogPackets", false).getBoolean(false);
general.dynamicTankEasterEgg = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "DynamicTankEasterEgg", false).getBoolean(false);
general.voiceServerEnabled = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "VoiceServerEnabled", true).getBoolean(true);
general.cardboardSpawners = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "AllowSpawnerBoxPickup", true).getBoolean(true);
general.enableWorldRegeneration = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnableWorldRegeneration", false).getBoolean(false);
general.creativeOverrideElectricChest = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "CreativeOverrideElectricChest", true).getBoolean(true);
general.spawnBabySkeletons = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "SpawnBabySkeletons", true).getBoolean(true);
general.obsidianTNTDelay = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ObsidianTNTDelay", 100).getInt();
general.obsidianTNTBlastRadius = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ObsidianTNTBlastRadius", 12).getInt();
general.UPDATE_DELAY = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ClientUpdateDelay", 10).getInt();
general.osmiumPerChunk = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "OsmiumPerChunk", 12).getInt();
general.copperPerChunk = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "CopperPerChunk", 16).getInt();
general.tinPerChunk = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "TinPerChunk", 14).getInt();
general.saltPerChunk = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "SaltPerChunk", 2).getInt();
general.userWorldGenVersion = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "WorldRegenVersion", 0).getInt();
general.FROM_IC2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "JoulesToEU", 10D).getDouble(10D);
general.TO_IC2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EUToJoules", .1D).getDouble(.1D);
Update lots of APIs, most notably BC and an actual 1.7 version of CC Conflicts: build.properties src/api/java/buildcraft/api/core/BlockIndex.java src/api/java/buildcraft/api/core/BuildCraftAPI.java src/api/java/buildcraft/api/fuels/IFuel.java src/api/java/buildcraft/api/mj/BatteryObject.java src/api/java/buildcraft/api/mj/IBatteryIOObject.java src/api/java/buildcraft/api/mj/IBatteryObject.java src/api/java/buildcraft/api/mj/IOMode.java src/api/java/buildcraft/api/mj/MjAPI.java src/api/java/buildcraft/api/mj/MjBattery.java src/api/java/buildcraft/api/power/PowerHandler.java src/api/java/buildcraft/api/recipes/CraftingResult.java src/api/java/buildcraft/api/recipes/IAssemblyRecipeManager.java src/api/java/buildcraft/api/recipes/IFlexibleRecipe.java src/api/java/buildcraft/api/recipes/IRefineryRecipeManager.java src/api/java/buildcraft/api/transport/IPipe.java src/main/java/mekanism/common/CommonProxy.java src/main/java/mekanism/common/EnergyNetwork.java src/main/java/mekanism/common/FuelHandler.java src/main/java/mekanism/common/Mekanism.java src/main/java/mekanism/common/base/IAdvancedBoundingBlock.java src/main/java/mekanism/common/multipart/MultipartMekanism.java src/main/java/mekanism/common/multipart/PartLogisticalTransporter.java src/main/java/mekanism/common/multipart/PartUniversalCable.java src/main/java/mekanism/common/network/PacketConfigSync.java src/main/java/mekanism/common/tile/TileEntityAdvancedBoundingBlock.java src/main/java/mekanism/common/tile/TileEntityElectricBlock.java src/main/java/mekanism/common/util/CableUtils.java src/main/java/mekanism/common/util/MekanismUtils.java src/main/java/mekanism/common/util/TransporterUtils.java src/main/java/mekanism/generators/common/MekanismGenerators.java src/main/java/mekanism/generators/common/tile/TileEntityBioGenerator.java src/main/java/mekanism/generators/common/tile/TileEntityGasGenerator.java src/main/java/mekanism/generators/common/tile/TileEntityGenerator.java src/main/java/mekanism/generators/common/tile/TileEntityHeatGenerator.java src/main/java/mekanism/generators/common/tile/TileEntitySolarGenerator.java src/main/java/mekanism/generators/common/tile/TileEntityWindTurbine.java
2014-11-10 22:51:37 +01:00
general.FROM_TE = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "JoulesToRF", 2.5D).getDouble(2.5D);
general.TO_TE = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "RFToJoules", 0.4D).getDouble(0.4D);
general.FROM_H2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "HydrogenEnergyDensity", 200D, "Determines Electrolytic Separator usage").getDouble(200D);
general.ETHENE_BURN_TIME = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EthyleneBurnTime", 40).getInt(40);
general.ENERGY_PER_REDSTONE = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnergyPerRedstone", 10000D).getDouble(10000D);
general.DISASSEMBLER_USAGE = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "DisassemblerEnergyUsage", 10).getInt(10);
general.VOICE_PORT = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "VoicePort", 36123, null, 1, 65535).getInt();
//If this is less than 1, upgrades make machines worse. If less than 0, I don't even know.
general.maxUpgradeMultiplier = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "UpgradeModifier", 10, null, 1, Integer.MAX_VALUE).getInt();
general.minerSilkMultiplier = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "MinerSilkMultiplier", 6).getDouble();
general.blacklistIC2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistIC2Power", false).getBoolean();
general.blacklistRF = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistRFPower", false).getBoolean();
String s = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnergyType", "J", null, new String[]{"J", "RF", "MJ", "EU"}).getString();
if(s != null)
{
if(s.trim().equalsIgnoreCase("j") || s.trim().equalsIgnoreCase("joules"))
{
general.activeType = EnergyType.J;
}
else if(s.trim().equalsIgnoreCase("rf") || s.trim().equalsIgnoreCase("te") || s.trim().equalsIgnoreCase("thermal expansion"))
{
general.activeType = EnergyType.RF;
}
else if(s.trim().equalsIgnoreCase("eu") || s.trim().equalsIgnoreCase("ic2"))
{
general.activeType = EnergyType.EU;
}
else if(s.trim().equalsIgnoreCase("mj") || s.trim().equalsIgnoreCase("bc") || s.trim().equalsIgnoreCase("buildcraft"))
{
general.activeType = EnergyType.MJ;
}
}
s = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "Temperature Units", "K", null, new String[]{"K", "C", "R", "F"}).getString();
if(s != null)
{
if(s.trim().equalsIgnoreCase("k") || s.trim().equalsIgnoreCase("kelvin"))
{
general.tempUnit = TempType.K;
}
else if(s.trim().equalsIgnoreCase("c") || s.trim().equalsIgnoreCase("celsius") || s.trim().equalsIgnoreCase("centigrade"))
{
general.tempUnit = TempType.C;
}
else if(s.trim().equalsIgnoreCase("r") || s.trim().equalsIgnoreCase("rankine"))
{
general.tempUnit = TempType.R;
}
else if(s.trim().equalsIgnoreCase("f") || s.trim().equalsIgnoreCase("fahrenheit"))
{
general.tempUnit = TempType.F;
}
else if(s.trim().equalsIgnoreCase("a") || s.trim().equalsIgnoreCase("ambient") || s.trim().equalsIgnoreCase("stp"))
{
general.tempUnit = TempType.STP;
}
}
general.laserRange = Mekanism.configuration.get("general", "LaserRange", 64).getInt(64);
2014-09-15 00:04:09 +02:00
general.laserEnergyNeededPerHardness = Mekanism.configuration.get("general", "LaserDiggingEnergy", 100000).getInt(100000);
general.destroyDisabledBlocks = Mekanism.configuration.get("general", "DestroyDisabledBlocks", true).getBoolean(true);
general.enableAmbientLighting = Mekanism.configuration.get("general", "EnableAmbientLighting", true).getBoolean(true);
general.ambientLightingLevel = Mekanism.configuration.get("general", "AmbientLightingLevel", 15).getInt(15);
for(MachineType type : MachineType.getValidMachines())
{
machines.setEntry(type, Mekanism.configuration.get("machines", type.name + "Enabled", true).getBoolean(true));
}
usage.enrichmentChamberUsage = Mekanism.configuration.get("usage", "EnrichmentChamberUsage", 50D).getDouble(50D);
usage.osmiumCompressorUsage = Mekanism.configuration.get("usage", "OsmiumCompressorUsage", 100D).getDouble(100D);
usage.combinerUsage = Mekanism.configuration.get("usage", "CombinerUsage", 50D).getDouble(50D);
usage.crusherUsage = Mekanism.configuration.get("usage", "CrusherUsage", 50D).getDouble(50D);
usage.factoryUsage = Mekanism.configuration.get("usage", "FactoryUsage", 50D).getDouble(50D);
usage.metallurgicInfuserUsage = Mekanism.configuration.get("usage", "MetallurgicInfuserUsage", 50D).getDouble(50D);
usage.purificationChamberUsage = Mekanism.configuration.get("usage", "PurificationChamberUsage", 200D).getDouble(200D);
usage.energizedSmelterUsage = Mekanism.configuration.get("usage", "EnergizedSmelterUsage", 50D).getDouble(50D);
usage.digitalMinerUsage = Mekanism.configuration.get("usage", "DigitalMinerUsage", 100D).getDouble(100D);
usage.electricPumpUsage = Mekanism.configuration.get("usage", "ElectricPumpUsage", 100D).getDouble(100D);
usage.rotaryCondensentratorUsage = Mekanism.configuration.get("usage", "RotaryCondensentratorUsage", 50D).getDouble(50D);
usage.oxidationChamberUsage = Mekanism.configuration.get("usage", "OxidationChamberUsage", 200D).getDouble(200D);
usage.chemicalInfuserUsage = Mekanism.configuration.get("usage", "ChemicalInfuserUsage", 200D).getDouble(200D);
usage.chemicalInjectionChamberUsage = Mekanism.configuration.get("usage", "ChemicalInjectionChamberUsage", 400D).getDouble(400D);
usage.precisionSawmillUsage = Mekanism.configuration.get("usage", "PrecisionSawmillUsage", 50D).getDouble(50D);
usage.chemicalDissolutionChamberUsage = Mekanism.configuration.get("usage", "ChemicalDissolutionChamberUsage", 400D).getDouble(400D);
usage.chemicalWasherUsage = Mekanism.configuration.get("usage", "ChemicalWasherUsage", 200D).getDouble(200D);
usage.chemicalCrystallizerUsage = Mekanism.configuration.get("usage", "ChemicalCrystallizerUsage", 400D).getDouble(400D);
usage.seismicVibratorUsage = Mekanism.configuration.get("usage", "SeismicVibratorUsage", 50D).getDouble(50D);
usage.pressurizedReactionBaseUsage = Mekanism.configuration.get("usage", "PressurizedReactionBaseUsage", 5D).getDouble(5D);
usage.fluidicPlenisherUsage = Mekanism.configuration.get("usage", "FluidicPlenisherUsage", 100D).getDouble(100D);
2014-08-04 21:42:04 +02:00
usage.laserUsage = Mekanism.configuration.get("usage", "LaserUsage", 5000D).getDouble(5000D);
2014-12-19 03:23:42 +01:00
usage.gasCentrifugeUsage = Mekanism.configuration.get("usage", "GasCentrifugeUsage", 100D).getDouble(100D);
usage.heavyWaterElectrolysisUsage = Mekanism.configuration.get("usage", "HeavyWaterElectrolysisUsage", 800D).getDouble(800D);
if(Mekanism.configuration.hasChanged())
{
Mekanism.configuration.save();
}
}
/**
* Set up and load the utilities this mod uses.
*/
public void loadUtilities()
{
FMLCommonHandler.instance().bus().register(Mekanism.worldTickHandler);
}
/**
* Whether or not the game is paused.
*/
public boolean isPaused()
{
return false;
}
/**
* Adds block hit effects on the client side.
*/
public void addHitEffects(Coord4D coord, MovingObjectPosition mop) {}
/**
* Does a generic creation animation, starting from the rendering block.
*/
public void doGenericSparkle(TileEntity tileEntity, INodeChecker checker) {}
/**
* Does the multiblock creation animation, starting from the rendering block.
*/
public void doMultiblockSparkle(TileEntityMultiblock<?> tileEntity) {}
/**
v5 Beta #9 *Bumped animation textures to 32x32. *Added default parameter to TabProxy.tabMekanism(). *Added additional info to Machine/GeneratorType for better handling of metadata. *Added Reinforced Iron, a stronger version of an Iron Block. *Updated onBlockActivated() code to function correctly. *Added feature for a generator or power unit to be placed facing up or down. *Cleaned up GUI access/handler code. *Fixed electric machine shift-click bug. *Added Diamond Dust. *Fixed Energized Bow continuing to fire after it's energy is depleted. *Added HP information to armor and tools. *Fixed slot parameters. *Overhauled packet system. *Cleaned up tile entity hierarchy. *Added BuildCraft liquid support to Heat Generator to allow energy generation with both BuildCraft's fuel buckets and liquid fuel. *Fixed texture preloads. *Added Electolytic Separator -- a machine that separates hydrogen and oxygen molecules from water. It accepts water from BuildCraft pipes. *Added Hydrogen Generator -- a generator that by default generates 128 u/t, but has boosts by the block's height of up to 512 u/t. *Added Solar Generator, a generator that produces 32 u/t when it can see the sun. *Added Gas API! Simple gas management that allows for both storage of gas in items, blocks, and transfer between themselves. So far implemented gasses are oxygen and hydrogen. *Added LiquidSlot for easy management of liquid in tile entities. *Added Hydrogen Tank and Oxygen Tank items. *Added BuildCraft hooks. *Fixed zombies and skeletons spawning with Obsidian Armor, and lowered chances of spawning with any armor. *More OreDictionary registrations to fix IC2's different dust names. *Fixed some javadocs. *Added 'Solar Panel' item as a crafting element for a Solar Generator. *Minor bugfixes.
2012-11-15 21:04:12 +01:00
* Get the actual interface for a GUI. Client-only.
* @param ID - gui ID
* @param player - player that opened the GUI
* @param world - world the GUI was opened in
* @param x - gui's x position
* @param y - gui's y position
* @param z - gui's z position
v5 Beta #9 *Bumped animation textures to 32x32. *Added default parameter to TabProxy.tabMekanism(). *Added additional info to Machine/GeneratorType for better handling of metadata. *Added Reinforced Iron, a stronger version of an Iron Block. *Updated onBlockActivated() code to function correctly. *Added feature for a generator or power unit to be placed facing up or down. *Cleaned up GUI access/handler code. *Fixed electric machine shift-click bug. *Added Diamond Dust. *Fixed Energized Bow continuing to fire after it's energy is depleted. *Added HP information to armor and tools. *Fixed slot parameters. *Overhauled packet system. *Cleaned up tile entity hierarchy. *Added BuildCraft liquid support to Heat Generator to allow energy generation with both BuildCraft's fuel buckets and liquid fuel. *Fixed texture preloads. *Added Electolytic Separator -- a machine that separates hydrogen and oxygen molecules from water. It accepts water from BuildCraft pipes. *Added Hydrogen Generator -- a generator that by default generates 128 u/t, but has boosts by the block's height of up to 512 u/t. *Added Solar Generator, a generator that produces 32 u/t when it can see the sun. *Added Gas API! Simple gas management that allows for both storage of gas in items, blocks, and transfer between themselves. So far implemented gasses are oxygen and hydrogen. *Added LiquidSlot for easy management of liquid in tile entities. *Added Hydrogen Tank and Oxygen Tank items. *Added BuildCraft hooks. *Fixed zombies and skeletons spawning with Obsidian Armor, and lowered chances of spawning with any armor. *More OreDictionary registrations to fix IC2's different dust names. *Fixed some javadocs. *Added 'Solar Panel' item as a crafting element for a Solar Generator. *Minor bugfixes.
2012-11-15 21:04:12 +01:00
* @return the GuiScreen of the GUI
*/
public Object getClientGui(int ID, EntityPlayer player, World world, int x, int y, int z)
{
return null;
}
/**
v5 Beta #9 *Bumped animation textures to 32x32. *Added default parameter to TabProxy.tabMekanism(). *Added additional info to Machine/GeneratorType for better handling of metadata. *Added Reinforced Iron, a stronger version of an Iron Block. *Updated onBlockActivated() code to function correctly. *Added feature for a generator or power unit to be placed facing up or down. *Cleaned up GUI access/handler code. *Fixed electric machine shift-click bug. *Added Diamond Dust. *Fixed Energized Bow continuing to fire after it's energy is depleted. *Added HP information to armor and tools. *Fixed slot parameters. *Overhauled packet system. *Cleaned up tile entity hierarchy. *Added BuildCraft liquid support to Heat Generator to allow energy generation with both BuildCraft's fuel buckets and liquid fuel. *Fixed texture preloads. *Added Electolytic Separator -- a machine that separates hydrogen and oxygen molecules from water. It accepts water from BuildCraft pipes. *Added Hydrogen Generator -- a generator that by default generates 128 u/t, but has boosts by the block's height of up to 512 u/t. *Added Solar Generator, a generator that produces 32 u/t when it can see the sun. *Added Gas API! Simple gas management that allows for both storage of gas in items, blocks, and transfer between themselves. So far implemented gasses are oxygen and hydrogen. *Added LiquidSlot for easy management of liquid in tile entities. *Added Hydrogen Tank and Oxygen Tank items. *Added BuildCraft hooks. *Fixed zombies and skeletons spawning with Obsidian Armor, and lowered chances of spawning with any armor. *More OreDictionary registrations to fix IC2's different dust names. *Fixed some javadocs. *Added 'Solar Panel' item as a crafting element for a Solar Generator. *Minor bugfixes.
2012-11-15 21:04:12 +01:00
* Get the container for a GUI. Common.
* @param ID - gui ID
* @param player - player that opened the GUI
* @param world - world the GUI was opened in
* @param x - gui's x position
* @param y - gui's y position
* @param z - gui's z position
v5 Beta #9 *Bumped animation textures to 32x32. *Added default parameter to TabProxy.tabMekanism(). *Added additional info to Machine/GeneratorType for better handling of metadata. *Added Reinforced Iron, a stronger version of an Iron Block. *Updated onBlockActivated() code to function correctly. *Added feature for a generator or power unit to be placed facing up or down. *Cleaned up GUI access/handler code. *Fixed electric machine shift-click bug. *Added Diamond Dust. *Fixed Energized Bow continuing to fire after it's energy is depleted. *Added HP information to armor and tools. *Fixed slot parameters. *Overhauled packet system. *Cleaned up tile entity hierarchy. *Added BuildCraft liquid support to Heat Generator to allow energy generation with both BuildCraft's fuel buckets and liquid fuel. *Fixed texture preloads. *Added Electolytic Separator -- a machine that separates hydrogen and oxygen molecules from water. It accepts water from BuildCraft pipes. *Added Hydrogen Generator -- a generator that by default generates 128 u/t, but has boosts by the block's height of up to 512 u/t. *Added Solar Generator, a generator that produces 32 u/t when it can see the sun. *Added Gas API! Simple gas management that allows for both storage of gas in items, blocks, and transfer between themselves. So far implemented gasses are oxygen and hydrogen. *Added LiquidSlot for easy management of liquid in tile entities. *Added Hydrogen Tank and Oxygen Tank items. *Added BuildCraft hooks. *Fixed zombies and skeletons spawning with Obsidian Armor, and lowered chances of spawning with any armor. *More OreDictionary registrations to fix IC2's different dust names. *Fixed some javadocs. *Added 'Solar Panel' item as a crafting element for a Solar Generator. *Minor bugfixes.
2012-11-15 21:04:12 +01:00
* @return the Container of the GUI
*/
public Container getServerGui(int ID, EntityPlayer player, World world, int x, int y, int z)
{
TileEntity tileEntity = world.getTileEntity(x, y, z);
switch(ID)
{
2013-12-10 02:52:49 +01:00
case 0:
return new ContainerDictionary(player.inventory);
case 2:
2013-11-20 00:16:26 +01:00
return new ContainerDigitalMiner(player.inventory, (TileEntityDigitalMiner)tileEntity);
case 3:
v5 Beta #9 *Bumped animation textures to 32x32. *Added default parameter to TabProxy.tabMekanism(). *Added additional info to Machine/GeneratorType for better handling of metadata. *Added Reinforced Iron, a stronger version of an Iron Block. *Updated onBlockActivated() code to function correctly. *Added feature for a generator or power unit to be placed facing up or down. *Cleaned up GUI access/handler code. *Fixed electric machine shift-click bug. *Added Diamond Dust. *Fixed Energized Bow continuing to fire after it's energy is depleted. *Added HP information to armor and tools. *Fixed slot parameters. *Overhauled packet system. *Cleaned up tile entity hierarchy. *Added BuildCraft liquid support to Heat Generator to allow energy generation with both BuildCraft's fuel buckets and liquid fuel. *Fixed texture preloads. *Added Electolytic Separator -- a machine that separates hydrogen and oxygen molecules from water. It accepts water from BuildCraft pipes. *Added Hydrogen Generator -- a generator that by default generates 128 u/t, but has boosts by the block's height of up to 512 u/t. *Added Solar Generator, a generator that produces 32 u/t when it can see the sun. *Added Gas API! Simple gas management that allows for both storage of gas in items, blocks, and transfer between themselves. So far implemented gasses are oxygen and hydrogen. *Added LiquidSlot for easy management of liquid in tile entities. *Added Hydrogen Tank and Oxygen Tank items. *Added BuildCraft hooks. *Fixed zombies and skeletons spawning with Obsidian Armor, and lowered chances of spawning with any armor. *More OreDictionary registrations to fix IC2's different dust names. *Fixed some javadocs. *Added 'Solar Panel' item as a crafting element for a Solar Generator. *Minor bugfixes.
2012-11-15 21:04:12 +01:00
return new ContainerElectricMachine(player.inventory, (TileEntityElectricMachine)tileEntity);
case 4:
v5 Beta #9 *Bumped animation textures to 32x32. *Added default parameter to TabProxy.tabMekanism(). *Added additional info to Machine/GeneratorType for better handling of metadata. *Added Reinforced Iron, a stronger version of an Iron Block. *Updated onBlockActivated() code to function correctly. *Added feature for a generator or power unit to be placed facing up or down. *Cleaned up GUI access/handler code. *Fixed electric machine shift-click bug. *Added Diamond Dust. *Fixed Energized Bow continuing to fire after it's energy is depleted. *Added HP information to armor and tools. *Fixed slot parameters. *Overhauled packet system. *Cleaned up tile entity hierarchy. *Added BuildCraft liquid support to Heat Generator to allow energy generation with both BuildCraft's fuel buckets and liquid fuel. *Fixed texture preloads. *Added Electolytic Separator -- a machine that separates hydrogen and oxygen molecules from water. It accepts water from BuildCraft pipes. *Added Hydrogen Generator -- a generator that by default generates 128 u/t, but has boosts by the block's height of up to 512 u/t. *Added Solar Generator, a generator that produces 32 u/t when it can see the sun. *Added Gas API! Simple gas management that allows for both storage of gas in items, blocks, and transfer between themselves. So far implemented gasses are oxygen and hydrogen. *Added LiquidSlot for easy management of liquid in tile entities. *Added Hydrogen Tank and Oxygen Tank items. *Added BuildCraft hooks. *Fixed zombies and skeletons spawning with Obsidian Armor, and lowered chances of spawning with any armor. *More OreDictionary registrations to fix IC2's different dust names. *Fixed some javadocs. *Added 'Solar Panel' item as a crafting element for a Solar Generator. *Minor bugfixes.
2012-11-15 21:04:12 +01:00
return new ContainerAdvancedElectricMachine(player.inventory, (TileEntityAdvancedElectricMachine)tileEntity);
case 5:
v5 Beta #9 *Bumped animation textures to 32x32. *Added default parameter to TabProxy.tabMekanism(). *Added additional info to Machine/GeneratorType for better handling of metadata. *Added Reinforced Iron, a stronger version of an Iron Block. *Updated onBlockActivated() code to function correctly. *Added feature for a generator or power unit to be placed facing up or down. *Cleaned up GUI access/handler code. *Fixed electric machine shift-click bug. *Added Diamond Dust. *Fixed Energized Bow continuing to fire after it's energy is depleted. *Added HP information to armor and tools. *Fixed slot parameters. *Overhauled packet system. *Cleaned up tile entity hierarchy. *Added BuildCraft liquid support to Heat Generator to allow energy generation with both BuildCraft's fuel buckets and liquid fuel. *Fixed texture preloads. *Added Electolytic Separator -- a machine that separates hydrogen and oxygen molecules from water. It accepts water from BuildCraft pipes. *Added Hydrogen Generator -- a generator that by default generates 128 u/t, but has boosts by the block's height of up to 512 u/t. *Added Solar Generator, a generator that produces 32 u/t when it can see the sun. *Added Gas API! Simple gas management that allows for both storage of gas in items, blocks, and transfer between themselves. So far implemented gasses are oxygen and hydrogen. *Added LiquidSlot for easy management of liquid in tile entities. *Added Hydrogen Tank and Oxygen Tank items. *Added BuildCraft hooks. *Fixed zombies and skeletons spawning with Obsidian Armor, and lowered chances of spawning with any armor. *More OreDictionary registrations to fix IC2's different dust names. *Fixed some javadocs. *Added 'Solar Panel' item as a crafting element for a Solar Generator. *Minor bugfixes.
2012-11-15 21:04:12 +01:00
return new ContainerAdvancedElectricMachine(player.inventory, (TileEntityAdvancedElectricMachine)tileEntity);
case 6:
v5 Beta #9 *Bumped animation textures to 32x32. *Added default parameter to TabProxy.tabMekanism(). *Added additional info to Machine/GeneratorType for better handling of metadata. *Added Reinforced Iron, a stronger version of an Iron Block. *Updated onBlockActivated() code to function correctly. *Added feature for a generator or power unit to be placed facing up or down. *Cleaned up GUI access/handler code. *Fixed electric machine shift-click bug. *Added Diamond Dust. *Fixed Energized Bow continuing to fire after it's energy is depleted. *Added HP information to armor and tools. *Fixed slot parameters. *Overhauled packet system. *Cleaned up tile entity hierarchy. *Added BuildCraft liquid support to Heat Generator to allow energy generation with both BuildCraft's fuel buckets and liquid fuel. *Fixed texture preloads. *Added Electolytic Separator -- a machine that separates hydrogen and oxygen molecules from water. It accepts water from BuildCraft pipes. *Added Hydrogen Generator -- a generator that by default generates 128 u/t, but has boosts by the block's height of up to 512 u/t. *Added Solar Generator, a generator that produces 32 u/t when it can see the sun. *Added Gas API! Simple gas management that allows for both storage of gas in items, blocks, and transfer between themselves. So far implemented gasses are oxygen and hydrogen. *Added LiquidSlot for easy management of liquid in tile entities. *Added Hydrogen Tank and Oxygen Tank items. *Added BuildCraft hooks. *Fixed zombies and skeletons spawning with Obsidian Armor, and lowered chances of spawning with any armor. *More OreDictionary registrations to fix IC2's different dust names. *Fixed some javadocs. *Added 'Solar Panel' item as a crafting element for a Solar Generator. *Minor bugfixes.
2012-11-15 21:04:12 +01:00
return new ContainerElectricMachine(player.inventory, (TileEntityElectricMachine)tileEntity);
case 7:
2013-11-28 05:42:54 +01:00
return new ContainerRotaryCondensentrator(player.inventory, (TileEntityRotaryCondensentrator)tileEntity);
case 8:
return new ContainerEnergyCube(player.inventory, (TileEntityEnergyCube)tileEntity);
2013-10-30 20:22:43 +01:00
case 9:
return new ContainerNull(player, (TileEntityContainerBlock)tileEntity);
v5 Beta #9 *Bumped animation textures to 32x32. *Added default parameter to TabProxy.tabMekanism(). *Added additional info to Machine/GeneratorType for better handling of metadata. *Added Reinforced Iron, a stronger version of an Iron Block. *Updated onBlockActivated() code to function correctly. *Added feature for a generator or power unit to be placed facing up or down. *Cleaned up GUI access/handler code. *Fixed electric machine shift-click bug. *Added Diamond Dust. *Fixed Energized Bow continuing to fire after it's energy is depleted. *Added HP information to armor and tools. *Fixed slot parameters. *Overhauled packet system. *Cleaned up tile entity hierarchy. *Added BuildCraft liquid support to Heat Generator to allow energy generation with both BuildCraft's fuel buckets and liquid fuel. *Fixed texture preloads. *Added Electolytic Separator -- a machine that separates hydrogen and oxygen molecules from water. It accepts water from BuildCraft pipes. *Added Hydrogen Generator -- a generator that by default generates 128 u/t, but has boosts by the block's height of up to 512 u/t. *Added Solar Generator, a generator that produces 32 u/t when it can see the sun. *Added Gas API! Simple gas management that allows for both storage of gas in items, blocks, and transfer between themselves. So far implemented gasses are oxygen and hydrogen. *Added LiquidSlot for easy management of liquid in tile entities. *Added Hydrogen Tank and Oxygen Tank items. *Added BuildCraft hooks. *Fixed zombies and skeletons spawning with Obsidian Armor, and lowered chances of spawning with any armor. *More OreDictionary registrations to fix IC2's different dust names. *Fixed some javadocs. *Added 'Solar Panel' item as a crafting element for a Solar Generator. *Minor bugfixes.
2012-11-15 21:04:12 +01:00
case 10:
return new ContainerGasTank(player.inventory, (TileEntityGasTank)tileEntity);
case 11:
return new ContainerFactory(player.inventory, (TileEntityFactory)tileEntity);
case 12:
return new ContainerMetallurgicInfuser(player.inventory, (TileEntityMetallurgicInfuser)tileEntity);
case 13:
return new ContainerTeleporter(player.inventory, (TileEntityTeleporter)tileEntity);
case 15:
return new ContainerAdvancedElectricMachine(player.inventory, (TileEntityAdvancedElectricMachine)tileEntity);
case 16:
return new ContainerElectricMachine(player.inventory, (TileEntityElectricMachine)tileEntity);
case 17:
return new ContainerElectricPump(player.inventory, (TileEntityElectricPump)tileEntity);
case 18:
return new ContainerDynamicTank(player.inventory, (TileEntityDynamicTank)tileEntity);
case 21:
EntityRobit robit = (EntityRobit)world.getEntityByID(x);
if(robit != null)
{
return new ContainerRobitMain(player.inventory, robit);
}
case 22:
return new ContainerRobitCrafting(player.inventory, world);
case 23:
EntityRobit robit1 = (EntityRobit)world.getEntityByID(x);
if(robit1 != null)
{
return new ContainerRobitInventory(player.inventory, robit1);
}
case 24:
EntityRobit robit2 = (EntityRobit)world.getEntityByID(x);
if(robit2 != null)
{
return new ContainerRobitSmelting(player.inventory, robit2);
}
case 25:
return new ContainerRobitRepair(player.inventory, world);
case 26:
return new ContainerNull(player, (TileEntityContainerBlock)tileEntity);
case 27:
return new ContainerFilter(player.inventory, (TileEntityContainerBlock)tileEntity);
case 28:
return new ContainerFilter(player.inventory, (TileEntityContainerBlock)tileEntity);
2013-12-12 02:24:37 +01:00
case 29:
return new ContainerChemicalOxidizer(player.inventory, (TileEntityChemicalOxidizer)tileEntity);
2013-12-12 02:24:37 +01:00
case 30:
return new ContainerChemicalInfuser(player.inventory, (TileEntityChemicalInfuser)tileEntity);
case 31:
return new ContainerAdvancedElectricMachine(player.inventory, (TileEntityAdvancedElectricMachine)tileEntity);
case 32:
return new ContainerElectrolyticSeparator(player.inventory, (TileEntityElectrolyticSeparator)tileEntity);
case 33:
2015-02-24 17:08:04 +01:00
return new ContainerSolarEvaporationController(player.inventory, (TileEntitySolarEvaporationController)tileEntity);
case 34:
return new ContainerChanceMachine(player.inventory, (TileEntityChanceMachine)tileEntity);
case 35:
return new ContainerChemicalDissolutionChamber(player.inventory, (TileEntityChemicalDissolutionChamber)tileEntity);
case 36:
return new ContainerChemicalWasher(player.inventory, (TileEntityChemicalWasher)tileEntity);
case 37:
return new ContainerChemicalCrystallizer(player.inventory, (TileEntityChemicalCrystallizer)tileEntity);
2014-03-16 01:05:26 +01:00
case 39:
return new ContainerSeismicVibrator(player.inventory, (TileEntitySeismicVibrator)tileEntity);
2014-04-06 02:16:09 +02:00
case 40:
return new ContainerPRC(player.inventory, (TileEntityPRC)tileEntity);
case 41:
return new ContainerPortableTank(player.inventory, (TileEntityPortableTank)tileEntity);
2014-06-19 12:42:59 +02:00
case 42:
return new ContainerFluidicPlenisher(player.inventory, (TileEntityFluidicPlenisher)tileEntity);
case 43:
return new ContainerUpgradeManagement(player.inventory, (IUpgradeTile)tileEntity);
case 44:
return new ContainerLaserAmplifier(player.inventory, (TileEntityLaserAmplifier)tileEntity);
case 45:
return new ContainerLaserTractorBeam(player.inventory, (TileEntityLaserTractorBeam)tileEntity);
case 46:
return new ContainerNull(player, (TileEntityContainerBlock)tileEntity);
case 47:
return new ContainerSolarNeutronActivator(player.inventory, (TileEntitySolarNeutronActivator)tileEntity);
case 48:
return new ContainerNull(player, (TileEntityContainerBlock)tileEntity);
2015-03-03 19:16:58 +01:00
case 49:
return new ContainerInductionMatrix(player.inventory, (TileEntityInductionCasing)tileEntity);
case 50:
return new ContainerNull(player, (TileEntityContainerBlock)tileEntity);
case 51:
return new ContainerNull(player, (TileEntityContainerBlock)tileEntity);
2015-03-13 15:14:57 +01:00
case 52:
return new ContainerOredictionificator(player.inventory, (TileEntityOredictionificator)tileEntity);
}
return null;
}
public void preInit() {}
public double getReach(EntityPlayer player)
{
if(player instanceof EntityPlayerMP)
{
return ((EntityPlayerMP)player).theItemInWorldManager.getBlockReachDistance();
}
return 0;
}
2013-07-20 18:10:14 +02:00
/**
* Gets the Minecraft base directory.
* @return base directory
*/
public File getMinecraftDir()
{
2014-01-12 17:46:25 +01:00
return (File)FMLInjectionData.data()[6];
2013-07-20 18:10:14 +02:00
}
public void onConfigSync()
{
if(general.cardboardSpawners)
{
MekanismAPI.removeBoxBlacklist(Blocks.mob_spawner, 0);
}
else {
MekanismAPI.addBoxBlacklist(Blocks.mob_spawner, 0);
}
2014-09-03 19:25:06 +02:00
MachineType.updateAllUsages();
for(MachineType type : MachineType.getValidMachines())
{
if(machines.isEnabled(type))
{
CraftingManager.getInstance().getRecipeList().removeAll(type.getRecipes());
CraftingManager.getInstance().getRecipeList().addAll(type.getRecipes());
}
else {
CraftingManager.getInstance().getRecipeList().removeAll(type.getRecipes());
}
}
2014-06-03 08:46:03 +02:00
Mekanism.logger.info("Received config from server.");
}
public EntityPlayer getPlayer(MessageContext context)
{
return context.getServerHandler().playerEntity;
}
2014-09-14 06:20:16 +02:00
public void renderLaser(World world, Pos3D from, Pos3D to, ForgeDirection direction, double energy) {}
}