Jump to content

[1.8] Item Model does not load


Cleverpanda

Recommended Posts

I've been trying to solve this for days now... I've made some custom doors and the door item refuses to find Its model...

Sorry for additional post, but for the life of me, nothing works. The door block renders and functions normally.

 

MAIN

public static Block AppleDoor;
public static Item AppleDoorItem;
...

@EventHandler
    public void init(FMLInitializationEvent event)
    {
        String wood = "apple";
AppleDoor = createDoor(wood);
        AppleDoorItem = create_door(wood,(BlockDoor)AppleDoor);
        
        Minecraft.getMinecraft().getRenderItem().getItemModelMesher()
	.register(AppleDoorItem, 0, new ModelResourceLocation(MODID+":"+wood +"_door", "inventory"));
        System.out.println(AppleDoorItem);
}

private static BlockDoor createDoor(String wood){
	BlockDoor block = new BlockVarietyDoor(wood);
	block.setUnlocalizedName(MODID+"."+wood+"_door");
	GameRegistry.registerBlock(block,null,wood+"_door");
	return block;
}
    
    private static Item create_door(String wood,BlockDoor door){
	Item i = new ItemVarietyDoor(wood,door);
	i.setUnlocalizedName(MODID+"."+wood+"_door");
	String regName = wood+"_door";
	GameRegistry.registerItem(i, regName);
	return i;
}

 

ItemVarietyDoor

public class ItemVarietyDoor extends ItemDoor{

public ItemVarietyDoor(String wood,Block block) {
	super(block);
	this.setUnlocalizedName(VarietyTrees.MODID+"."+wood+"_door");
}
}

 

models/item/apple_door.json

{
"parent": "item/door_item",
"textures": {
	"bottom": "varietytrees:blocks/door_apple_lower",
	"top": "varietytrees:blocks/door_apple_upper"
}
}

 

models/block/apple_door_XXX all look basically like this

{
    "parent": "block/door_top",
    "textures": {
        "bottom": "varietytrees:blocks/door_apple_lower",
        "top": "varietytrees:blocks/door_apple_upper"
    }
}

 

blockstates.json

