2

Need help with modding

This Guy1's Avatar This Guy16/15/19 1:14 pm
6/17/2019 6:03 am
GameplayGP's Avatar GameplayGP
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
Posted by This Guy1's Avatar
This Guy1
Level 40 : Master Modder
14

Create an account or sign in to comment.

14

1
06/16/2019 3:53 pm
Level 51 : Grandmaster Modder
Nuparu00
Nuparu00's Avatar
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.
1
06/16/2019 4:57 pmhistory
Level 40 : Master Modder
This Guy1
This Guy1's Avatar
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
1
06/16/2019 5:33 pm
Level 42 : Master Modder
Toma1O6
Toma1O6's Avatar
You have wrong mod ID inside the item model json.
1
06/16/2019 5:54 pm
Level 40 : Master Modder
This Guy1
This Guy1's Avatar
Omg thank you so much man, I am new to modding and I am doing my best. You should excpect more of these in the future :)
1
06/16/2019 5:58 pm
Level 42 : Master Modder
Toma1O6
Toma1O6's Avatar
No problem, everyone has to start somewhere
1
06/16/2019 12:19 pm
Level 26 : Expert Crafter
GameplayGP
GameplayGP's Avatar
I really was looking foward to modding, it's hard.
1
06/16/2019 2:52 pm
Level 40 : Master Modder
This Guy1
This Guy1's Avatar
But have you given up?
1
06/17/2019 6:03 am
Level 26 : Expert Crafter
GameplayGP
GameplayGP's Avatar
yes, I did.
1
06/16/2019 10:55 amhistory
Level 42 : Master Modder
Toma1O6
Toma1O6's Avatar
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
06/16/2019 12:39 pmhistory
Level 40 : Master Modder
This Guy1
This Guy1's Avatar
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...".
2
06/16/2019 4:42 pmhistory
Level 42 : Master Modder
Toma1O6
Toma1O6's Avatar
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.
1
06/16/2019 6:19 pm
Level 40 : Master Modder
This Guy1
This Guy1's Avatar
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?
1
06/17/2019 12:31 am
Level 42 : Master Modder
Toma1O6
Toma1O6's Avatar
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
06/16/2019 4:32 pm
Level 42 : Master Modder
Toma1O6
Toma1O6's Avatar
That's because you kept the folder in /assets/ named as "mom" instead of your mod id. You have to change that too
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome