private Item createPipeSpecial(Class<? extends Pipe<?>> clas) { ItemPipe item = new ItemPipeAP(); item.setUnlocalizedName(clas.getSimpleName()); proxy.registerPipeRendering(item); BlockGenericPipe.pipes.put(item, clas); GameRegistry.registerItem(item, item.getUnlocalizedName()); proxy.createPipeSpecial(item, clas); return item; }
private static Item createPipe(Class<? extends Pipe<?>> clas) { Item res = BlockGenericPipe.registerPipe(clas, CreativeTabBuildCraft.PIPES); res.setUnlocalizedName(clas.getSimpleName()); proxy.registerPipeRendering(res); return res; }
@EventHandler public void init(FMLInitializationEvent event) { NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler()); logger.info("Registering chunk load handler"); ForgeChunkManager.setForcedChunkLoadingCallback(this, new ChunkLoadingHandler()); chunkLoadViewer = new ChunkLoadViewDataProxy(chunkSightRange); FMLCommonHandler.instance().bus().register(chunkLoadViewer); proxy.registerKeyHandler(); proxy.registerRendering(); loadConfigs(true); logger.info("Registering pipes"); loadPipes(); triggerPipeClosed = new TriggerPipeClosed("APClosed"); ActionManager.registerTriggerProvider(new GateProvider()); if (allowWRRemove) { // Additional Pipes GameRegistry.addRecipe( new ItemStack(pipeItemsTeleport), new Object[] {"A", 'A', pipePowerTeleport}); GameRegistry.addRecipe( new ItemStack(pipeItemsTeleport), new Object[] {"A", 'A', pipeLiquidsTeleport}); GameRegistry.addRecipe( new ItemStack(pipeItemsRedStone), new Object[] {"A", 'A', pipeLiquidsRedstone}); // BC Liquid GameRegistry.addRecipe( new ItemStack(BuildCraftTransport.pipeItemsCobblestone), new Object[] {"A", 'A', BuildCraftTransport.pipeFluidsCobblestone}); GameRegistry.addRecipe( new ItemStack(BuildCraftTransport.pipeItemsGold), new Object[] {"A", 'A', BuildCraftTransport.pipeFluidsGold}); GameRegistry.addRecipe( new ItemStack(BuildCraftTransport.pipeItemsIron), new Object[] {"A", 'A', BuildCraftTransport.pipeFluidsIron}); GameRegistry.addRecipe( new ItemStack(BuildCraftTransport.pipeItemsStone), new Object[] {"A", 'A', BuildCraftTransport.pipeFluidsStone}); GameRegistry.addRecipe( new ItemStack(BuildCraftTransport.pipeItemsWood), new Object[] {"A", 'A', BuildCraftTransport.pipeFluidsWood}); // BC Power GameRegistry.addRecipe( new ItemStack(BuildCraftTransport.pipeItemsGold), new Object[] {"A", 'A', BuildCraftTransport.pipePowerGold}); GameRegistry.addRecipe( new ItemStack(BuildCraftTransport.pipeItemsStone), new Object[] {"A", 'A', BuildCraftTransport.pipePowerStone}); GameRegistry.addRecipe( new ItemStack(BuildCraftTransport.pipeItemsWood), new Object[] {"A", 'A', BuildCraftTransport.pipePowerWood}); } // ChunkLoader blockChunkLoader = new BlockChunkLoader(); blockChunkLoader.setBlockName("TeleportTether"); GameRegistry.registerBlock(blockChunkLoader, ItemBlock.class, "chunkLoader"); GameRegistry.registerTileEntity(TileChunkLoader.class, "TeleportTether"); GameRegistry.addRecipe( new ItemStack(blockChunkLoader), new Object[] { "iii", "iLi", "iii", 'i', Items.iron_ingot, 'L', new ItemStack(Items.dye, 1, 4) }); }