Jump to content

Error loading items


Hekaryn

Recommended Posts

I know there are hundreds of posts on forums about this but none of them actually helped me

 

I get this error:

Quote

[main/ERROR] [FML]: Exception loading model for variant tm:wand#inventory for item "tm:wand", normal location exception: 
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model tm:item/wand with loader VanillaLoader.INSTANCE, skipping
    at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:161) ~[ModelLoaderRegistry.class:?]
    at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:302) ~[ModelLoader.class:?]
    at net.minecraft.client.renderer.block.model.ModelBakery.loadVariantItemModels(ModelBakery.java:175) ~[ModelBakery.class:?]
    at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:151) ~[ModelLoader.class:?]
    at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:121) [SimpleReloadableResourceManager.class:?]
    at net.minecraft.client.Minecraft.init(Minecraft.java:559) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_221]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_221]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_221]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_221]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_221]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_221]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_221]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_221]
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
    at GradleStart.main(GradleStart.java:25) [start/:?]
Caused by: java.io.FileNotFoundException: tm:models/item/wand.json

    at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:69) ~[SimpleReloadableResourceManager.class:?]
    at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:334) ~[ModelBakery.class:?]
    at net.minecraftforge.client.model.ModelLoader.access$1400(ModelLoader.java:115) ~[ModelLoader.class:?]
    at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:861) ~[ModelLoader$VanillaLoader.class:?]
    at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:157) ~[ModelLoaderRegistry.class:?]
    ... 20 more
[19:42:30] [main/ERROR] [FML]: Exception loading model for variant tm:wand#inventory for item "tm:wand", blockstate location exception: 
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model tm:wand#inventory with loader VariantLoader.INSTANCE, skipping
    at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:161) ~[ModelLoaderRegistry.class:?]
    at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:296) ~[ModelLoader.class:?]
    at net.minecraft.client.renderer.block.model.ModelBakery.loadVariantItemModels(ModelBakery.java:175) ~[ModelBakery.class:?]
    at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:151) ~[ModelLoader.class:?]
    at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:121) [SimpleReloadableResourceManager.class:?]
    at net.minecraft.client.Minecraft.init(Minecraft.java:559) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_221]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_221]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_221]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_221]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_221]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_221]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_221]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_221]
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
    at GradleStart.main(GradleStart.java:25) [start/:?]
Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException
    at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:83) ~[ModelBlockDefinition.class:?]
    at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1175) ~[ModelLoader$VariantLoader.class:?]
    at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:157) ~[ModelLoaderRegistry.class:?]
    ... 20 more

About the part it says "Caused by: java.io.FileNotFoundException: tm:models/item/wand.json", I am sure the file is there

 

Look at my .json

Quote

{
    "parent": "item/generated",
    "textures": {
        "layer0": "tm:items/wand"
    }
}

 

When I enter the game, the item is named "item.wand.name"

Link to comment
Share on other sites

I dont really want to compare your code to mine just cause its tedious, so what i'll do is link you to my github, you can look i do it EXACTLY the same way, except i use other methods

public static final Item ORANGESEED = new OrangeSeed("orangeseed", CreativeTabs.MATERIALS);  My mod says this yours would say
public static final Item ORANGESEED = new ItemBase("orangeseed", CreativeTabs.MATERIALS);

This is the only difference, My json are also in the github so you can just check make sure its all the same, check my main class as well!

I used those same videos and they also did not work for me! I had to make some changes

 

https://github.com/drizzs/GrassWorld/blob/master/src/main/java/com/drizzs/grassworld/init/ModItems.java
https://github.com/drizzs/GrassWorld/blob/master/src/main/java/com/drizzs/grassworld/items/ItemBase.java
https://github.com/drizzs/GrassWorld/tree/master/src/main/java/com/drizzs/grassworld/proxy
https://github.com/drizzs/GrassWorld/tree/master/src/main/java/com/drizzs/grassworld/util
 

Edited by Drizzs
Link to comment
Share on other sites

21 minutes ago, Drizzs said:

I dont really want to compare your code to mine just cause its tedious, so what i'll do is link you to my github, you can look i do it EXACTLY the same way, except i use other methods

public static final Item ORANGESEED = new OrangeSeed("orangeseed", CreativeTabs.MATERIALS);  My mod says this yours would say
public static final Item ORANGESEED = new ItemBase("orangeseed", CreativeTabs.MATERIALS);

