public static void registerBlockWithCustomItem(Block block, ItemBlock iBlock, String registryname) { block.setRegistryName(JurassiCraft.MODID, registryname); iBlock.setRegistryName(JurassiCraft.MODID, registryname); blocksToReg.add(block); itemsToReg.add(iBlock); blockItems.put(block, iBlock); }
if( item != null ) item.setRegistryName( AppEng.MOD_ID, this.registryName );
final Item uvlblockItem = new ItemBlock( uvlblock ).setRegistryName( uvlblockR );
/** * Registery block at gameregistry. * * @param registry the registry to use. */ @Override public void registerItemBlock(final IForgeRegistry<Item> registry) { registry.register((new ItemBlock(this)).setRegistryName(this.getRegistryName())); } }
/** * Registery block at gameregistry. * * @param registry the registry to use. */ @Override public void registerItemBlock(final IForgeRegistry<Item> registry) { registry.register((new ItemBlock(this)).setRegistryName(this.getRegistryName())); } }
/** * Registery block at gameregistry. * * @param registry the registry to use. */ @Override public void registerItemBlock(final IForgeRegistry<Item> registry) { registry.register((new ItemBlock(this)).setRegistryName(this.getRegistryName())); } }
@SubscribeEvent public static void registerItemBlocks(RegistryEvent.Register<Item> event) { LOGGER.info("Registering ItemBlocks"); ThEBlocks.BLOCKS.forEach(block -> event.getRegistry().register(new ItemBlock(block).setRegistryName(block.getRegistryName()))); }
private static void registerBlock(Block block, ItemBlock item) { if(block.getRegistryName() == null) throw new IllegalArgumentException("A block being registered does not have a registry name and could be successfully registered."); RegistrationHandler.Blocks.add(block); if(item != null) { item.setRegistryName(block.getRegistryName()); RegistrationHandler.Items.add(item); } } }
@Override public <T extends Block> void registerBlock(T block, ItemBlock itemBlock) { registerBlock(block); if (itemBlock.getRegistryName() == null) { itemBlock.setRegistryName(block.getRegistryName()); } registerItem(itemBlock); }
@Override public boolean preInit() { this.setRegistryName("fluid_steam"); ForgeRegistries.BLOCKS.register(this); ItemBlock itemBlock = new ItemBlock(this); itemBlock.setRegistryName(this.getRegistryName()); ForgeRegistries.ITEMS.register(itemBlock); return true; }
@Override public boolean preInit() { this.setRegistryName("fluid_ender"); ForgeRegistries.BLOCKS.register(this); ItemBlock itemBlock = new ItemBlock(this); itemBlock.setRegistryName(this.getRegistryName()); ForgeRegistries.ITEMS.register(itemBlock); config(); return true; }
@Override public boolean preInit() { this.setRegistryName("fluid_crude_oil"); ForgeRegistries.BLOCKS.register(this); ItemBlock itemBlock = new ItemBlock(this); itemBlock.setRegistryName(this.getRegistryName()); ForgeRegistries.ITEMS.register(itemBlock); config(); return true; }
@SuppressWarnings("ConstantConditions") private static void registerItemBlock(IForgeRegistry<Item> r, ItemBlock item) { item.setRegistryName(item.getBlock().getRegistryName()); item.setCreativeTab(item.getBlock().getCreativeTab()); r.register(item); }
@Override public boolean preInit() { this.setRegistryName("fluid_aerotheum"); ForgeRegistries.BLOCKS.register(this); ItemBlock itemBlock = new ItemBlock(this); itemBlock.setRegistryName(this.getRegistryName()); ForgeRegistries.ITEMS.register(itemBlock); config(); return true; }
@Override public boolean preInit() { this.setRegistryName("fluid_redstone"); ForgeRegistries.BLOCKS.register(this); ItemBlock itemBlock = new ItemBlock(this); itemBlock.setRegistryName(this.getRegistryName()); ForgeRegistries.ITEMS.register(itemBlock); config(); return true; }
public static void preInitCommon() { // each instance of your block should have a name that is unique within your mod. use lower case. blockFlameEmitter = (BlockFlameEmitter)(new BlockFlameEmitter().setUnlocalizedName("mbe50_block_flame_emitter_unlocalised_name")); blockFlameEmitter.setRegistryName("mbe50_block_flame_emitter_registry_name"); ForgeRegistries.BLOCKS.register(blockFlameEmitter); // We also need to create and register an ItemBlock for this block otherwise it won't appear in the inventory itemBlockFlameEmitter = new ItemBlock(blockFlameEmitter); itemBlockFlameEmitter.setRegistryName(blockFlameEmitter.getRegistryName()); ForgeRegistries.ITEMS.register(itemBlockFlameEmitter); }
@Override public boolean preInit() { this.setRegistryName("fluid_petrotheum"); ForgeRegistries.BLOCKS.register(this); ItemBlock itemBlock = new ItemBlock(this); itemBlock.setRegistryName(this.getRegistryName()); ForgeRegistries.ITEMS.register(itemBlock); config(); addInteractions(); return true; }
@Override public boolean preInit() { this.setRegistryName("fluid_mana"); ForgeRegistries.BLOCKS.register(this); ItemBlock itemBlock = new ItemBlock(this); itemBlock.setRegistryName(this.getRegistryName()); ForgeRegistries.ITEMS.register(itemBlock); config(); addInteractions(); return true; }
@Override public boolean preInit() { this.setRegistryName("fluid_pyrotheum"); ForgeRegistries.BLOCKS.register(this); ItemBlock itemBlock = new ItemBlock(this); itemBlock.setRegistryName(this.getRegistryName()); ForgeRegistries.ITEMS.register(itemBlock); config(); addInteractions(); return true; } }
@SubscribeEvent public static void registerItems(RegistryEvent.Register<Item> event) { event.getRegistry().register(new ItemBlock(Blockss.tunnel).setRegistryName(Blockss.tunnel.getRegistryName())); event.getRegistry().register(new ItemBlock(Blockss.redstoneTunnel).setRegistryName(Blockss.redstoneTunnel.getRegistryName())); event.getRegistry().register(new ItemBlockWall(Blockss.wall).setRegistryName(Blockss.wall.getRegistryName())); event.getRegistry().register(new ItemBlock(Blockss.wallBreakable).setRegistryName(Blockss.wallBreakable.getRegistryName())); event.getRegistry().register(new ItemBlockMachine(Blockss.machine).setRegistryName(Blockss.machine.getRegistryName())); event.getRegistry().register(new ItemBlockFieldProjector(Blockss.fieldProjector).setRegistryName(Blockss.fieldProjector.getRegistryName())); event.getRegistry().register(new ItemPersonalShrinkingDevice().setTranslationKey("psd").setRegistryName(CompactMachines3.MODID, "psd")); event.getRegistry().register(new ItemTunnelTool().setTranslationKey("tunneltool").setRegistryName(CompactMachines3.MODID, "tunneltool")); event.getRegistry().register(new ItemRedstoneTunnelTool().setTranslationKey("redstonetunneltool").setRegistryName(CompactMachines3.MODID, "redstonetunneltool")); }