{
    "variants": {
        "facing=east,half=lower,hinge=left,open=false,powered=false":  { "model": "varietytrees:apple_door_bottom" },
        "facing=south,half=lower,hinge=left,open=false,powered=false": { "model": "varietytrees:apple_door_bottom", "y": 90 },
        "facing=west,half=lower,hinge=left,open=false,powered=false":  { "model": "varietytrees:apple_door_bottom", "y": 180 },
        "facing=north,half=lower,hinge=left,open=false,powered=false": { "model": "varietytrees:apple_door_bottom", "y": 270 },
        "facing=east,half=lower,hinge=right,open=false,powered=false":  { "model": "varietytrees:apple_door_bottom_rh" },
        "facing=south,half=lower,hinge=right,open=false,powered=false": { "model": "varietytrees:apple_door_bottom_rh", "y": 90 },
        "facing=west,half=lower,hinge=right,open=false,powered=false":  { "model": "varietytrees:apple_door_bottom_rh", "y": 180 },
        "facing=north,half=lower,hinge=right,open=false,powered=false": { "model": "varietytrees:apple_door_bottom_rh", "y": 270 },
        "facing=east,half=lower,hinge=left,open=true,powered=false":  { "model": "varietytrees:apple_door_bottom_rh", "y": 90 },
        "facing=south,half=lower,hinge=left,open=true,powered=false": { "model": "varietytrees:apple_door_bottom_rh", "y": 180 },
        "facing=west,half=lower,hinge=left,open=true,powered=false":  { "model": "varietytrees:apple_door_bottom_rh", "y": 270 },
        "facing=north,half=lower,hinge=left,open=true,powered=false": { "model": "varietytrees:apple_door_bottom_rh" },
        "facing=east,half=lower,hinge=right,open=true,powered=false":  { "model": "varietytrees:apple_door_bottom", "y": 270 },
        "facing=south,half=lower,hinge=right,open=true,powered=false": { "model": "varietytrees:apple_door_bottom" },
        "facing=west,half=lower,hinge=right,open=true,powered=false":  { "model": "varietytrees:apple_door_bottom", "y": 90 },
        "facing=north,half=lower,hinge=right,open=true,powered=false": { "model": "varietytrees:apple_door_bottom", "y": 180 },
        "facing=east,half=upper,hinge=left,open=false,powered=false":  { "model": "varietytrees:apple_door_top" },
        "facing=south,half=upper,hinge=left,open=false,powered=false": { "model": "varietytrees:apple_door_top", "y": 90 },
        "facing=west,half=upper,hinge=left,open=false,powered=false":  { "model": "varietytrees:apple_door_top", "y": 180 },
        "facing=north,half=upper,hinge=left,open=false,powered=false": { "model": "varietytrees:apple_door_top", "y": 270 },
        "facing=east,half=upper,hinge=right,open=false,powered=false":  { "model": "varietytrees:apple_door_top_rh" },
        "facing=south,half=upper,hinge=right,open=false,powered=false": { "model": "varietytrees:apple_door_top_rh", "y": 90 },
        "facing=west,half=upper,hinge=right,open=false,powered=false":  { "model": "varietytrees:apple_door_top_rh", "y": 180 },
        "facing=north,half=upper,hinge=right,open=false,powered=false": { "model": "varietytrees:apple_door_top_rh", "y": 270 },
        "facing=east,half=upper,hinge=left,open=true,powered=false":  { "model": "varietytrees:apple_door_top_rh", "y": 90 },
        "facing=south,half=upper,hinge=left,open=true,powered=false": { "model": "varietytrees:apple_door_top_rh", "y": 180 },
        "facing=west,half=upper,hinge=left,open=true,powered=false":  { "model": "varietytrees:apple_door_top_rh", "y": 270 },
        "facing=north,half=upper,hinge=left,open=true,powered=false": { "model": "varietytrees:apple_door_top_rh" },
        "facing=east,half=upper,hinge=right,open=true,powered=false":  { "model": "varietytrees:apple_door_top", "y": 270 },
        "facing=south,half=upper,hinge=right,open=true,powered=false": { "model": "varietytrees:apple_door_top" },
        "facing=west,half=upper,hinge=right,open=true,powered=false":  { "model": "varietytrees:apple_door_top", "y": 90 },
        "facing=north,half=upper,hinge=right,open=true,powered=false": { "model": "varietytrees:apple_door_top", "y": 180 },
        
        
        "facing=east,half=lower,hinge=left,open=false,powered=true":  { "model": "varietytrees:apple_door_bottom" },
        "facing=south,half=lower,hinge=left,open=false,powered=true": { "model": "varietytrees:apple_door_bottom", "y": 90 },
        "facing=west,half=lower,hinge=left,open=false,powered=true":  { "model": "varietytrees:apple_door_bottom", "y": 180 },
        "facing=north,half=lower,hinge=left,open=false,powered=true": { "model": "varietytrees:apple_door_bottom", "y": 270 },
        "facing=east,half=lower,hinge=right,open=false,powered=true":  { "model": "varietytrees:apple_door_bottom_rh" },
        "facing=south,half=lower,hinge=right,open=false,powered=true": { "model": "varietytrees:apple_door_bottom_rh", "y": 90 },
        "facing=west,half=lower,hinge=right,open=false,powered=true":  { "model": "varietytrees:apple_door_bottom_rh", "y": 180 },
        "facing=north,half=lower,hinge=right,open=false,powered=true": { "model": "varietytrees:apple_door_bottom_rh", "y": 270 },
        "facing=east,half=lower,hinge=left,open=true,powered=true":  { "model": "varietytrees:apple_door_bottom_rh", "y": 90 },
        "facing=south,half=lower,hinge=left,open=true,powered=true": { "model": "varietytrees:apple_door_bottom_rh", "y": 180 },
        "facing=west,half=lower,hinge=left,open=true,powered=true":  { "model": "varietytrees:apple_door_bottom_rh", "y": 270 },
        "facing=north,half=lower,hinge=left,open=true,powered=true": { "model": "varietytrees:apple_door_bottom_rh" },
        "facing=east,half=lower,hinge=right,open=true,powered=true":  { "model": "varietytrees:apple_door_bottom", "y": 270 },
        "facing=south,half=lower,hinge=right,open=true,powered=true": { "model": "varietytrees:apple_door_bottom" },
        "facing=west,half=lower,hinge=right,open=true,powered=true":  { "model": "varietytrees:apple_door_bottom", "y": 90 },
        "facing=north,half=lower,hinge=right,open=true,powered=true": { "model": "varietytrees:apple_door_bottom", "y": 180 },
        "facing=east,half=upper,hinge=left,open=false,powered=true":  { "model": "varietytrees:apple_door_top" },
        "facing=south,half=upper,hinge=left,open=false,powered=true": { "model": "varietytrees:apple_door_top", "y": 90 },
        "facing=west,half=upper,hinge=left,open=false,powered=true":  { "model": "varietytrees:apple_door_top", "y": 180 },
        "facing=north,half=upper,hinge=left,open=false,powered=true": { "model": "varietytrees:apple_door_top", "y": 270 },
        "facing=east,half=upper,hinge=right,open=false,powered=true":  { "model": "varietytrees:apple_door_top_rh" },
        "facing=south,half=upper,hinge=right,open=false,powered=true": { "model": "varietytrees:apple_door_top_rh", "y": 90 },
        "facing=west,half=upper,hinge=right,open=false,powered=true":  { "model": "varietytrees:apple_door_top_rh", "y": 180 },
        "facing=north,half=upper,hinge=right,open=false,powered=true": { "model": "varietytrees:apple_door_top_rh", "y": 270 },
        "facing=east,half=upper,hinge=left,open=true,powered=true":  { "model": "varietytrees:apple_door_top_rh", "y": 90 },
        "facing=south,half=upper,hinge=left,open=true,powered=true": { "model": "varietytrees:apple_door_top_rh", "y": 180 },
        "facing=west,half=upper,hinge=left,open=true,powered=true":  { "model": "varietytrees:apple_door_top_rh", "y": 270 },
        "facing=north,half=upper,hinge=left,open=true,powered=true": { "model": "varietytrees:apple_door_top_rh" },
        "facing=east,half=upper,hinge=right,open=true,powered=true":  { "model": "varietytrees:apple_door_top", "y": 270 },
        "facing=south,half=upper,hinge=right,open=true,powered=true": { "model": "varietytrees:apple_door_top" },
        "facing=west,half=upper,hinge=right,open=true,powered=true":  { "model": "varietytrees:apple_door_top", "y": 90 },
        "facing=north,half=upper,hinge=right,open=true,powered=true": { "model": "varietytrees:apple_door_top", "y": 180 }
    }
}

 