This is the only difference, My json are also in the github so you can just check make sure its all the same, check my main class as well!

I used those same videos and they also did not work for me! I had to make some changes

 

https://github.com/drizzs/GrassWorld/blob/master/src/main/java/com/drizzs/grassworld/init/ModItems.java
https://github.com/drizzs/GrassWorld/blob/master/src/main/java/com/drizzs/grassworld/items/ItemBase.java
https://github.com/drizzs/GrassWorld/tree/master/src/main/java/com/drizzs/grassworld/proxy
https://github.com/drizzs/GrassWorld/tree/master/src/main/java/com/drizzs/grassworld/util
 


I don't get it, I checked it and it's exactly the same thing, then why am I getting errors?

Link to comment
Share on other sites

did you check the json files too? make sure the names are all correct. The beauty of what i sent is that it works completely so it does load actual textures! Do you crash or does it just not show a texture? Whats happening show me a photo if its ingame!

Also keep in mind i called my main mod file com.drizzs.grassworld and made my modid the same so all my things match, yours dont match idk if that matters but it just makes things nicer and more organized if things are the same!

Also did you modify your modinfo file?

Edited by Drizzs
Link to comment
Share on other sites

Also, make your mod ID longer. You have a limit of 64 characters. Use them.

  • Like 1

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

4 minutes ago, Drizzs said:

did you check the json files too? make sure the names are all correct. The beauty of what i sent is that it works completely so it does load actual textures! Do you crash or does it just not show a texture? Whats happening show me a photo if its ingame!

I did check the json files, they are identical. The game loads but this happens:

Screenshot_1.png

Screenshot_2.png

Link to comment
Share on other sites

that looks like a json problem

 
Quote

 

{
"parent": "item/generated",
"textures": {
"layer0": "grassworld:items/blueseed"
}

}

 

this is a working json for sure

Change the name of your mod and your mod ID to tutorialmod like that, and make your resource file the same. and see if that solves it.

Edited by Drizzs
Link to comment
Share on other sites

im not asking you if its the json i'm telling you that it is, thats what this issue is, the item generates ingame it exists. The issue is with your resources for sure.

so like i said make your mod name your modid and your assets name the same

Edited by Drizzs
Link to comment
Share on other sites

9 minutes ago, Hekaryn said:

I did check the json files, they are identical. The game loads but this happens:

Is it possible that your resources folder isn't a source folder?

  • Like 1

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

3 minutes ago, Drizzs said:

im not asking you if its the json i'm telling you that it is, thats what this issue is, the item generates ingame it exists. The issue is with your resources for sure.

so like i said make your mod name your modid and your assets name the same

I'll try this

Link to comment
Share on other sites

No, nothing new, the problem continues

And I got this error:

 

[21:33:16] [Server thread/ERROR] [FML]: Unidentified mapping from registry minecraft:items
[21:33:16] [Server thread/ERROR] [FML]:     tm:wand: 4096

Edited by Hekaryn
Link to comment
Share on other sites

On 8/4/2019 at 7:45 AM, Drizzs said:

I dont really want to compare your code to mine just cause its tedious, so what i'll do is link you to my github, you can look i do it EXACTLY the same way, except i use other methods

public static final Item ORANGESEED = new OrangeSeed("orangeseed", CreativeTabs.MATERIALS);  My mod says this yours would say
public static final Item ORANGESEED = new ItemBase("orangeseed", CreativeTabs.MATERIALS);

1. Do not use ItemBase.

2. Do not use static initializers.

3. Most tutorials on YouTube are terrible due to their promotion of outdated methods and bad practices. Do not follow YouTube tutorials.

 

OP: Is anything else in your resources folder working?

Edited by DavidM

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

Link to comment
Share on other sites

Hey dude, i showed him an old mod that does EXACTLY what hes ALREADY doing. I told him i already did it EXACTLY the same way before. and it works. problematic or not, its not my place to tell him to do it another way.. I just wanted to help show him what it looks like when it works. I mean I didnt encourage him to do it this way, he already had it. Lol Dont post unless you want to help cause you're not helping you're just a dick!

  • Like 1
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.

Announcements



×
×
  • Create New...

Important Information

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