Remove deprecated/redundant code in main classes

I've done a bit of cleanup in the BuildCraft code by removing any
redundant/unnessecary little things and removing all deprecated
LanguageRegistry methods from main mod classes.
This commit is contained in:
TXX59 2014-04-14 17:27:59 +01:00
parent a4744e6632
commit 11cdba5686
9 changed files with 68 additions and 108 deletions

View file

@ -120,6 +120,7 @@ item.redPipeWire.name=Red Pipe Wire
item.bluePipeWire.name=Blue Pipe Wire item.bluePipeWire.name=Blue Pipe Wire
item.greenPipeWire.name=Green Pipe Wire item.greenPipeWire.name=Green Pipe Wire
item.yellowPipeWire.name=Yellow Pipe Wire item.yellowPipeWire.name=Yellow Pipe Wire
item.redstoneCrystal.name=Redstone Crystal
item.redstone_red_chipset.name=Redstone Chipset item.redstone_red_chipset.name=Redstone Chipset
item.redstone_iron_chipset.name=Iron Chipset item.redstone_iron_chipset.name=Iron Chipset
item.redstone_gold_chipset.name=Golden Chipset item.redstone_gold_chipset.name=Golden Chipset
@ -182,7 +183,7 @@ tile.blockOil.name=Oil
tile.builderBlock.name=Builder tile.builderBlock.name=Builder
tile.engineCreative.name=Creative Engine tile.engineCreative.name=Creative Engine
tile.engineIron.name=Combustion Engine tile.engineIron.name=Combustion Engine
tile.engineStone.name=Stirling Engine tile.engineStone.name=Steam Engine
tile.engineWood.name=Redstone Engine tile.engineWood.name=Redstone Engine
tile.fillerBlock.name=Filler tile.fillerBlock.name=Filler
tile.filteredBufferBlock.name=Filtered Buffer tile.filteredBufferBlock.name=Filtered Buffer

View file