Console Output:  [FML]: Model definition for location varietytrees:apple_door#inventory not found

 

I've read plenty of tutorials and troubleshooting on this, so please don't send those, either it's not that or I'm not doing it right.

 

Help!

 

 

 

 

Link to comment
Share on other sites

You need to specify it as an object, not an array:

 

        "inventory": [{
            "texture": "varietytrees:items/door_apple"
        }],

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

hm. That changed stuff but didn't fix it.

now Ive got:  MultiModel minecraft:builtin/missing is empty (no base model or parts were provided/resolved)

Which I don't think is important.

 

And "Model definition not found" went away, but the item is still the missing model cube.

You shoudl be using ModelLoader.setCustomModelResourceLocation(...) instead of the ItemModelMesher.register(...) and it belongs in preInit.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Blocks and Items need to be registered in preInit. You call

ModelLoader.setCustomModelResourceLocation

in your ClientProxy at the end of preInit, so your Blocks and Items will already be registered.

 

Also, you need to update to 1.10.2. 1.7.10 is no longer supported, and 1.8 won't be supported very soon, if it isn't already.

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/

Link to comment
Share on other sites

Unfortunately, that also did not work, and I have no other useful info to give.

And i'm developing for 1.8 through 1.10.2, I just start with 1.8.

You should post updated code and the log if there are any errors.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Turning the Tables: My Journey to Reclaim Stolen Bitcoins with Expert Help. When my Bitcoin wallet was hacked and my entire cryptocurrency portfolio was stolen, I felt utterly devastated and hopeless. Having worked hard to build up my digital assets, the sudden loss was gut-wrenching. It felt like my financial future had been ripped away in an instant, leaving me overwhelmed by a sense of betrayal and despair. In my search for help, I discovered TECH CYBER FORCE Recovery, a renowned cybersecurity firm specializing in cryptocurrency recovery. I was met with professionalism and empathy from my first contact with them. The team demonstrated a steadfast commitment to helping me retrieve my stolen Bitcoins. They understood the emotional toll of my situation and approached my case with genuine concern. TECH CYBER FORCE Recovery swung into action immediately, leveraging its extensive expertise in blockchain forensics and hacker tracking techniques. Their process was meticulous. They analyzed my transaction history, followed the digital trail left by the hackers, and worked diligently to pinpoint the location of the stolen funds. I was impressed by their technical prowess; they employed advanced cryptographic methods and strategic negotiations with the perpetrators, all while keeping me informed about their progress. The recovery process was complex and fraught with challenges. However, the tenacity displayed by the team was truly awe-inspiring. They navigated cryptocurrency crime's murky and ever-evolving landscape with skill and determination. After a series of strategic moves, they managed to recover the majority of my Bitcoins successfully.  
    • I removed giacomos_hud, oculus, (dont know what you mean with iris), enhanced_boss_bars, epicfight and essential.  Server still doesnt want to boot. new logs after removing: https://pastebin.com/LuM2PFtN I dont quite understand the "server side" and "client side" difference..
    • There are client side only mods in your server files   Remove giacomos_hud, oculus, iris, enhanced_boss_bars and epicfight You can keep these mods in your client Maybe also remove essentials
    • Here is my Log with java 17: https://pastebin.com/RPdWSjwq
    • Been working on creating a server for this mod, but i keep getting this error over and over again.  I have tried updating/changing the Forge launcher, Removing/replacing the ops.json and whitelist.json folders, and removing certain mods. Crash report log: https://pastebin.com/Bu046cVq Debug.log https://pastebin.com/7hKm40ke Latest.log https://pastebin.com/nCRLUH3b any help would be great thanks!
  • Topics

×
×
  • Create New...

Important Information

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