Fix up for forge deprecations
This commit is contained in:
parent
b18369b0ed
commit
4f60ae8705
8 changed files with 63 additions and 61 deletions
|
@ -219,16 +219,16 @@ public class BuildCraftBuilders {
|
|||
|
||||
@PreInit
|
||||
public void initialize(FMLPreInitializationEvent evt) {
|
||||
Property templateItemId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("templateItem.id", Configuration.CATEGORY_ITEM, DefaultProps.TEMPLATE_ITEM_ID);
|
||||
Property blueprintItemId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("blueprintItem.id", Configuration.CATEGORY_ITEM, DefaultProps.BLUEPRINT_ITEM_ID);
|
||||
Property markerId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("marker.id", DefaultProps.MARKER_ID);
|
||||
Property pathMarkerId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("pathMarker.id", DefaultProps.PATH_MARKER_ID);
|
||||
Property fillerId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("filler.id", DefaultProps.FILLER_ID);
|
||||
Property builderId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("builder.id", DefaultProps.BUILDER_ID);
|
||||
Property architectId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("architect.id", DefaultProps.ARCHITECT_ID);
|
||||
Property libraryId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("blueprintLibrary.id", DefaultProps.BLUEPRINT_LIBRARY_ID);
|
||||
Property templateItemId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"templateItem.id", DefaultProps.TEMPLATE_ITEM_ID);
|
||||
Property blueprintItemId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"blueprintItem.id", DefaultProps.BLUEPRINT_ITEM_ID);
|
||||
Property markerId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"marker.id", DefaultProps.MARKER_ID);
|
||||
Property pathMarkerId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"pathMarker.id", DefaultProps.PATH_MARKER_ID);
|
||||
Property fillerId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"filler.id", DefaultProps.FILLER_ID);
|
||||
Property builderId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"builder.id", DefaultProps.BUILDER_ID);
|
||||
Property architectId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"architect.id", DefaultProps.ARCHITECT_ID);
|
||||
Property libraryId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"blueprintLibrary.id", DefaultProps.BLUEPRINT_LIBRARY_ID);
|
||||
|
||||
Property fillerDestroyProp = BuildCraftCore.mainConfiguration.getOrCreateBooleanProperty("filler.destroy", Configuration.CATEGORY_GENERAL, DefaultProps.FILLER_DESTROY);
|
||||
Property fillerDestroyProp = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_GENERAL,"filler.destroy", DefaultProps.FILLER_DESTROY);
|
||||
fillerDestroyProp.comment = "If true, Filler will destroy blocks instead of breaking them.";
|
||||
fillerDestroy = fillerDestroyProp.getBoolean(DefaultProps.FILLER_DESTROY);
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ import net.minecraft.src.ItemStack;
|
|||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.Property;
|
||||
|
||||
@Mod(name="BuildCraft", version=Version.VERSION, useMetadata = false, modid = "BuildCraft|Core", dependencies="required-after:Forge@[4.1.4.285,)")
|
||||
@Mod(name="BuildCraft", version=Version.VERSION, useMetadata = false, modid = "BuildCraft|Core", dependencies="required-after:Forge@[5.0,)")
|
||||
@NetworkMod(channels = {DefaultProps.NET_CHANNEL_NAME}, packetHandler = PacketHandler.class, clientSideRequired = true, serverSideRequired = true)
|
||||
public class BuildCraftCore {
|
||||
public static enum RenderMode {
|
||||
|
@ -160,20 +160,20 @@ public class BuildCraftCore {
|
|||
stripesLaserTexture = 0 * 16 + 3;
|
||||
transparentTexture = 0 * 16 + 0;
|
||||
|
||||
Property continuousCurrent = BuildCraftCore.mainConfiguration.getOrCreateBooleanProperty("current.continuous", Configuration.CATEGORY_GENERAL, DefaultProps.CURRENT_CONTINUOUS);
|
||||
Property continuousCurrent = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_GENERAL,"current.continuous", DefaultProps.CURRENT_CONTINUOUS);
|
||||
continuousCurrent.comment = "set to true for allowing machines to be driven by continuous current";
|
||||
continuousCurrentModel = continuousCurrent.getBoolean(DefaultProps.CURRENT_CONTINUOUS);
|
||||
|
||||
Property trackNetwork = BuildCraftCore.mainConfiguration.getOrCreateBooleanProperty("trackNetworkUsage", Configuration.CATEGORY_GENERAL, false);
|
||||
Property trackNetwork = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_GENERAL,"trackNetworkUsage", false);
|
||||
trackNetworkUsage = trackNetwork.getBoolean(false);
|
||||
|
||||
Property dropBlock = BuildCraftCore.mainConfiguration.getOrCreateBooleanProperty("dropBrokenBlocks", Configuration.CATEGORY_GENERAL, true);
|
||||
Property dropBlock = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_GENERAL,"dropBrokenBlocks", true);
|
||||
dropBlock.comment = "set to false to prevent fillers from dropping blocks.";
|
||||
dropBrokenBlocks = dropBlock.getBoolean(true);
|
||||
|
||||
Property powerFrameworkClass = BuildCraftCore.mainConfiguration.getOrCreateProperty("power.framework", Configuration.CATEGORY_GENERAL, "buildcraft.energy.PneumaticPowerFramework");
|
||||
Property powerFrameworkClass = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_GENERAL,"power.framework", "buildcraft.energy.PneumaticPowerFramework");
|
||||
|
||||
Property factor = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("network.updateFactor", Configuration.CATEGORY_GENERAL, 10);
|
||||
Property factor = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_GENERAL,"network.updateFactor", 10);
|
||||
factor.comment = "increasing this number will decrease network update frequency, useful for overloaded servers";
|
||||
updateFactor = factor.getInt(10);
|
||||
|
||||
|
@ -189,17 +189,17 @@ public class BuildCraftCore {
|
|||
PowerFramework.currentFramework = new RedstonePowerFramework();
|
||||
}
|
||||
|
||||
Property wrenchId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("wrench.id", Configuration.CATEGORY_ITEM, DefaultProps.WRENCH_ID);
|
||||
Property wrenchId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"wrench.id", DefaultProps.WRENCH_ID);
|
||||
|
||||
wrenchItem = (new ItemWrench(wrenchId.getInt(DefaultProps.WRENCH_ID))).setIconIndex(0 * 16 + 2).setItemName("wrenchItem");
|
||||
LanguageRegistry.addName(wrenchItem, "Wrench");
|
||||
|
||||
Property woodenGearId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("woodenGearItem.id", Configuration.CATEGORY_ITEM, DefaultProps.WOODEN_GEAR_ID);
|
||||
Property stoneGearId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("stoneGearItem.id", Configuration.CATEGORY_ITEM, DefaultProps.STONE_GEAR_ID);
|
||||
Property ironGearId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("ironGearItem.id", Configuration.CATEGORY_ITEM, DefaultProps.IRON_GEAR_ID);
|
||||
Property goldenGearId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("goldenGearItem.id", Configuration.CATEGORY_ITEM, DefaultProps.GOLDEN_GEAR_ID);
|
||||
Property diamondGearId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("diamondGearItem.id", Configuration.CATEGORY_ITEM, DefaultProps.DIAMOND_GEAR_ID);
|
||||
Property modifyWorld = BuildCraftCore.mainConfiguration.getOrCreateBooleanProperty("modifyWorld", Configuration.CATEGORY_GENERAL, true);
|
||||
Property woodenGearId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"woodenGearItem.id", DefaultProps.WOODEN_GEAR_ID);
|
||||
Property stoneGearId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"stoneGearItem.id", DefaultProps.STONE_GEAR_ID);
|
||||
Property ironGearId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"ironGearItem.id", DefaultProps.IRON_GEAR_ID);
|
||||
Property goldenGearId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"goldenGearItem.id", DefaultProps.GOLDEN_GEAR_ID);
|
||||
Property diamondGearId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"diamondGearItem.id", DefaultProps.DIAMOND_GEAR_ID);
|
||||
Property modifyWorld = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_GENERAL,"modifyWorld", true);
|
||||
modifyWorld.comment = "set to false if BuildCraft should not generate custom blocks (e.g. oil)";
|
||||
|
||||
BuildCraftCore.modifyWorld = modifyWorld.getBoolean(true);
|
||||
|
|
|
@ -103,12 +103,12 @@ public class BuildCraftEnergy {
|
|||
|
||||
@PreInit
|
||||
public void initialize(FMLPreInitializationEvent evt) {
|
||||
Property engineId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("engine.id", DefaultProps.ENGINE_ID);
|
||||
Property oilStillId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("oilStill.id", DefaultProps.OIL_STILL_ID);
|
||||
Property oilMovingId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("oilMoving.id", DefaultProps.OIL_MOVING_ID);
|
||||
Property bucketOilId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("bucketOil.id", Configuration.CATEGORY_ITEM, DefaultProps.BUCKET_OIL_ID);
|
||||
Property bucketFuelId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("bucketFuel.id", Configuration.CATEGORY_ITEM, DefaultProps.BUCKET_FUEL_ID);
|
||||
Property itemFuelId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("fuel.id", Configuration.CATEGORY_ITEM, DefaultProps.FUEL_ID);
|
||||
Property engineId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"engine.id", DefaultProps.ENGINE_ID);
|
||||
Property oilStillId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"oilStill.id", DefaultProps.OIL_STILL_ID);
|
||||
Property oilMovingId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"oilMoving.id", DefaultProps.OIL_MOVING_ID);
|
||||
Property bucketOilId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"bucketOil.id", DefaultProps.BUCKET_OIL_ID);
|
||||
Property bucketFuelId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"bucketFuel.id", DefaultProps.BUCKET_FUEL_ID);
|
||||
Property itemFuelId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"fuel.id", DefaultProps.FUEL_ID);
|
||||
|
||||
BuildCraftCore.mainConfiguration.save();
|
||||
|
||||
|
|
|
@ -151,18 +151,18 @@ public class BuildCraftFactory {
|
|||
|
||||
@PreInit
|
||||
public void initialize(FMLPreInitializationEvent evt) {
|
||||
allowMining = Boolean.parseBoolean(BuildCraftCore.mainConfiguration.getOrCreateBooleanProperty("mining.enabled", Configuration.CATEGORY_GENERAL, true).value);
|
||||
allowMining = Boolean.parseBoolean(BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_GENERAL,"mining.enabled", true).value);
|
||||
|
||||
Property minigWellId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("miningWell.id", DefaultProps.MINING_WELL_ID);
|
||||
Property plainPipeId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("drill.id", DefaultProps.DRILL_ID);
|
||||
Property autoWorkbenchId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("autoWorkbench.id", DefaultProps.AUTO_WORKBENCH_ID);
|
||||
Property frameId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("frame.id", DefaultProps.FRAME_ID);
|
||||
Property quarryId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("quarry.id", DefaultProps.QUARRY_ID);
|
||||
Property pumpId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("pump.id", DefaultProps.PUMP_ID);
|
||||
Property tankId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("tank.id", DefaultProps.TANK_ID);
|
||||
Property refineryId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("refinery.id", DefaultProps.REFINERY_ID);
|
||||
Property hopperId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("hopper.id", DefaultProps.HOPPER_ID);
|
||||
Property hopperDisable = BuildCraftCore.mainConfiguration.getOrCreateBooleanProperty("hopper.disabled", "Block Savers", false);
|
||||
Property minigWellId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"miningWell.id", DefaultProps.MINING_WELL_ID);
|
||||
Property plainPipeId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"drill.id", DefaultProps.DRILL_ID);
|
||||
Property autoWorkbenchId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"autoWorkbench.id", DefaultProps.AUTO_WORKBENCH_ID);
|
||||
Property frameId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"frame.id", DefaultProps.FRAME_ID);
|
||||
Property quarryId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"quarry.id", DefaultProps.QUARRY_ID);
|
||||
Property pumpId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"pump.id", DefaultProps.PUMP_ID);
|
||||
Property tankId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"tank.id", DefaultProps.TANK_ID);
|
||||
Property refineryId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"refinery.id", DefaultProps.REFINERY_ID);
|
||||
Property hopperId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"hopper.id", DefaultProps.HOPPER_ID);
|
||||
Property hopperDisable = BuildCraftCore.mainConfiguration.get( "Block Savers","hopper.disabled", false);
|
||||
|
||||
BuildCraftCore.mainConfiguration.save();
|
||||
|
||||
|
|
|
@ -68,11 +68,11 @@ public class BuildCraftSilicon {
|
|||
|
||||
@PreInit
|
||||
public void initialize(FMLPreInitializationEvent evt) {
|
||||
Property laserId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("laser.id", DefaultProps.LASER_ID);
|
||||
Property laserId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"laser.id", DefaultProps.LASER_ID);
|
||||
|
||||
Property assemblyTableId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("assemblyTable.id", DefaultProps.ASSEMBLY_TABLE_ID);
|
||||
Property assemblyTableId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"assemblyTable.id", DefaultProps.ASSEMBLY_TABLE_ID);
|
||||
|
||||
Property redstoneChipsetId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("redstoneChipset.id", Configuration.CATEGORY_ITEM, DefaultProps.REDSTONE_CHIPSET);
|
||||
Property redstoneChipsetId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"redstoneChipset.id", DefaultProps.REDSTONE_CHIPSET);
|
||||
|
||||
BuildCraftCore.mainConfiguration.save();
|
||||
|
||||
|
|
|
@ -201,15 +201,15 @@ public class BuildCraftTransport {
|
|||
{
|
||||
try
|
||||
{
|
||||
Property alwaysConnect = BuildCraftCore.mainConfiguration.getOrCreateBooleanProperty("pipes.alwaysConnect", Configuration.CATEGORY_GENERAL, DefaultProps.PIPES_ALWAYS_CONNECT);
|
||||
Property alwaysConnect = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_GENERAL,"pipes.alwaysConnect", DefaultProps.PIPES_ALWAYS_CONNECT);
|
||||
alwaysConnect.comment = "set to false to deactivate pipe connection rules, true by default";
|
||||
alwaysConnectPipes = alwaysConnect.getBoolean(DefaultProps.PIPES_ALWAYS_CONNECT);
|
||||
|
||||
Property pipeLoss = BuildCraftCore.mainConfiguration.getOrCreateBooleanProperty("power.usePipeLoss", Configuration.CATEGORY_GENERAL, DefaultProps.USE_PIPELOSS);
|
||||
Property pipeLoss = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_GENERAL,"power.usePipeLoss", DefaultProps.USE_PIPELOSS);
|
||||
pipeLoss.comment = "Set to false to turn off energy loss over distance on all power pipes";
|
||||
usePipeLoss = pipeLoss.getBoolean(DefaultProps.USE_PIPELOSS);
|
||||
|
||||
Property exclusionItemList = BuildCraftCore.mainConfiguration.getOrCreateProperty("woodenPipe.item.exclusion", Configuration.CATEGORY_BLOCK, "");
|
||||
Property exclusionItemList = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_BLOCK,"woodenPipe.item.exclusion", "");
|
||||
|
||||
String[] excludedItemBlocks = exclusionItemList.value.split(",");
|
||||
for (int j = 0; j < excludedItemBlocks.length; ++j)
|
||||
|
@ -217,7 +217,7 @@ public class BuildCraftTransport {
|
|||
excludedItemBlocks[j] = excludedItemBlocks[j].trim();
|
||||
}
|
||||
|
||||
Property exclusionLiquidList = BuildCraftCore.mainConfiguration.getOrCreateProperty("woodenPipe.liquid.exclusion", Configuration.CATEGORY_BLOCK, "");
|
||||
Property exclusionLiquidList = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_BLOCK,"woodenPipe.liquid.exclusion", "");
|
||||
|
||||
String[] excludedLiquidBlocks = exclusionLiquidList.value.split(",");
|
||||
for (int j = 0; j < excludedLiquidBlocks.length; ++j)
|
||||
|
@ -227,19 +227,19 @@ public class BuildCraftTransport {
|
|||
|
||||
PipeManager.registerExtractionHandler(new ExtractionHandler(excludedItemBlocks, excludedLiquidBlocks));
|
||||
|
||||
Property maxItemInPipesProp = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("pipes.maxItems", Configuration.CATEGORY_GENERAL, 100);
|
||||
Property maxItemInPipesProp = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_GENERAL,"pipes.maxItems", 100);
|
||||
maxItemInPipesProp.comment = "pipes containing more than this amount of items will explode, not dropping any item";
|
||||
|
||||
maxItemsInPipes = Integer.parseInt(maxItemInPipesProp.value);
|
||||
|
||||
Property groupItemsTriggerProp = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("pipes.groupItemsTrigger", Configuration.CATEGORY_GENERAL, 32);
|
||||
Property groupItemsTriggerProp = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_GENERAL,"pipes.groupItemsTrigger", 32);
|
||||
groupItemsTriggerProp.comment = "when reaching this amount of objects in a pipes, items will be automatically grouped";
|
||||
|
||||
groupItemsTrigger = Integer.parseInt(groupItemsTriggerProp.value);
|
||||
|
||||
Property genericPipeId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("pipe.id", DefaultProps.GENERIC_PIPE_ID);
|
||||
Property genericPipeId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"pipe.id", DefaultProps.GENERIC_PIPE_ID);
|
||||
|
||||
Property pipeWaterproofId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("pipeWaterproof.id", Configuration.CATEGORY_ITEM, DefaultProps.PIPE_WATERPROOF_ID);
|
||||
Property pipeWaterproofId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"pipeWaterproof.id", DefaultProps.PIPE_WATERPROOF_ID);
|
||||
|
||||
pipeWaterproof = new ItemBuildCraft(Integer.parseInt(pipeWaterproofId.value)).setIconIndex(2 * 16 + 1);
|
||||
pipeWaterproof.setItemName("pipeWaterproof");
|
||||
|
@ -317,43 +317,43 @@ public class BuildCraftTransport {
|
|||
diamondTextures[j] = 1 * 16 + 6 + j;
|
||||
}
|
||||
|
||||
Property redPipeWireId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("redPipeWire.id", Configuration.CATEGORY_ITEM, DefaultProps.RED_PIPE_WIRE);
|
||||
Property redPipeWireId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"redPipeWire.id", DefaultProps.RED_PIPE_WIRE);
|
||||
redPipeWire = new ItemBuildCraft(Integer.parseInt(redPipeWireId.value)).setIconIndex(4 * 16 + 0).setCreativeTab(CreativeTabs.tabRedstone);
|
||||
redPipeWire.setItemName("redPipeWire");
|
||||
LanguageRegistry.addName(redPipeWire, "Red Pipe Wire");
|
||||
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(Item.dyePowder, 1, 1),
|
||||
new ItemStack(Item.redstone, 1), new ItemStack(Item.ingotIron, 1) }, 500, new ItemStack(redPipeWire, 8)));
|
||||
|
||||
Property bluePipeWireId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("bluePipeWire.id", Configuration.CATEGORY_ITEM, DefaultProps.BLUE_PIPE_WIRE);
|
||||
Property bluePipeWireId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"bluePipeWire.id", DefaultProps.BLUE_PIPE_WIRE);
|
||||
bluePipeWire = new ItemBuildCraft(Integer.parseInt(bluePipeWireId.value)).setIconIndex(4 * 16 + 1).setCreativeTab(CreativeTabs.tabRedstone);
|
||||
bluePipeWire.setItemName("bluePipeWire");
|
||||
LanguageRegistry.addName(bluePipeWire, "Blue Pipe Wire");
|
||||
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(Item.dyePowder, 1, 4),
|
||||
new ItemStack(Item.redstone, 1), new ItemStack(Item.ingotIron, 1) }, 500, new ItemStack(bluePipeWire, 8)));
|
||||
|
||||
Property greenPipeWireId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("greenPipeWire.id", Configuration.CATEGORY_ITEM, DefaultProps.GREEN_PIPE_WIRE);
|
||||
Property greenPipeWireId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"greenPipeWire.id", DefaultProps.GREEN_PIPE_WIRE);
|
||||
greenPipeWire = new ItemBuildCraft(Integer.parseInt(greenPipeWireId.value)).setIconIndex(4 * 16 + 2).setCreativeTab(CreativeTabs.tabRedstone);
|
||||
greenPipeWire.setItemName("greenPipeWire");
|
||||
LanguageRegistry.addName(greenPipeWire, "Green Pipe Wire");
|
||||
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(Item.dyePowder, 1, 2),
|
||||
new ItemStack(Item.redstone, 1), new ItemStack(Item.ingotIron, 1) }, 500, new ItemStack(greenPipeWire, 8)));
|
||||
|
||||
Property yellowPipeWireId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("yellowPipeWire.id", Configuration.CATEGORY_ITEM, DefaultProps.YELLOW_PIPE_WIRE);
|
||||
Property yellowPipeWireId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"yellowPipeWire.id", DefaultProps.YELLOW_PIPE_WIRE);
|
||||
yellowPipeWire = new ItemBuildCraft(Integer.parseInt(yellowPipeWireId.value)).setIconIndex(4 * 16 + 3).setCreativeTab(CreativeTabs.tabRedstone);
|
||||
yellowPipeWire.setItemName("yellowPipeWire");
|
||||
LanguageRegistry.addName(yellowPipeWire, "Yellow Pipe Wire");
|
||||
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(Item.dyePowder, 1, 11),
|
||||
new ItemStack(Item.redstone, 1), new ItemStack(Item.ingotIron, 1) }, 500, new ItemStack(yellowPipeWire, 8)));
|
||||
|
||||
Property pipeGateId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("pipeGate.id", Configuration.CATEGORY_ITEM, DefaultProps.GATE_ID);
|
||||
Property pipeGateId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"pipeGate.id", DefaultProps.GATE_ID);
|
||||
pipeGate = new ItemGate(Integer.parseInt(pipeGateId.value), 0).setIconIndex(2 * 16 + 3);
|
||||
pipeGate.setItemName("pipeGate");
|
||||
|
||||
Property pipeGateAutarchicId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("pipeGateAutarchic.id", Configuration.CATEGORY_ITEM, DefaultProps.GATE_AUTARCHIC_ID);
|
||||
Property pipeGateAutarchicId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"pipeGateAutarchic.id", DefaultProps.GATE_AUTARCHIC_ID);
|
||||
pipeGateAutarchic = new ItemGate(Integer.parseInt(pipeGateAutarchicId.value), 1).setIconIndex(2 * 16 + 3);
|
||||
pipeGateAutarchic.setItemName("pipeGateAutarchic");
|
||||
|
||||
Property pipeFacadeId = BuildCraftCore.mainConfiguration.getOrCreateIntProperty("pipeFacade.id", Configuration.CATEGORY_ITEM, DefaultProps.PIPE_FACADE_ID);
|
||||
Property pipeFacadeId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"pipeFacade.id", DefaultProps.PIPE_FACADE_ID);
|
||||
facadeItem = new ItemFacade(Integer.parseInt(pipeFacadeId.value));
|
||||
facadeItem.setItemName("pipeFacade");
|
||||
|
||||
|
|
|
@ -24,12 +24,12 @@ public class BuildCraftConfiguration extends Configuration {
|
|||
public void save() {
|
||||
Property versionProp = null;
|
||||
|
||||
if (!generalProperties.containsKey("version")) {
|
||||
if (!categories.get(CATEGORY_GENERAL).containsKey("version")) {
|
||||
versionProp = new Property();
|
||||
versionProp.setName("version");
|
||||
generalProperties.put("version", versionProp);
|
||||
categories.get(CATEGORY_GENERAL).put("version", versionProp);
|
||||
} else
|
||||
versionProp = generalProperties.get("version");
|
||||
versionProp = categories.get(CATEGORY_GENERAL).get("version");
|
||||
|
||||
versionProp.value = Version.VERSION;
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@ import java.io.File;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
|
@ -38,7 +40,7 @@ public class CoreProxy {
|
|||
@SidedProxy(clientSide="buildcraft.core.proxy.CoreProxyClient", serverSide="buildcraft.core.proxy.CoreProxy")
|
||||
public static CoreProxy proxy;
|
||||
|
||||
public String getMinecraftVersion() { return "1.3.2"; }
|
||||
public String getMinecraftVersion() { return Loader.instance().getMinecraftModContainer().getVersion(); }
|
||||
|
||||
/* INSTANCES */
|
||||
public Object getClient() { return null; }
|
||||
|
|
Loading…
Add table
Reference in a new issue