Java Code Examples for net.minecraft.item.Item#setUnlocalizedName()
The following examples show how to use
net.minecraft.item.Item#setUnlocalizedName() .
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: ContentBlockBase.java From customstuff4 with GNU General Public License v3.0 | 5 votes |
protected void initItem(Item item, ContentHelper helper) { this.item = item; item.setUnlocalizedName(helper.getModId() + "." + id); item.setRegistryName(id); }
Example 2
Source File: Items.java From BaseMetals with GNU Lesser General Public License v2.1 | 5 votes |
private static Item registerItem(Item item, String name, MetalMaterial metal, CreativeTabs tab){ item.setRegistryName(BaseMetals.MODID, name); item.setUnlocalizedName(BaseMetals.MODID+"."+name); GameRegistry.register(item); itemRegistry.put(item, name); if(tab != null){ item.setCreativeTab(tab); } if(metal != null){ itemsByMetal.computeIfAbsent(metal, (MetalMaterial g)->new ArrayList<>()); itemsByMetal.get(metal).add(item); } return item; }
Example 3
Source File: Items.java From BaseMetals with GNU Lesser General Public License v2.1 | 5 votes |
private static Item create_door(MetalMaterial metal,BlockDoor door){ Item item = new ItemMetalDoor(door,metal); registerItem(item, metal.getName()+"_"+"door"+"_"+"item", metal, ItemGroups.tab_blocks); item.setUnlocalizedName(BaseMetals.MODID+"."+metal.getName()+"_"+"door"); // Dirty Hack to set name right doorMap.put(door, item); return item; }
Example 4
Source File: ToolPL.java From Production-Line with MIT License | 4 votes |
private static void registerItem(String name, Item item) { item.setUnlocalizedName(MOD_NAME + "." + name); // item.setTextureName(RESOURCE_DOMAIN + ":" + "item" + name); item.setCreativeTab(creativeTabPL); GameRegistry.<Item>register(item, new ResourceLocation(MOD_ID, name)); }