Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hi,

I have a texture for an item that doesn't load (has default texture).

Here is the debug output:

[11:01:06] [Client thread/ERROR] [FML]: Model definition for location ultracraft:item.SteelIngot#inventory not found

Here is the .json file:

 

{

    "parent": "builtin/generated",

    "textures": {

        "layer0": "ultracraft:items/SteelIngot"

    },

    "display": {

        "thirdperson": {

            "rotation": [ -90, 0, 0 ],

            "translation": [ 0, 1, -3 ],

            "scale": [ 0.55, 0.55, 0.55 ]

        },

        "firstperson": {

            "rotation": [ 0, -135, 25 ],

            "translation": [ 0, 4, 2 ],

            "scale": [ 1.7, 1.7, 1.7 ]

        }

    }

}

 

Here is how I set the texture in the init method:

 

steelIngot = new SteelIngot();

 

ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher();

String name = UltraCraft.MODID + ":" + steelIngot.getUnlocalizedName();

mesher.register(steelIngot, 0, new ModelResourceLocation(name, "inventory"));

 

GameRegistry.registerItem(steelIngot, steelIngot.getUnlocalizedName(), UltraCraft.MODID);

 

 

And here is my SteelIngot class:

 

package uc.items;

 

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.item.Item;

import net.minecraftforge.fml.common.Mod.EventHandler;

import net.minecraftforge.fml.common.event.FMLInitializationEvent;

import net.minecraftforge.fml.common.registry.GameRegistry;

import uc.mainmod.UltraCraft;

 

public class SteelIngot extends Item {

public SteelIngot() {

setMaxStackSize(64);

setCreativeTab(UltraCraft.mechanicalItemsTab);

setUnlocalizedName("SteelIngot");

}

}

 

Sup bruh.

Your JSON file is called

SteelIngot.json

, but you tell it to search for

item.SteelIngot.json

...

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

yeah, I think I responded to same/similar question on other thread. For some dumb reason, the getUnlocalizedName() is not symmetric with the setUnlocalizedName() because you'll get back the name with "item." prepended to your name. So I usually add a .substring(5) to the getUnlocalizedName() to get just the name.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

  • Author

Oh my gosh, thank you SO much! It has taken me so long to find an answer like this! Kudos to you!  :)

Sup bruh.

Guest
This topic is now closed to further replies.

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.