Java Code Examples for net.minecraft.item.Item#setRegistryName()

The following examples show how to use net.minecraft.item.Item#setRegistryName() . These examples are extracted from open source projects. 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
protected void initItem(Item item, ContentHelper helper)
    this.item = item;

    item.setUnlocalizedName(helper.getModId() + "." + id);
Example 2
private static Item registerItem(Item item, String name, MetalMaterial metal, CreativeTabs tab){
	item.setRegistryName(BaseMetals.MODID, name);
	itemRegistry.put(item, name);
	if(tab != null){
	if(metal != null){
		itemsByMetal.computeIfAbsent(metal, (MetalMaterial g)->new ArrayList<>());
	return item;