From a787a37fcb869a578af0809f45448a0f86654151 Mon Sep 17 00:00:00 2001 From: AtomicStryker Date: Wed, 21 Nov 2012 12:50:31 +0100 Subject: [PATCH] Fixed config BlockIDs and ItemIDs to use Forge autoassign Because there is only like fifteen Forge contributors making this --- common/buildcraft/BuildCraftBuilders.java | 4 ++-- common/buildcraft/BuildCraftCore.java | 12 ++++++------ common/buildcraft/BuildCraftFactory.java | 18 +++++++++--------- common/buildcraft/BuildCraftSilicon.java | 6 +++--- common/buildcraft/BuildCraftTransport.java | 4 ++-- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/common/buildcraft/BuildCraftBuilders.java b/common/buildcraft/BuildCraftBuilders.java index 94116232..e5b30ffc 100644 --- a/common/buildcraft/BuildCraftBuilders.java +++ b/common/buildcraft/BuildCraftBuilders.java @@ -220,8 +220,8 @@ public class BuildCraftBuilders { @PreInit public void initialize(FMLPreInitializationEvent evt) { - 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 templateItemId = BuildCraftCore.mainConfiguration.getItem("templateItem.id", DefaultProps.TEMPLATE_ITEM_ID); + Property blueprintItemId = BuildCraftCore.mainConfiguration.getItem("blueprintItem.id", DefaultProps.BLUEPRINT_ITEM_ID); Property markerId = BuildCraftCore.mainConfiguration.getBlock("marker.id", DefaultProps.MARKER_ID); Property pathMarkerId = BuildCraftCore.mainConfiguration.getBlock("pathMarker.id", DefaultProps.PATH_MARKER_ID); Property fillerId = BuildCraftCore.mainConfiguration.getBlock("filler.id", DefaultProps.FILLER_ID); diff --git a/common/buildcraft/BuildCraftCore.java b/common/buildcraft/BuildCraftCore.java index 64f35e00..22edaef8 100644 --- a/common/buildcraft/BuildCraftCore.java +++ b/common/buildcraft/BuildCraftCore.java @@ -201,16 +201,16 @@ public class BuildCraftCore { PowerFramework.currentFramework = new RedstonePowerFramework(); } - Property wrenchId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"wrench.id", DefaultProps.WRENCH_ID); + Property wrenchId = BuildCraftCore.mainConfiguration.getItem("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.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 woodenGearId = BuildCraftCore.mainConfiguration.getItem("woodenGearItem.id", DefaultProps.WOODEN_GEAR_ID); + Property stoneGearId = BuildCraftCore.mainConfiguration.getItem("stoneGearItem.id", DefaultProps.STONE_GEAR_ID); + Property ironGearId = BuildCraftCore.mainConfiguration.getItem("ironGearItem.id", DefaultProps.IRON_GEAR_ID); + Property goldenGearId = BuildCraftCore.mainConfiguration.getItem("goldenGearItem.id", DefaultProps.GOLDEN_GEAR_ID); + Property diamondGearId = BuildCraftCore.mainConfiguration.getItem("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)"; diff --git a/common/buildcraft/BuildCraftFactory.java b/common/buildcraft/BuildCraftFactory.java index acbb1ffc..ee2bd583 100644 --- a/common/buildcraft/BuildCraftFactory.java +++ b/common/buildcraft/BuildCraftFactory.java @@ -153,15 +153,15 @@ public class BuildCraftFactory { public void initialize(FMLPreInitializationEvent evt) { allowMining = Boolean.parseBoolean(BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_GENERAL,"mining.enabled", true).value); - 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 minigWellId = BuildCraftCore.mainConfiguration.getBlock("miningWell.id", DefaultProps.MINING_WELL_ID); + Property plainPipeId = BuildCraftCore.mainConfiguration.getBlock("drill.id", DefaultProps.DRILL_ID); + Property autoWorkbenchId = BuildCraftCore.mainConfiguration.getBlock("autoWorkbench.id", DefaultProps.AUTO_WORKBENCH_ID); + Property frameId = BuildCraftCore.mainConfiguration.getBlock("frame.id", DefaultProps.FRAME_ID); + Property quarryId = BuildCraftCore.mainConfiguration.getBlock("quarry.id", DefaultProps.QUARRY_ID); + Property pumpId = BuildCraftCore.mainConfiguration.getBlock("pump.id", DefaultProps.PUMP_ID); + Property tankId = BuildCraftCore.mainConfiguration.getBlock("tank.id", DefaultProps.TANK_ID); + Property refineryId = BuildCraftCore.mainConfiguration.getBlock("refinery.id", DefaultProps.REFINERY_ID); + Property hopperId = BuildCraftCore.mainConfiguration.getBlock("hopper.id", DefaultProps.HOPPER_ID); Property hopperDisable = BuildCraftCore.mainConfiguration.get( "Block Savers","hopper.disabled", false); BuildCraftCore.mainConfiguration.save(); diff --git a/common/buildcraft/BuildCraftSilicon.java b/common/buildcraft/BuildCraftSilicon.java index 08f6fcb8..35ccd425 100644 --- a/common/buildcraft/BuildCraftSilicon.java +++ b/common/buildcraft/BuildCraftSilicon.java @@ -68,11 +68,11 @@ public class BuildCraftSilicon { @PreInit public void initialize(FMLPreInitializationEvent evt) { - Property laserId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"laser.id", DefaultProps.LASER_ID); + Property laserId = BuildCraftCore.mainConfiguration.getBlock("laser.id", DefaultProps.LASER_ID); - Property assemblyTableId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"assemblyTable.id", DefaultProps.ASSEMBLY_TABLE_ID); + Property assemblyTableId = BuildCraftCore.mainConfiguration.getBlock("assemblyTable.id", DefaultProps.ASSEMBLY_TABLE_ID); - Property redstoneChipsetId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"redstoneChipset.id", DefaultProps.REDSTONE_CHIPSET); + Property redstoneChipsetId = BuildCraftCore.mainConfiguration.getItem("redstoneChipset.id", DefaultProps.REDSTONE_CHIPSET); BuildCraftCore.mainConfiguration.save(); diff --git a/common/buildcraft/BuildCraftTransport.java b/common/buildcraft/BuildCraftTransport.java index a107e759..e0650561 100644 --- a/common/buildcraft/BuildCraftTransport.java +++ b/common/buildcraft/BuildCraftTransport.java @@ -246,9 +246,9 @@ public class BuildCraftTransport { groupItemsTrigger = Integer.parseInt(groupItemsTriggerProp.value); - Property genericPipeId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"pipe.id", DefaultProps.GENERIC_PIPE_ID); + Property genericPipeId = BuildCraftCore.mainConfiguration.getBlock("pipe.id", DefaultProps.GENERIC_PIPE_ID); - Property pipeWaterproofId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"pipeWaterproof.id", DefaultProps.PIPE_WATERPROOF_ID); + Property pipeWaterproofId = BuildCraftCore.mainConfiguration.getItem("pipeWaterproof.id", DefaultProps.PIPE_WATERPROOF_ID); pipeWaterproof = new ItemBuildCraft(Integer.parseInt(pipeWaterproofId.value)).setIconIndex(2 * 16 + 1); pipeWaterproof.setItemName("pipeWaterproof");