2
Need help with modding
So I am new to modding and I need your help, I've spent hours trying to figure this out but couldn't figure it so I decided to come to the good ol' Planet Mc forums.
So I created a new item but the texture won't show when I run the eclipse client, it will have the missing texture with a sentence saying ""moresmod:red_emerald#inventory""
Any help would be appreciated
Here is the source code: https://github.com/congueror/Mo-Ores-Mod
So I created a new item but the texture won't show when I run the eclipse client, it will have the missing texture with a sentence saying ""moresmod:red_emerald#inventory""
Any help would be appreciated
Here is the source code: https://github.com/congueror/Mo-Ores-Mod
Create an account or sign in to comment.
14
1
The mod id specified in com.congueror.mooresmod.util.Reference and the domain name of your assets do not match. You have to either change the mod id to mom or change name of the mom folder in the assets folder to moresmod.
Also as mentioned before, the domain name in textures specific in red_emerald.json has to be same as the name of the folder mentioned before.
Also as mentioned before, the domain name in textures specific in red_emerald.json has to be same as the name of the folder mentioned before.
1
So I've done what you asked me, I renamed the assets package to mooresmod, I moved the packages from the mom to the mooresmod package and deleted the mom package. But this time it will just show the "missing texture" texture without any text, just like you would hold a normal item except it doesn't have a texture.
edit: forgot to mention I also changed the json file like you asked
edit: forgot to mention I also changed the json file like you asked
1
You have wrong mod ID inside the item model json.
1
I really was looking foward to modding, it's hard.
1
But have you given up?
1
yes, I did.
1
Your IDs don't match. You specified the mod ID as a moresmod and inside the item you're looking for texture from mooresmod. You have one extra "o" there. Also I'm pretty sure the folder in the /assets should have same name as the mod id
1
Yes but where do I specify that am searching for the texture from mooresmod
edit: I tried to change the Mod id from the reference.java file to mooresmod but it still didn't work, it shows the same sentence but instead of saying ''moresmod..." it said "mooresmod...".
edit: I tried to change the Mod id from the reference.java file to mooresmod but it still didn't work, it shows the same sentence but instead of saying ''moresmod..." it said "mooresmod...".
2
Also there are many problems with your current mod and I suggest you to fix them as soon as possible, later it will be pain, trust me.
So first is IHasModel - What's the purpose of that? You need models for all your items/blocks so why use some kind of interface for that. Like YOUR_ITEM_LIST.forEach(item -> {
ModelLoader.setCustomModelResourceLocation... });
You should completely remove that interface and everything associated with it.
Next: Proxies - ClientProxy is fine, but CommonProxy is not really needed, since the code here goes inside your Main class because that's common too (server+client).
Static initializers - I mean this: public static final Item ITEM = new Item(); You should register your items with Forge Registry events. And for Item reference use class with ObjectHolder annotation.
Some examples for you to understand it a bit more:
Proxies
Registry
(my code is nowhere perfect, but it's still better than the YouTube tutorials)
I'm pretty sure you're following YouTube tutorials. I suggest you to not blindly copy everything they do, thinking on your own is much better.
So first is IHasModel - What's the purpose of that? You need models for all your items/blocks so why use some kind of interface for that. Like YOUR_ITEM_LIST.forEach(item -> {
ModelLoader.setCustomModelResourceLocation... });
You should completely remove that interface and everything associated with it.
Next: Proxies - ClientProxy is fine, but CommonProxy is not really needed, since the code here goes inside your Main class because that's common too (server+client).
Static initializers - I mean this: public static final Item ITEM = new Item(); You should register your items with Forge Registry events. And for Item reference use class with ObjectHolder annotation.
Some examples for you to understand it a bit more:
Proxies
Registry
(my code is nowhere perfect, but it's still better than the YouTube tutorials)
I'm pretty sure you're following YouTube tutorials. I suggest you to not blindly copy everything they do, thinking on your own is much better.
1
Thanks so much for the help. So yes I am watching mod tutorials and I know they are wrong but more than half of the stuff they do I don't even understand them. How did you learn how to mod?
So I should delete the registry handler among with the IHasModel?
And if I delete the Common Proxy A LOT of errors come up that I don't know how to fix
I know what you mean but I don't know how to execute it.
If I change the code will I be able to continue my tutorial and learn to add blocks, dimensions,biomes, etc?
Should I copy your poxies but remove the imports and the things you added? Like the Grenades and Smoke Grenades?
So I should delete the registry handler among with the IHasModel?
And if I delete the Common Proxy A LOT of errors come up that I don't know how to fix
I know what you mean but I don't know how to execute it.
If I change the code will I be able to continue my tutorial and learn to add blocks, dimensions,biomes, etc?
Should I copy your poxies but remove the imports and the things you added? Like the Grenades and Smoke Grenades?
1
For proxies I suggest you to remove both of them. Then create interface and put there the 3 methods (preInit, init, postInit). Then create ClientProxy and ServerProxy classes. Implement the interface here and override the methods from the interface (ctrl+space and start writing the method name). Then update the Reference class with the proxy paths to match updated code
1
That's because you kept the folder in /assets/ named as "mom" instead of your mod id. You have to change that too