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); }
public static void registerBlock(Block block, String registryname) { block.setRegistryName(registryname); block.setUnlocalizedName(registryname); blocksToReg.add(block); }
public static <T extends Block> T setName(T block, String name) { block.setRegistryName(LPConstants.LP_MOD_ID, name); block.setUnlocalizedName(String.format("%s.%s", LPConstants.LP_MOD_ID, name)); return block; }
block.setRegistryName( AppEng.MOD_ID, this.registryName ); block.setUnlocalizedName( "appliedenergistics2." + this.registryName );
private static <T extends Block> T register(IForgeRegistry<Block> r, String name, T block) { block.setRegistryName(MOD_ID, name); block.setTranslationKey(MOD_ID + "." + name.replace('/', '.')); r.register(block); return block; }
@Override public final @Nonnull <B extends Block> B apply(@Nonnull B blockIn) { blockIn.setUnlocalizedName(getUnlocalisedName()); blockIn.setRegistryName(getRegistryName()); return blockIn; }
@Override public final @Nonnull <B extends Block> B apply(@Nonnull B blockIn) { blockIn.setUnlocalizedName(getUnlocalisedName()); blockIn.setRegistryName(getRegistryName()); return blockIn; }
@Override public final @Nonnull <B extends Block> B apply(@Nonnull B blockIn) { blockIn.setUnlocalizedName(getUnlocalisedName()); blockIn.setRegistryName(getRegistryName()); return blockIn; }
@Override default @Nonnull <B extends Block> B apply(@Nonnull B block) { block.setUnlocalizedName(getUnlocalisedName()); block.setRegistryName(getRegistryName()); return block; }
@Override public final @Nonnull <B extends Block> B apply(@Nonnull B blockIn) { blockIn.setUnlocalizedName(getUnlocalisedName()); blockIn.setRegistryName(getRegistryName()); return blockIn; }
@Override public final @Nonnull <B extends Block> B apply(@Nonnull B blockIn) { blockIn.setUnlocalizedName(getUnlocalisedName()); blockIn.setRegistryName(getRegistryName()); return blockIn; }
@Override public final @Nonnull <B extends Block> B apply(@Nonnull B blockIn) { blockIn.setUnlocalizedName(getUnlocalisedName()); blockIn.setRegistryName(getRegistryName()); return blockIn; }
public static void registerBlock(Block b, String name) { ResourceLocation res = new ResourceLocation(BetterQuesting.MODID + ":" + name); ALL_BLOCKS.add(b.setRegistryName(res)); ALL_ITEMS.add(new ItemBlock(b).setRegistryName(res)); }
}.setLightLevel( 0.2f ).setCreativeTab( CreativeTabs.DECORATIONS ).setRegistryName( uvlblockR );
/** Register this block WITHOUT assigning the item **/ default T registerWithoutItem(String name) { Block block = (Block) this; block.setUnlocalizedName(name.replace("_", ".")); block.setRegistryName(new ResourceLocation(MODID, name)); GameRegistry.register(block); return (T) this; }
public static void registerBlock(Block block, ItemBlockBase itemBlock, String name, boolean addTab){ block.setTranslationKey(ActuallyAdditions.MODID+"."+name); block.setRegistryName(ActuallyAdditions.MODID, name); RegistryHandler.BLOCKS_TO_REGISTER.add(block); itemBlock.setRegistryName(block.getRegistryName()); RegistryHandler.ITEMS_TO_REGISTER.add(itemBlock); block.setCreativeTab(addTab ? CreativeTab.INSTANCE : null); IMCHandler.doBlockIMC(block); if(block instanceof IColorProvidingBlock){ ActuallyAdditions.PROXY.addColoredBlock(block); } }
public static Block registerFluidBlock(Fluid fluid, Block fluidBlock, String name) { fluidBlock.setRegistryName(new ResourceLocation(ToughAsNails.MOD_ID, name)); ForgeRegistries.BLOCKS.register(fluidBlock); ToughAsNails.proxy.registerFluidBlockRendering(fluidBlock, name); fluid.setBlock(fluidBlock); return fluidBlock; }
public void registerBlocks(RegistryEvent.Register<Block> event) { physicsInfuser = new BlockPhysicsInfuser(Material.ROCK).setHardness(12f).setUnlocalizedName("shipblock") .setRegistryName(MODID, "shipblock").setCreativeTab(vwTab); physicsInfuserCreative = new BlockPhysicsInfuserCreative(Material.ROCK).setHardness(12f) .setUnlocalizedName("shipblockcreative").setRegistryName(MODID, "shipblockcreative") .setCreativeTab(vwTab); event.getRegistry().register(physicsInfuser); event.getRegistry().register(physicsInfuserCreative); }
@Override public void registerBlocks(RegistryEvent.Register<Block> event) { gpsBlock = new GPSBlock().setUnlocalizedName("gpsblock").setRegistryName(getModID(), "gpsblock").setCreativeTab(ValkyrienWarfareMod.vwTab); event.getRegistry().register(gpsBlock); }
public static Block registerBlock (Block block, Class<? extends TileEntity> tileEntityClass, String name) { block.setRegistryName(name); GameRegistry.registerTileEntity(tileEntityClass, block.getRegistryName().toString()); block.setCreativeTab(tab); registerItem(new ItemBlock(block), name); blocks.add(block); return block; }