Java Code Examples for net.minecraft.creativetab.CreativeTabs#tabTransport()
The following examples show how to use
net.minecraft.creativetab.CreativeTabs#tabTransport() .
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: CategoryConverter.java From NOVA-Core with GNU Lesser General Public License v3.0 | 5 votes |
public CreativeTabs toNative(Category category, ItemStack item) { if (category.name.startsWith("nova:")) { switch (category.name) { case Category.BUILDING_BLOCKS_NAME: return CreativeTabs.tabBlock; case Category.DECORATIONS_NAME: return CreativeTabs.tabDecorations; case Category.TECHNOLOGY_NAME: return CreativeTabs.tabRedstone; case Category.TRANSPORTATION_NAME: return CreativeTabs.tabTransport; case Category.FOOD_NAME: return CreativeTabs.tabFood; case Category.TOOLS_NAME: return CreativeTabs.tabTools; case Category.COMBAT_NAME: return CreativeTabs.tabCombat; case Category.ALCHEMY_NAME: return CreativeTabs.tabBrewing; case Category.MATERIALS_NAME: return CreativeTabs.tabMaterials; case Category.MISCELLANEOUS_NAME: return CreativeTabs.tabMisc; } } return Arrays.stream(CreativeTabs.creativeTabArray) .filter(tab -> tab.getTabLabel().equals(category.name)) .findFirst() .orElseGet(() -> new ModCreativeTab(category.name, category.item.map(ItemConverter.instance()::toNative).orElse(item))); }
Example 2
Source File: CategoryConverter.java From NOVA-Core with GNU Lesser General Public License v3.0 | 5 votes |
public CreativeTabs toNative(Category category, ItemStack item) { if (category.name.startsWith("nova:")) { switch (category.name) { case Category.BUILDING_BLOCKS_NAME: return CreativeTabs.tabBlock; case Category.DECORATIONS_NAME: return CreativeTabs.tabDecorations; case Category.TECHNOLOGY_NAME: return CreativeTabs.tabRedstone; case Category.TRANSPORTATION_NAME: return CreativeTabs.tabTransport; case Category.FOOD_NAME: return CreativeTabs.tabFood; case Category.TOOLS_NAME: return CreativeTabs.tabTools; case Category.COMBAT_NAME: return CreativeTabs.tabCombat; case Category.ALCHEMY_NAME: return CreativeTabs.tabBrewing; case Category.MATERIALS_NAME: return CreativeTabs.tabMaterials; case Category.MISCELLANEOUS_NAME: return CreativeTabs.tabMisc; } } return Arrays.stream(CreativeTabs.creativeTabArray) .filter(tab -> tab.getTabLabel().equals(category.name)) .findFirst() .orElseGet(() -> new ModCreativeTab(category.name, category.item.map(ItemConverter.instance()::toNative).orElse(item))); }