Java Code Examples for net.minecraft.block.Block#setCreativeTab()
The following examples show how to use
net.minecraft.block.Block#setCreativeTab() .
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: RoutiductBlocks.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
public static void register(Block block, RegistryEvent.Register<Block> event, String... oreNames) { block.setCreativeTab(CommunityGlobals.TAB); event.getRegistry().register(block); ItemBlock itemBlock = new ItemBlock(block); ShootingStar.registerModel(new ModelCompound(RoutiductConstants.MOD_ID, itemBlock)); itemBlock.setRegistryName(block.getRegistryName()); ForgeRegistries.ITEMS.register(itemBlock); for (String oreName : oreNames) { OreDictionary.registerOre(oreName, block); } }
Example 5
Source File: RecipeBuilder.java From EmergingTechnology with MIT License | 5 votes |
private static void removeBlockRecipe(IForgeRegistryModifiable<IRecipe> registry, Block block) { block.setCreativeTab(null); IRecipe p = (IRecipe) registry.getValue(block.getRegistryName()); registry.remove(block.getRegistryName()); registry.register(new EmptyRecipe(p)); }
Example 6
Source File: BlockLoader.java From TofuCraftReload with MIT License | 4 votes |
private static void register(Block block, Item itemBlock, String string) { block.setCreativeTab(CommonProxy.tab); BlockRegister.register(TofuMain.MODID, block, itemBlock, string); }
Example 7
Source File: BlockLoader.java From Sakura_mod with MIT License | 4 votes |
private static void register(Block block, Item itemBlock, String string) { block.setCreativeTab(CommonProxy.tab); BlockRegister.register(SakuraMain.MODID, block, itemBlock, string); }