@Override public Block setUnlocalizedName(String name) { this.name = name; name = modName + "." + name; return super.setUnlocalizedName(name); }
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.setUnlocalizedName( "appliedenergistics2." + this.registryName );
@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 registerBlockWithItem(Block block, String registryname) { block.setRegistryName(JurassiCraft.MODID, registryname); block.setUnlocalizedName(registryname); ItemBlock ib = new ItemBlock(block); ib.setRegistryName(JurassiCraft.MODID, registryname); blocksToReg.add(block); itemsToReg.add(ib); blockItems.put(block, ib); }
@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; }
/** 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; }
protected void registerBlock( final Block block, final ItemBlock item, final String name ) { block.setCreativeTab( creativeTab ); item.setRegistryName( ChiselsAndBits.MODID, name ); block.setRegistryName( ChiselsAndBits.MODID, name ); block.setUnlocalizedName( unlocalizedPrefix + name ); item.setUnlocalizedName( unlocalizedPrefix + name ); registeredBlocks.add( block ); registeredItems.add( item ); } }
BlockEnum(String internalName, Block block, Function<Block, ItemBlock> factory, Integration.Mods mod) { this.internalName = internalName; this.block = block; this.block.setUnlocalizedName("extracells.block." + this.internalName); this.block.setRegistryName(internalName); this.item = factory.apply(block); this.item.setRegistryName(block.getRegistryName()); this.mod = mod; if (mod == null || mod.isEnabled()) { this.block.setCreativeTab(CreativeTabEC.INSTANCE); } }
/** Register this block **/ default T register(String name) { Block block = (Block) this; block.setUnlocalizedName(name.replace("_", ".")); block.setRegistryName(new ResourceLocation(MODID, name)); GameRegistry.register(block); getItemBlock().register(name); //Register the item block return (T) this; }
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) { fakecannonblock = new FakeCannonBlock(Material.IRON).setHardness(5f).setUnlocalizedName("fakecannonblock").setRegistryName(getModID(), "fakecannonblock"); event.getRegistry().register(fakecannonblock); }
@Override public void registerBlocks(RegistryEvent.Register<Block> event) { etheriumOre = new BlockEtheriumOre(Material.ROCK).setHardness(3f).setUnlocalizedName("etheriumore").setRegistryName(getModID(), "etheriumore").setCreativeTab(ValkyrienWarfareMod.vwTab); skydungeon_controller = new BlockSkyTempleController(Material.GLASS).setHardness(15f).setUnlocalizedName("skydungeon_controller").setRegistryName(getModID(), "skydungeon_controller").setCreativeTab(ValkyrienWarfareMod.vwTab); quartz_fence = new BlockQuartzFence(Material.GLASS).setHardness(8f).setUnlocalizedName("quartz_fence").setRegistryName(getModID(), "quartz_fence").setCreativeTab(ValkyrienWarfareMod.vwTab); event.getRegistry().register(etheriumOre); event.getRegistry().register(skydungeon_controller); event.getRegistry().register(quartz_fence); }
@Override public void create() { basin = new BlockBasin(Material.IRON) .setHardness(2.5F) .setUnlocalizedName(ModInfo.MODID + ".basin") .setCreativeTab(VeganOption.creativeTab) .setRegistryName(ModInfo.MODID_LOWER, "basin"); GameRegistry.register(basin); GameRegistry.register(new ItemBlock(basin).setRegistryName(basin.getRegistryName())); GameRegistry.registerTileEntity(TileEntityBasin.class, ModInfo.MODID + ".basin"); }