Merge pull request #432 from AtomicStryker/master

Make Buildcraft use Forge autoassign for Block and Item IDs
This commit is contained in:
SirSengir 2012-11-21 07:56:45 -08:00
commit 94f541b67d
5 changed files with 22 additions and 22 deletions

View file

@ -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);

View file

@ -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)";

View file

@ -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();

View file

@ -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();

View file

@ -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");