@ -96,8 +96,6 @@ import buildcraft.core.Version;
import buildcraft.core.proxy.CoreProxy; import buildcraft.core.proxy.CoreProxy;
import buildcraft.core.utils.BCLog; import buildcraft.core.utils.BCLog;
import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms; import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent;
@ -105,7 +103,6 @@ import cpw.mods.fml.common.event.FMLServerStoppingEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -129,13 +126,13 @@ public class BuildCraftBuilders extends BuildCraftMod {
public static int fillerLifespanTough; public static int fillerLifespanTough;
public static int fillerLifespanNormal; public static int fillerLifespanNormal;
public static ActionFiller[] fillerActions; public static ActionFiller[] fillerActions;
@Instance("BuildCraft|Builders") @Mod.Instance("BuildCraft|Builders")
public static BuildCraftBuilders instance; public static BuildCraftBuilders instance;
public static BlueprintDatabase serverDB; public static BlueprintDatabase serverDB;
public static BlueprintDatabase clientDB; public static BlueprintDatabase clientDB;
@EventHandler @Mod.EventHandler
public void loadConfiguration(FMLPreInitializationEvent evt) { public void loadConfiguration(FMLPreInitializationEvent evt) {
File bptMainDir = new File(new File(evt.getModConfigurationDirectory(), "buildcraft"), "blueprints"); File bptMainDir = new File(new File(evt.getModConfigurationDirectory(), "buildcraft"), "blueprints");
@ -149,7 +146,7 @@ public class BuildCraftBuilders extends BuildCraftMod {
clientDB.init(clientDir); clientDB.init(clientDir);
} }
@EventHandler @Mod.EventHandler
public void init(FMLInitializationEvent evt) { public void init(FMLInitializationEvent evt) {
// Register gui handler // Register gui handler
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler()); NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
@ -295,7 +292,7 @@ public class BuildCraftBuilders extends BuildCraftMod {
BuilderProxy.proxy.registerBlockRenderers(); BuilderProxy.proxy.registerBlockRenderers();
} }
@EventHandler @Mod.EventHandler
public void preInit(FMLPreInitializationEvent evt) { public void preInit(FMLPreInitializationEvent evt) {
Property fillerDestroyProp = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "filler.destroy", 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."; fillerDestroyProp.comment = "If true, Filler will destroy blocks instead of breaking them.";
@ -311,12 +308,10 @@ public class BuildCraftBuilders extends BuildCraftMod {
templateItem = new ItemBlueprintTemplate(); templateItem = new ItemBlueprintTemplate();
templateItem.setUnlocalizedName("templateItem"); templateItem.setUnlocalizedName("templateItem");
LanguageRegistry.addName(templateItem, "Template");
CoreProxy.proxy.registerItem(templateItem); CoreProxy.proxy.registerItem(templateItem);
blueprintItem = new ItemBlueprintStandard(); blueprintItem = new ItemBlueprintStandard();
blueprintItem.setUnlocalizedName("blueprintItem"); blueprintItem.setUnlocalizedName("blueprintItem");
LanguageRegistry.addName(blueprintItem, "Blueprint");
CoreProxy.proxy.registerItem(blueprintItem); CoreProxy.proxy.registerItem(blueprintItem);
buildToolBlock = new BlockBuildTool (); buildToolBlock = new BlockBuildTool ();
@ -382,41 +377,41 @@ public class BuildCraftBuilders extends BuildCraftMod {
} }
public static void loadRecipes() { public static void loadRecipes() {
CoreProxy.proxy.addCraftingRecipe(new ItemStack(templateItem, 1), new Object[]{"ppp", "pip", "ppp", 'i', CoreProxy.proxy.addCraftingRecipe(new ItemStack(templateItem, 1), "ppp", "pip", "ppp", 'i',
new ItemStack(Items.dye, 1, 0), 'p', Items.paper}); new ItemStack(Items.dye, 1, 0), 'p', Items.paper);
CoreProxy.proxy.addCraftingRecipe(new ItemStack(blueprintItem, 1), new Object[]{"ppp", "pip", "ppp", 'i', CoreProxy.proxy.addCraftingRecipe(new ItemStack(blueprintItem, 1), "ppp", "pip", "ppp", 'i',
new ItemStack(Items.dye, 1, 4), 'p', Items.paper}); new ItemStack(Items.dye, 1, 4), 'p', Items.paper);
CoreProxy.proxy.addCraftingRecipe(new ItemStack(markerBlock, 1), new Object[]{"l ", "r ", 'l', CoreProxy.proxy.addCraftingRecipe(new ItemStack(markerBlock, 1), "l ", "r ", 'l',
new ItemStack(Items.dye, 1, 4), 'r', Blocks.redstone_torch}); new ItemStack(Items.dye, 1, 4), 'r', Blocks.redstone_torch);
CoreProxy.proxy.addCraftingRecipe(new ItemStack(pathMarkerBlock, 1), new Object[]{"l ", "r ", 'l', CoreProxy.proxy.addCraftingRecipe(new ItemStack(pathMarkerBlock, 1), "l ", "r ", 'l',
new ItemStack(Items.dye, 1, 2), 'r', Blocks.redstone_torch}); new ItemStack(Items.dye, 1, 2), 'r', Blocks.redstone_torch);
CoreProxy.proxy.addCraftingRecipe(new ItemStack(fillerBlock, 1), new Object[]{"btb", "ycy", "gCg", 'b', CoreProxy.proxy.addCraftingRecipe(new ItemStack(fillerBlock, 1), "btb", "ycy", "gCg", 'b',
new ItemStack(Items.dye, 1, 0), 't', markerBlock, 'y', new ItemStack(Items.dye, 1, 11), new ItemStack(Items.dye, 1, 0), 't', markerBlock, 'y', new ItemStack(Items.dye, 1, 11),
'c', Blocks.crafting_table, 'g', BuildCraftCore.goldGearItem, 'C', Blocks.chest}); 'c', Blocks.crafting_table, 'g', BuildCraftCore.goldGearItem, 'C', Blocks.chest);
CoreProxy.proxy.addCraftingRecipe(new ItemStack(builderBlock, 1), new Object[]{"btb", "ycy", "gCg", 'b', CoreProxy.proxy.addCraftingRecipe(new ItemStack(builderBlock, 1), "btb", "ycy", "gCg", 'b',
new ItemStack(Items.dye, 1, 0), 't', markerBlock, 'y', new ItemStack(Items.dye, 1, 11), new ItemStack(Items.dye, 1, 0), 't', markerBlock, 'y', new ItemStack(Items.dye, 1, 11),
'c', Blocks.crafting_table, 'g', BuildCraftCore.diamondGearItem, 'C', Blocks.chest}); 'c', Blocks.crafting_table, 'g', BuildCraftCore.diamondGearItem, 'C', Blocks.chest);
CoreProxy.proxy.addCraftingRecipe(new ItemStack(architectBlock, 1), new Object[]{"btb", "ycy", "gCg", 'b', CoreProxy.proxy.addCraftingRecipe(new ItemStack(architectBlock, 1), "btb", "ycy", "gCg", 'b',
new ItemStack(Items.dye, 1, 0), 't', markerBlock, 'y', new ItemStack(Items.dye, 1, 11), new ItemStack(Items.dye, 1, 0), 't', markerBlock, 'y', new ItemStack(Items.dye, 1, 11),
'c', Blocks.crafting_table, 'g', BuildCraftCore.diamondGearItem, 'C', 'c', Blocks.crafting_table, 'g', BuildCraftCore.diamondGearItem, 'C',
new ItemStack(blueprintItem, 1)}); new ItemStack(blueprintItem, 1));
CoreProxy.proxy.addCraftingRecipe(new ItemStack(libraryBlock, 1), new Object[]{"bbb", "bBb", "bbb", 'b', CoreProxy.proxy.addCraftingRecipe(new ItemStack(libraryBlock, 1), "bbb", "bBb", "bbb", 'b',
new ItemStack(blueprintItem), 'B', Blocks.bookshelf}); new ItemStack(blueprintItem), 'B', Blocks.bookshelf);
} }
@EventHandler @Mod.EventHandler
public void processIMCRequests(FMLInterModComms.IMCEvent event) { public void processIMCRequests(FMLInterModComms.IMCEvent event) {
InterModComms.processIMC(event); InterModComms.processIMC(event);
} }
@EventHandler @Mod.EventHandler
public void ServerStop(FMLServerStoppingEvent event) { public void ServerStop(FMLServerStoppingEvent event) {
TilePathMarker.clearAvailableMarkersList(); TilePathMarker.clearAvailableMarkersList();
} }

View file

@ -88,8 +88,6 @@ import buildcraft.core.utils.BCLog;
import buildcraft.core.utils.CraftingHandler; import buildcraft.core.utils.CraftingHandler;
import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms; import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent;
@ -98,7 +96,6 @@ import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -108,7 +105,7 @@ public class BuildCraftCore extends BuildCraftMod {
public static enum RenderMode { public static enum RenderMode {
Full, NoDynamic Full, NoDynamic
}; }
public static RenderMode render = RenderMode.Full; public static RenderMode render = RenderMode.Full;
public static boolean debugMode = false; public static boolean debugMode = false;
public static boolean modifyWorld = false; public static boolean modifyWorld = false;
@ -174,7 +171,7 @@ public class BuildCraftCore extends BuildCraftMod {
public static boolean forcePneumaticPower = true; public static boolean forcePneumaticPower = true;
public static boolean consumeWaterSources = false; public static boolean consumeWaterSources = false;
//public static BptItem[] itemBptProps = new BptItem[Item.itemsList.length]; //public static BptItem[] itemBptProps = new BptItem[Item.itemsList.length];
@Instance("BuildCraft|Core") @Mod.Instance("BuildCraft|Core")
public static BuildCraftCore instance; public static BuildCraftCore instance;
public static Achievement woodenGearAchievement; public static Achievement woodenGearAchievement;
@ -202,7 +199,7 @@ public class BuildCraftCore extends BuildCraftMod {
public static AchievementPage BuildcraftAchievements; public static AchievementPage BuildcraftAchievements;
@EventHandler @Mod.EventHandler
public void loadConfiguration(FMLPreInitializationEvent evt) { public void loadConfiguration(FMLPreInitializationEvent evt) {
BCLog.initLog(); BCLog.initLog();
@ -246,7 +243,6 @@ public class BuildCraftCore extends BuildCraftMod {
longUpdateFactor = longFactor.getInt(40); longUpdateFactor = longFactor.getInt(40);
wrenchItem = (new ItemWrench()).setUnlocalizedName("wrenchItem"); wrenchItem = (new ItemWrench()).setUnlocalizedName("wrenchItem");
LanguageRegistry.addName(wrenchItem, "Wrench");
CoreProxy.proxy.registerItem(wrenchItem); CoreProxy.proxy.registerItem(wrenchItem);
Property modifyWorldProp = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "modifyWorld", true); Property modifyWorldProp = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "modifyWorld", true);
@ -264,32 +260,26 @@ public class BuildCraftCore extends BuildCraftMod {
consumeWater.comment = "set to true if the Pump should consume water"; consumeWater.comment = "set to true if the Pump should consume water";
woodenGearItem = (new ItemBuildCraft(CreativeTabBuildCraft.TIER_1)).setUnlocalizedName("woodenGearItem"); woodenGearItem = (new ItemBuildCraft(CreativeTabBuildCraft.TIER_1)).setUnlocalizedName("woodenGearItem");
LanguageRegistry.addName(woodenGearItem, "Wooden Gear");
CoreProxy.proxy.registerItem(woodenGearItem); CoreProxy.proxy.registerItem(woodenGearItem);
OreDictionary.registerOre("gearWood", new ItemStack(woodenGearItem)); OreDictionary.registerOre("gearWood", new ItemStack(woodenGearItem));
stoneGearItem = (new ItemBuildCraft(CreativeTabBuildCraft.TIER_1)).setUnlocalizedName("stoneGearItem"); stoneGearItem = (new ItemBuildCraft(CreativeTabBuildCraft.TIER_1)).setUnlocalizedName("stoneGearItem");
LanguageRegistry.addName(stoneGearItem, "Stone Gear");
CoreProxy.proxy.registerItem(stoneGearItem); CoreProxy.proxy.registerItem(stoneGearItem);
OreDictionary.registerOre("gearStone", new ItemStack(stoneGearItem)); OreDictionary.registerOre("gearStone", new ItemStack(stoneGearItem));
ironGearItem = (new ItemBuildCraft(CreativeTabBuildCraft.TIER_1)).setUnlocalizedName("ironGearItem"); ironGearItem = (new ItemBuildCraft(CreativeTabBuildCraft.TIER_1)).setUnlocalizedName("ironGearItem");
LanguageRegistry.addName(ironGearItem, "Iron Gear");
CoreProxy.proxy.registerItem(ironGearItem); CoreProxy.proxy.registerItem(ironGearItem);
OreDictionary.registerOre("gearIron", new ItemStack(ironGearItem)); OreDictionary.registerOre("gearIron", new ItemStack(ironGearItem));
goldGearItem = (new ItemBuildCraft(CreativeTabBuildCraft.TIER_1)).setUnlocalizedName("goldGearItem"); goldGearItem = (new ItemBuildCraft(CreativeTabBuildCraft.TIER_1)).setUnlocalizedName("goldGearItem");
LanguageRegistry.addName(goldGearItem, "Gold Gear");
CoreProxy.proxy.registerItem(goldGearItem); CoreProxy.proxy.registerItem(goldGearItem);
OreDictionary.registerOre("gearGold", new ItemStack(goldGearItem)); OreDictionary.registerOre("gearGold", new ItemStack(goldGearItem));
diamondGearItem = (new ItemBuildCraft(CreativeTabBuildCraft.TIER_1)).setUnlocalizedName("diamondGearItem"); diamondGearItem = (new ItemBuildCraft(CreativeTabBuildCraft.TIER_1)).setUnlocalizedName("diamondGearItem");
LanguageRegistry.addName(diamondGearItem, "Diamond Gear");
CoreProxy.proxy.registerItem(diamondGearItem); CoreProxy.proxy.registerItem(diamondGearItem);
OreDictionary.registerOre("gearDiamond", new ItemStack(diamondGearItem)); OreDictionary.registerOre("gearDiamond", new ItemStack(diamondGearItem));
redstoneCrystal = (new ItemBuildCraft(CreativeTabBuildCraft.TIER_3)).setUnlocalizedName("redstoneCrystal"); redstoneCrystal = (new ItemBuildCraft(CreativeTabBuildCraft.TIER_3)).setUnlocalizedName("redstoneCrystal");
LanguageRegistry.addName(redstoneCrystal, "Redstone Crystal");
CoreProxy.proxy.registerItem(redstoneCrystal); CoreProxy.proxy.registerItem(redstoneCrystal);
OreDictionary.registerOre("redstoneCrystal", new ItemStack(redstoneCrystal)); OreDictionary.registerOre("redstoneCrystal", new ItemStack(redstoneCrystal));
@ -314,7 +304,7 @@ public class BuildCraftCore extends BuildCraftMod {
} }
@EventHandler @Mod.EventHandler
public void initialize(FMLInitializationEvent evt) { public void initialize(FMLInitializationEvent evt) {
channels = NetworkRegistry.INSTANCE.newChannel channels = NetworkRegistry.INSTANCE.newChannel
(DefaultProps.NET_CHANNEL_NAME + "-CORE", new PacketHandler()); (DefaultProps.NET_CHANNEL_NAME + "-CORE", new PacketHandler());
@ -347,7 +337,7 @@ public class BuildCraftCore extends BuildCraftMod {
} }
@EventHandler @Mod.EventHandler
public void postInit(FMLPostInitializationEvent event) { public void postInit(FMLPostInitializationEvent event) {
for (Object o : Block.blockRegistry) { for (Object o : Block.blockRegistry) {
Block block = (Block) o; Block block = (Block) o;
@ -364,7 +354,7 @@ public class BuildCraftCore extends BuildCraftMod {
FMLCommonHandler.instance().bus().register(new TickHandlerCoreClient()); FMLCommonHandler.instance().bus().register(new TickHandlerCoreClient());
} }
@EventHandler @Mod.EventHandler
public void serverStarting(FMLServerStartingEvent event) { public void serverStarting(FMLServerStartingEvent event) {
event.registerServerCommand(new CommandBuildCraft()); event.registerServerCommand(new CommandBuildCraft());
} }
@ -395,7 +385,7 @@ public class BuildCraftCore extends BuildCraftMod {
CoreProxy.proxy.addCraftingRecipe(new ItemStack(diamondGearItem), " I ", "IGI", " I ", 'I', Items.diamond, 'G', goldGearItem); CoreProxy.proxy.addCraftingRecipe(new ItemStack(diamondGearItem), " I ", "IGI", " I ", 'I', Items.diamond, 'G', goldGearItem);
} }
@EventHandler @Mod.EventHandler
public void processIMCRequests(FMLInterModComms.IMCEvent event) { public void processIMCRequests(FMLInterModComms.IMCEvent event) {
InterModComms.processIMC(event); InterModComms.processIMC(event);
} }
@ -458,7 +448,7 @@ public class BuildCraftCore extends BuildCraftMod {
diffZ = pos.get(2); diffZ = pos.get(2);
} }
@EventHandler @Mod.EventHandler
public void load(FMLInitializationEvent event) { public void load(FMLInitializationEvent event) {
woodenGearAchievement = new Achievement("achievement.woodenGear", "woodenGearAchievement", 0, 0,woodenGearItem, null).registerStat(); woodenGearAchievement = new Achievement("achievement.woodenGear", "woodenGearAchievement", 0, 0,woodenGearItem, null).registerStat();
stoneGearAchievement = new Achievement("achievement.stoneGear", "stoneGearAchievement", 2, 0, stoneGearItem, woodenGearAchievement).registerStat(); stoneGearAchievement = new Achievement("achievement.stoneGear", "stoneGearAchievement", 2, 0, stoneGearItem, woodenGearAchievement).registerStat();
@ -478,9 +468,9 @@ public class BuildCraftCore extends BuildCraftMod {
tinglyLaserAchievement = new Achievement("achievement.tinglyLaser", "tinglyLaserAchievement", 11, -2, BuildCraftSilicon.laserBlock ,timeForSomeLogicAchievement).registerStat(); tinglyLaserAchievement = new Achievement("achievement.tinglyLaser", "tinglyLaserAchievement", 11, -2, BuildCraftSilicon.laserBlock ,timeForSomeLogicAchievement).registerStat();
architectAchievement = new Achievement("achievement.architect", "architectAchievement", 11, 2, BuildCraftBuilders.architectBlock, chunkDestroyerAchievement).registerStat(); architectAchievement = new Achievement("achievement.architect", "architectAchievement", 11, 2, BuildCraftBuilders.architectBlock, chunkDestroyerAchievement).registerStat();
builderAchievement = new Achievement("achievement.builder", "builderAchievement", 13, 2, BuildCraftBuilders.builderBlock, architectAchievement).registerStat(); builderAchievement = new Achievement("achievement.builder", "builderAchievement", 13, 2, BuildCraftBuilders.builderBlock, architectAchievement).registerStat();
blueprintAchievement = new Achievement("achievement.blueprint", "blueprintAchievement", 11, 4, BuildCraftBuilders.blueprintItem, architectAchievement).registerStat(); blueprintAchievement = new Achievement("achievement.blueprint", "blueprintAchievement", 11, 4, BuildCraftBuilders.blueprintItem, architectAchievement).registerStat();
templateAchievement = new Achievement("achievement.template", "templateAchievement", 13, 4, BuildCraftBuilders.templateItem, blueprintAchievement).registerStat(); templateAchievement = new Achievement("achievement.template", "templateAchievement", 13, 4, BuildCraftBuilders.templateItem, blueprintAchievement).registerStat();
libraryAchievement = new Achievement("achievement.blueprintLibrary", "blueprintLibraryAchievement", 15, 2, BuildCraftBuilders.libraryBlock, builderAchievement).registerStat(); libraryAchievement = new Achievement("achievement.blueprintLibrary", "blueprintLibraryAchievement", 15, 2, BuildCraftBuilders.libraryBlock, builderAchievement).registerStat();
BuildcraftAchievements = new AchievementPage("Buildcraft", woodenGearAchievement, stoneGearAchievement, ironGearAchievement, goldGearAchievement, diamondGearAchievement, wrenchAchievement, engineAchievement1, engineAchievement2, engineAchievement3, aLotOfCraftingAchievement, straightDownAchievement, chunkDestroyerAchievement, fasterFillingAchievement, timeForSomeLogicAchievement, refineAndRedefineAchievement, tinglyLaserAchievement, architectAchievement, builderAchievement, blueprintAchievement, templateAchievement, libraryAchievement); BuildcraftAchievements = new AchievementPage("Buildcraft", woodenGearAchievement, stoneGearAchievement, ironGearAchievement, goldGearAchievement, diamondGearAchievement, wrenchAchievement, engineAchievement1, engineAchievement2, engineAchievement3, aLotOfCraftingAchievement, straightDownAchievement, chunkDestroyerAchievement, fasterFillingAchievement, timeForSomeLogicAchievement, refineAndRedefineAchievement, tinglyLaserAchievement, architectAchievement, builderAchievement, blueprintAchievement, templateAchievement, libraryAchievement);
AchievementPage.registerAchievementPage(BuildcraftAchievements); AchievementPage.registerAchievementPage(BuildcraftAchievements);

View file

@ -56,15 +56,12 @@ import buildcraft.energy.worldgen.BiomeInitializer;
import buildcraft.energy.worldgen.OilPopulate; import buildcraft.energy.worldgen.OilPopulate;
import buildcraft.transport.network.PacketHandlerTransport; import buildcraft.transport.network.PacketHandlerTransport;
import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms; import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -99,10 +96,10 @@ public class BuildCraftEnergy extends BuildCraftMod {
public static BCTrigger triggerGreenEngineHeat = new TriggerEngineHeat(EnergyStage.GREEN); public static BCTrigger triggerGreenEngineHeat = new TriggerEngineHeat(EnergyStage.GREEN);
public static BCTrigger triggerYellowEngineHeat = new TriggerEngineHeat(EnergyStage.YELLOW); public static BCTrigger triggerYellowEngineHeat = new TriggerEngineHeat(EnergyStage.YELLOW);
public static BCTrigger triggerRedEngineHeat = new TriggerEngineHeat(EnergyStage.RED); public static BCTrigger triggerRedEngineHeat = new TriggerEngineHeat(EnergyStage.RED);
@Instance("BuildCraft|Energy") @Mod.Instance("BuildCraft|Energy")
public static BuildCraftEnergy instance; public static BuildCraftEnergy instance;
@EventHandler @Mod.EventHandler
public void preInit(FMLPreInitializationEvent evt) { public void preInit(FMLPreInitializationEvent evt) {
int oilDesertBiomeId = BuildCraftCore.mainConfiguration.get("biomes", "biomeOilDesert", DefaultProps.BIOME_OIL_DESERT).getInt(DefaultProps.BIOME_OIL_DESERT); int oilDesertBiomeId = BuildCraftCore.mainConfiguration.get("biomes", "biomeOilDesert", DefaultProps.BIOME_OIL_DESERT).getInt(DefaultProps.BIOME_OIL_DESERT);
int oilOceanBiomeId = BuildCraftCore.mainConfiguration.get("biomes", "biomeOilOcean", DefaultProps.BIOME_OIL_OCEAN).getInt(DefaultProps.BIOME_OIL_OCEAN); int oilOceanBiomeId = BuildCraftCore.mainConfiguration.get("biomes", "biomeOilOcean", DefaultProps.BIOME_OIL_OCEAN).getInt(DefaultProps.BIOME_OIL_OCEAN);
@ -136,10 +133,6 @@ public class BuildCraftEnergy extends BuildCraftMod {
engineBlock = new BlockEngine(CreativeTabBuildCraft.TIER_1); engineBlock = new BlockEngine(CreativeTabBuildCraft.TIER_1);
CoreProxy.proxy.registerBlock(engineBlock, ItemEngine.class); CoreProxy.proxy.registerBlock(engineBlock, ItemEngine.class);
LanguageRegistry.addName(new ItemStack(engineBlock, 1, 0), "Redstone Engine");
LanguageRegistry.addName(new ItemStack(engineBlock, 1, 1), "Steam Engine");
LanguageRegistry.addName(new ItemStack(engineBlock, 1, 2), "Combustion Engine");
// Oil and fuel // Oil and fuel
buildcraftFluidOil = new Fluid("oil").setDensity(800).setViscosity(1500); buildcraftFluidOil = new Fluid("oil").setDensity(800).setViscosity(1500);
@ -192,7 +185,6 @@ public class BuildCraftEnergy extends BuildCraftMod {
if (blockOil != null) { if (blockOil != null) {
bucketOil = new ItemBucketBuildcraft(blockOil, CreativeTabBuildCraft.TIER_2); bucketOil = new ItemBucketBuildcraft(blockOil, CreativeTabBuildCraft.TIER_2);
bucketOil.setUnlocalizedName("bucketOil").setContainerItem(Items.bucket); bucketOil.setUnlocalizedName("bucketOil").setContainerItem(Items.bucket);
LanguageRegistry.addName(bucketOil, "Oil Bucket");
CoreProxy.proxy.registerItem(bucketOil); CoreProxy.proxy.registerItem(bucketOil);
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("oil", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketOil), new ItemStack(Items.bucket)); FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("oil", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketOil), new ItemStack(Items.bucket));
} }
@ -200,7 +192,6 @@ public class BuildCraftEnergy extends BuildCraftMod {
if (blockFuel != null) { if (blockFuel != null) {
bucketFuel = new ItemBucketBuildcraft(blockFuel, CreativeTabBuildCraft.TIER_2); bucketFuel = new ItemBucketBuildcraft(blockFuel, CreativeTabBuildCraft.TIER_2);
bucketFuel.setUnlocalizedName("bucketFuel").setContainerItem(Items.bucket); bucketFuel.setUnlocalizedName("bucketFuel").setContainerItem(Items.bucket);
LanguageRegistry.addName(bucketFuel, "Fuel Bucket");
CoreProxy.proxy.registerItem(bucketFuel); CoreProxy.proxy.registerItem(bucketFuel);
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("fuel", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketFuel), new ItemStack(Items.bucket)); FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("fuel", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketFuel), new ItemStack(Items.bucket));
} }
@ -209,7 +200,6 @@ public class BuildCraftEnergy extends BuildCraftMod {
if (blockRedPlasma != null) { if (blockRedPlasma != null) {
bucketRedPlasma = new ItemBucketBuildcraft(blockRedPlasma, CreativeTabBuildCraft.TIER_4); bucketRedPlasma = new ItemBucketBuildcraft(blockRedPlasma, CreativeTabBuildCraft.TIER_4);
bucketRedPlasma.setUnlocalizedName("bucketRedPlasma").setContainerItem(Items.bucket); bucketRedPlasma.setUnlocalizedName("bucketRedPlasma").setContainerItem(Items.bucket);
LanguageRegistry.addName(bucketRedPlasma, "Red Plasma Bucket");
CoreProxy.proxy.registerItem(bucketRedPlasma); CoreProxy.proxy.registerItem(bucketRedPlasma);
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("redplasma", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketRedPlasma), new ItemStack(Items.bucket)); FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("redplasma", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketRedPlasma), new ItemStack(Items.bucket));
} }
@ -246,7 +236,7 @@ public class BuildCraftEnergy extends BuildCraftMod {
MinecraftForge.EVENT_BUS.register(this); MinecraftForge.EVENT_BUS.register(this);
} }
@EventHandler @Mod.EventHandler
public void init(FMLInitializationEvent evt) { public void init(FMLInitializationEvent evt) {
channels = NetworkRegistry.INSTANCE.newChannel channels = NetworkRegistry.INSTANCE.newChannel
(DefaultProps.NET_CHANNEL_NAME + "-ENERGY", new PacketHandlerTransport()); (DefaultProps.NET_CHANNEL_NAME + "-ENERGY", new PacketHandlerTransport());
@ -262,7 +252,7 @@ public class BuildCraftEnergy extends BuildCraftMod {
EnergyProxy.proxy.registerTileEntities(); EnergyProxy.proxy.registerTileEntities();
} }
@EventHandler @Mod.EventHandler
public void postInit(FMLPostInitializationEvent evt) { public void postInit(FMLPostInitializationEvent evt) {
if (BuildCraftCore.modifyWorld) { if (BuildCraftCore.modifyWorld) {
MinecraftForge.EVENT_BUS.register(OilPopulate.INSTANCE); MinecraftForge.EVENT_BUS.register(OilPopulate.INSTANCE);
@ -282,12 +272,12 @@ public class BuildCraftEnergy extends BuildCraftMod {
public static void loadRecipes() { public static void loadRecipes() {
CoreProxy.proxy.addCraftingRecipe(new ItemStack(engineBlock, 1, 0), CoreProxy.proxy.addCraftingRecipe(new ItemStack(engineBlock, 1, 0),
new Object[]{"www", " g ", "GpG", 'w', "plankWood", 'g', Blocks.glass, 'G', "www", " g ", "GpG", 'w', "plankWood", 'g', Blocks.glass, 'G',
BuildCraftCore.woodenGearItem, 'p', Blocks.piston}); BuildCraftCore.woodenGearItem, 'p', Blocks.piston);
CoreProxy.proxy.addCraftingRecipe(new ItemStack(engineBlock, 1, 1), new Object[]{"www", " g ", "GpG", 'w', "cobblestone", CoreProxy.proxy.addCraftingRecipe(new ItemStack(engineBlock, 1, 1), "www", " g ", "GpG", 'w', "cobblestone",
'g', Blocks.glass, 'G', BuildCraftCore.stoneGearItem, 'p', Blocks.piston}); 'g', Blocks.glass, 'G', BuildCraftCore.stoneGearItem, 'p', Blocks.piston);
CoreProxy.proxy.addCraftingRecipe(new ItemStack(engineBlock, 1, 2), new Object[]{"www", " g ", "GpG", 'w', Items.iron_ingot, CoreProxy.proxy.addCraftingRecipe(new ItemStack(engineBlock, 1, 2), "www", " g ", "GpG", 'w', Items.iron_ingot,
'g', Blocks.glass, 'G', BuildCraftCore.ironGearItem, 'p', Blocks.piston}); 'g', Blocks.glass, 'G', BuildCraftCore.ironGearItem, 'p', Blocks.piston);
} }
private int findUnusedBiomeID (String biomeName) { private int findUnusedBiomeID (String biomeName) {
@ -302,14 +292,14 @@ public class BuildCraftEnergy extends BuildCraftMod {
// failed to find any free biome IDs // failed to find any free biome IDs
class BiomeIdLimitException extends RuntimeException { class BiomeIdLimitException extends RuntimeException {
public BiomeIdLimitException(String biome) { public BiomeIdLimitException(String biome) {
super(String.format("You have a run out of free Biome Ids for %s", biome)); super(String.format("You have run out of free Biome ID spaces for %s", biome));
} }
} }
throw new BiomeIdLimitException(biomeName); throw new BiomeIdLimitException(biomeName);
} }
@EventHandler @Mod.EventHandler
public void processIMCRequests(FMLInterModComms.IMCEvent event) { public void processIMCRequests(FMLInterModComms.IMCEvent event) {
InterModComms.processIMC(event); InterModComms.processIMC(event);
} }

View file

@ -57,8 +57,6 @@ import buildcraft.factory.network.PacketHandlerFactory;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms; import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent;
@ -87,10 +85,10 @@ public class BuildCraftFactory extends BuildCraftMod {
public static float miningMultiplier = 1; public static float miningMultiplier = 1;
public static int miningDepth = 256; public static int miningDepth = 256;
public static PumpDimensionList pumpDimensionList; public static PumpDimensionList pumpDimensionList;
@Instance("BuildCraft|Factory") @Mod.Instance("BuildCraft|Factory")
public static BuildCraftFactory instance; public static BuildCraftFactory instance;
@EventHandler @Mod.EventHandler
public void postInit(FMLPostInitializationEvent evt) { public void postInit(FMLPostInitializationEvent evt) {
FactoryProxy.proxy.initializeNEIIntegration(); FactoryProxy.proxy.initializeNEIIntegration();
ForgeChunkManager.setForcedChunkLoadingCallback(instance, new QuarryChunkloadCallback()); ForgeChunkManager.setForcedChunkLoadingCallback(instance, new QuarryChunkloadCallback());
@ -127,7 +125,7 @@ public class BuildCraftFactory extends BuildCraftMod {
} }
} }
@EventHandler @Mod.EventHandler
public void load(FMLInitializationEvent evt) { public void load(FMLInitializationEvent evt) {
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler()); NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
@ -152,7 +150,7 @@ public class BuildCraftFactory extends BuildCraftMod {
} }
} }
@EventHandler @Mod.EventHandler
public void initialize(FMLPreInitializationEvent evt) { public void initialize(FMLPreInitializationEvent evt) {
channels = NetworkRegistry.INSTANCE.newChannel channels = NetworkRegistry.INSTANCE.newChannel
(DefaultProps.NET_CHANNEL_NAME + "-FACTORY", new PacketHandlerFactory()); (DefaultProps.NET_CHANNEL_NAME + "-FACTORY", new PacketHandlerFactory());
@ -314,7 +312,7 @@ public class BuildCraftFactory extends BuildCraftMod {
} }
} }
@EventHandler @Mod.EventHandler
public void processIMCRequests(FMLInterModComms.IMCEvent event) { public void processIMCRequests(FMLInterModComms.IMCEvent event) {
InterModComms.processIMC(event); InterModComms.processIMC(event);
} }

View file

@ -15,7 +15,6 @@ import cpw.mods.fml.common.network.FMLOutboundHandler;
import cpw.mods.fml.common.network.FMLOutboundHandler.OutboundTarget; import cpw.mods.fml.common.network.FMLOutboundHandler.OutboundTarget;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.Packet; import net.minecraft.network.Packet;
import net.minecraft.world.World; import net.minecraft.world.World;
import buildcraft.core.network.BuildCraftPacket; import buildcraft.core.network.BuildCraftPacket;

View file

@ -44,13 +44,10 @@ import buildcraft.transport.gates.GateExpansionRedstoneFader;
import buildcraft.transport.gates.GateExpansionTimer; import buildcraft.transport.gates.GateExpansionTimer;
import buildcraft.transport.gates.ItemGate; import buildcraft.transport.gates.ItemGate;
import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms; import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(name = "BuildCraft Silicon", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Silicon", dependencies = DefaultProps.DEPENDENCY_TRANSPORT) @Mod(name = "BuildCraft Silicon", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Silicon", dependencies = DefaultProps.DEPENDENCY_TRANSPORT)
public class BuildCraftSilicon extends BuildCraftMod { public class BuildCraftSilicon extends BuildCraftMod {
@ -58,10 +55,10 @@ public class BuildCraftSilicon extends BuildCraftMod {
public static ItemRedstoneChipset redstoneChipset; public static ItemRedstoneChipset redstoneChipset;
public static BlockLaser laserBlock; public static BlockLaser laserBlock;
public static BlockLaserTable assemblyTableBlock; public static BlockLaserTable assemblyTableBlock;
@Instance("BuildCraft|Silicon") @Mod.Instance("BuildCraft|Silicon")
public static BuildCraftSilicon instance; public static BuildCraftSilicon instance;
@EventHandler @Mod.EventHandler
public void preInit(FMLPreInitializationEvent evt) { public void preInit(FMLPreInitializationEvent evt) {
BuildCraftCore.mainConfiguration.save(); BuildCraftCore.mainConfiguration.save();
@ -72,17 +69,13 @@ public class BuildCraftSilicon extends BuildCraftMod {
assemblyTableBlock = new BlockLaserTable(); assemblyTableBlock = new BlockLaserTable();
CoreProxy.proxy.registerBlock(assemblyTableBlock, ItemLaserTable.class); CoreProxy.proxy.registerBlock(assemblyTableBlock, ItemLaserTable.class);
LanguageRegistry.addName(new ItemStack(assemblyTableBlock, 0, 0), "Assembly Table");
LanguageRegistry.addName(new ItemStack(assemblyTableBlock, 0, 1), "Advanced Crafting Table");
LanguageRegistry.addName(new ItemStack(assemblyTableBlock, 0, 2), "Integration Table");
redstoneChipset = new ItemRedstoneChipset(); redstoneChipset = new ItemRedstoneChipset();
redstoneChipset.setUnlocalizedName("redstoneChipset"); redstoneChipset.setUnlocalizedName("redstoneChipset");
CoreProxy.proxy.registerItem(redstoneChipset); CoreProxy.proxy.registerItem(redstoneChipset);
redstoneChipset.registerItemStacks(); redstoneChipset.registerItemStacks();
} }
@EventHandler @Mod.EventHandler
public void init(FMLInitializationEvent evt) { public void init(FMLInitializationEvent evt) {
channels = NetworkRegistry.INSTANCE.newChannel channels = NetworkRegistry.INSTANCE.newChannel
(DefaultProps.NET_CHANNEL_NAME + "-SILICON", new PacketHandlerSilicon()); (DefaultProps.NET_CHANNEL_NAME + "-SILICON", new PacketHandlerSilicon());
@ -187,7 +180,7 @@ public class BuildCraftSilicon extends BuildCraftMod {
BuildcraftRecipes.assemblyTable.addRecipe(energyCost, ItemGate.makeGateItem(material, GateLogic.OR), inputs); BuildcraftRecipes.assemblyTable.addRecipe(energyCost, ItemGate.makeGateItem(material, GateLogic.OR), inputs);
} }
@EventHandler @Mod.EventHandler
public void processIMCRequests(FMLInterModComms.IMCEvent event) { public void processIMCRequests(FMLInterModComms.IMCEvent event) {
InterModComms.processIMC(event); InterModComms.processIMC(event);
} }

View file

@ -109,15 +109,12 @@ import buildcraft.transport.triggers.TriggerPipeContents.PipeContents;
import buildcraft.transport.triggers.TriggerPipeSignal; import buildcraft.transport.triggers.TriggerPipeSignal;
import buildcraft.transport.triggers.TriggerRedstoneFaderInput; import buildcraft.transport.triggers.TriggerRedstoneFaderInput;
import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent; import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(version = Version.VERSION, modid = "BuildCraft|Transport", name = "Buildcraft Transport", dependencies = DefaultProps.DEPENDENCY_CORE) @Mod(version = Version.VERSION, modid = "BuildCraft|Transport", name = "Buildcraft Transport", dependencies = DefaultProps.DEPENDENCY_CORE)
public class BuildCraftTransport extends BuildCraftMod { public class BuildCraftTransport extends BuildCraftMod {
@ -185,7 +182,7 @@ public class BuildCraftTransport extends BuildCraftMod {
public IIconProvider pipeIconProvider = new PipeIconProvider(); public IIconProvider pipeIconProvider = new PipeIconProvider();
public IIconProvider wireIconProvider = new WireIconProvider(); public IIconProvider wireIconProvider = new WireIconProvider();
@Instance("BuildCraft|Transport") @Mod.Instance("BuildCraft|Transport")
public static BuildCraftTransport instance; public static BuildCraftTransport instance;
private static class PipeRecipe { private static class PipeRecipe {
@ -239,7 +236,7 @@ public class BuildCraftTransport extends BuildCraftMod {
} }
private static LinkedList<PipeRecipe> pipeRecipes = new LinkedList<PipeRecipe>(); private static LinkedList<PipeRecipe> pipeRecipes = new LinkedList<PipeRecipe>();
@EventHandler @Mod.EventHandler
public void preInit(FMLPreInitializationEvent evt) { public void preInit(FMLPreInitializationEvent evt) {
try { try {
Property durability = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "pipes.durability", DefaultProps.PIPES_DURABILITY); Property durability = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "pipes.durability", DefaultProps.PIPES_DURABILITY);
@ -314,7 +311,6 @@ public class BuildCraftTransport extends BuildCraftMod {
pipeWaterproof = new ItemBuildCraft(CreativeTabBuildCraft.TIER_2); pipeWaterproof = new ItemBuildCraft(CreativeTabBuildCraft.TIER_2);
pipeWaterproof.setUnlocalizedName("pipeWaterproof"); pipeWaterproof.setUnlocalizedName("pipeWaterproof");
LanguageRegistry.addName(pipeWaterproof, "Pipe Sealant");
CoreProxy.proxy.registerItem(pipeWaterproof); CoreProxy.proxy.registerItem(pipeWaterproof);
genericPipeBlock = new BlockGenericPipe(); genericPipeBlock = new BlockGenericPipe();
@ -364,7 +360,6 @@ public class BuildCraftTransport extends BuildCraftMod {
// 1, 0), Block.glass, new ItemStack(Item.dyePowder, 1, 11)); // 1, 0), Block.glass, new ItemStack(Item.dyePowder, 1, 11));
pipeWire = new ItemPipeWire(); pipeWire = new ItemPipeWire();
LanguageRegistry.addName(pipeWire, "Pipe Wire");
CoreProxy.proxy.registerItem(pipeWire); CoreProxy.proxy.registerItem(pipeWire);
PipeWire.item = pipeWire; PipeWire.item = pipeWire;
@ -422,7 +417,7 @@ public class BuildCraftTransport extends BuildCraftMod {
} }
} }
@EventHandler @Mod.EventHandler
public void init(FMLInitializationEvent evt) { public void init(FMLInitializationEvent evt) {
channels = NetworkRegistry.INSTANCE.newChannel channels = NetworkRegistry.INSTANCE.newChannel
(DefaultProps.NET_CHANNEL_NAME + "-TRANSPORT", new PacketHandlerTransport()); (DefaultProps.NET_CHANNEL_NAME + "-TRANSPORT", new PacketHandlerTransport());
@ -458,7 +453,7 @@ public class BuildCraftTransport extends BuildCraftMod {
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler()); NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
} }
@EventHandler @Mod.EventHandler
public void postInit(FMLPostInitializationEvent evt) { public void postInit(FMLPostInitializationEvent evt) {
ItemFacade.initialize(); ItemFacade.initialize();
} }
@ -478,9 +473,9 @@ public class BuildCraftTransport extends BuildCraftMod {
} }
CoreProxy.proxy.addCraftingRecipe(new ItemStack(filteredBufferBlock, 1), CoreProxy.proxy.addCraftingRecipe(new ItemStack(filteredBufferBlock, 1),
new Object[]{"wdw", "wcw", "wpw", 'w', "plankWood", 'd', "wdw", "wcw", "wpw", 'w', "plankWood", 'd',
BuildCraftTransport.pipeItemsDiamond, 'c', Blocks.chest, 'p', BuildCraftTransport.pipeItemsDiamond, 'c', Blocks.chest, 'p',
Blocks.piston}); Blocks.piston);
//Facade turning helper //Facade turning helper
GameRegistry.addRecipe(facadeItem.new FacadeRecipe()); GameRegistry.addRecipe(facadeItem.new FacadeRecipe());
@ -489,7 +484,7 @@ public class BuildCraftTransport extends BuildCraftMod {
BuildcraftRecipes.assemblyTable.addRecipe(1000, new ItemStack(plugItem, 8), new ItemStack(pipeStructureCobblestone)); BuildcraftRecipes.assemblyTable.addRecipe(1000, new ItemStack(plugItem, 8), new ItemStack(pipeStructureCobblestone));
} }
@EventHandler @Mod.EventHandler
public void processIMCRequests(IMCEvent event) { public void processIMCRequests(IMCEvent event) {
InterModComms.processIMC(event); InterModComms.processIMC(event);
} }
@ -501,7 +496,6 @@ public class BuildCraftTransport extends BuildCraftMod {
ItemPipe res = BlockGenericPipe.registerPipe(clas, creativeTab); ItemPipe res = BlockGenericPipe.registerPipe(clas, creativeTab);
res.setUnlocalizedName(clas.getSimpleName()); res.setUnlocalizedName(clas.getSimpleName());
LanguageRegistry.addName(res, descr);
// Add appropriate recipe to temporary list // Add appropriate recipe to temporary list
PipeRecipe recipe = new PipeRecipe(); PipeRecipe recipe = new PipeRecipe();

View file

@ -60,7 +60,7 @@ public class SchematicEntity extends Schematic {
pos = transform.translate(pos); pos = transform.translate(pos);
cpt.setTag("Pos", cpt.setTag("Pos",
this.newDoubleNBTList(new double[] { pos.x, pos.y, pos.z })); this.newDoubleNBTList(pos.x, pos.y, pos.z));
inventorySlotsToBlueprint(registry, cpt); inventorySlotsToBlueprint(registry, cpt);
} }
@ -73,7 +73,7 @@ public class SchematicEntity extends Schematic {
pos = transform.translate(pos); pos = transform.translate(pos);
cpt.setTag("Pos", cpt.setTag("Pos",
this.newDoubleNBTList(new double[] { pos.x, pos.y, pos.z })); this.newDoubleNBTList(pos.x, pos.y, pos.z));
inventorySlotsToWorld(registry, cpt); inventorySlotsToWorld(registry, cpt);
} }
@ -85,15 +85,15 @@ public class SchematicEntity extends Schematic {
nbttaglist.func_150309_d(1), nbttaglist.func_150309_d(2)); nbttaglist.func_150309_d(1), nbttaglist.func_150309_d(2));
pos = context.rotatePositionLeft(pos); pos = context.rotatePositionLeft(pos);
cpt.setTag("Pos", cpt.setTag("Pos",
this.newDoubleNBTList(new double[] { pos.x, pos.y, pos.z })); this.newDoubleNBTList(pos.x, pos.y, pos.z));
nbttaglist = cpt.getTagList("Rotation", 5); nbttaglist = cpt.getTagList("Rotation", 5);
float yaw = nbttaglist.func_150308_e(0); float yaw = nbttaglist.func_150308_e(0);
yaw += 90; yaw += 90;
cpt.setTag( cpt.setTag(
"Rotation", "Rotation",
this.newFloatNBTList(new float[] { yaw, this.newFloatNBTList(yaw,
nbttaglist.func_150308_e(1) })); nbttaglist.func_150308_e(1)));
} }
@Override @Override