Java Code Examples for net.minecraft.block.Block#setTranslationKey()
The following examples show how to use
net.minecraft.block.Block#setTranslationKey() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PokeMod.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
private static <T extends IForgeRegistryEntry<T>> T setup(final IForgeRegistryEntry<T> entry, final ResourceLocation registryName) { if (entry instanceof Item) { final Item item = (Item) entry; item.setTranslationKey(MOD_ID + "." + registryName.getPath()); item.setCreativeTab(TAB); } else if (entry instanceof Block) { final Block block = (Block) entry; block.setTranslationKey(MOD_ID + "." + registryName.getPath()); block.setCreativeTab(TAB); } return entry.setRegistryName(registryName); }
Example 2
Source File: Squirrel.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
private static <T extends IForgeRegistryEntry<T>> T setup(final IForgeRegistryEntry<T> entry, final ResourceLocation registryName) { if (entry instanceof Item) { final Item item = (Item) entry; item.setTranslationKey(MOD_ID + "." + registryName.getPath()); item.setCreativeTab(TAB); } else if (entry instanceof Block) { final Block block = (Block) entry; block.setTranslationKey(MOD_ID + "." + registryName.getPath()); block.setCreativeTab(TAB); } return entry.setRegistryName(registryName); }
Example 3
Source File: NeatNetherBlocks.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
public static Block registerBlock(Block block, String name, IForgeRegistry<Block> r) { block.setTranslationKey(CommunityGlobals.MOD_ID + "." + name); block.setRegistryName(new ResourceLocation(CommunityGlobals.MOD_ID, name)); block.setCreativeTab(CommunityGlobals.TAB); r.register(block); return block; }
Example 4
Source File: SubmodGnomes.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
private static Block registerBlock(IForgeRegistry<Block> registry, Block newBlock, String name) { name = appendPrefix(name); newBlock.setTranslationKey(name); newBlock.setRegistryName(name); registry.register(newBlock); return newBlock; }
Example 5
Source File: SubmodAnts.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
private static Block registerBlock(IForgeRegistry<Block> registry, Block newBlock, String name) { name = appendPrefix(name); newBlock.setTranslationKey(name); newBlock.setRegistryName(name); registry.register(newBlock); return newBlock; }
Example 6
Source File: SubmodIntradimensionalPortals.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
private static Block registerBlock(IForgeRegistry<Block> registry, Block newBlock, String name) { name = appendPrefix(name); newBlock.setTranslationKey(name); newBlock.setRegistryName(name); registry.register(newBlock); return newBlock; }