Try follow The Grey Ghost's tutorials on troubleshooting block/item rendering here and here.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
What do I need for the "tutorial" and "tutorialBlock sections?
Do I need the folder name, the MODID, the class name, the block's name variable?
Please spell this out for me exactly. Every tutorial Ive seen names everything the exact same (IE the MODID is the same as the folder name, etc.) I did not name everything the same and so now Im all lost.
For reference THIS is the main tutorial Ive been using
I know that where is says "tutorialBlock" I need the name of the texture PNG, but what EXACTLY do I need in the section that says
"tutorial"?
Do I need my MODID string?
Do I need the name of my mod's main class file?
Do I need the name of the folder the mod is stored in?
The part before the colon is the domain name of your assets, i.e. the name of the assets/<domain>/textures/blocks/... folder. Most people use the mod ID for this, but it can be a completely unrelated name.
What do I need for the "tutorial" and "tutorialBlock sections?
Do I need the folder name, the MODID, the class name, the block's name variable?
The part before the colon is the domain, as above.
The part after the colon is the name of the model file (without the .json extension) in your assets/<domain>/models/block folder.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
One last bit though, specifically in the models/block JSON what is it looking for after the block/
"parent": "<domain>:block/,<THIS?>"
Block class name? Block object from the main file? Something different?
And what do I need to name the JSON files? After the class, the object, the name variable, what?
The "parent" field is the model file (without the extension) to use as the parent of this model.
I've just realised that your blockstates JSON needs to be in your mod ID's domain. Minecraft will look for it at <modid>:blockstates/<blockName>.json (i.e. assets/<modid>/blockstates/<blockName>.json), where <modid> is your mod ID in lowercase and <blockName> is the name you registered the Block with (GameRegistry.registerBlock).
You could work around this by registering a custom StateMapper for all your blocks, but I think you'd be better off putting your assets in the proper domain.
Your model files don't need specific names, Minecraft will simply use whatever you've specified in the blockstates JSON (for Block models) or registered with the item model mesher (for Item models).
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Alright, Im frustrated enough to bump this again now. Sorry to keep pushing but I really am at my wit's end with all this.
As far as I can tell I have named and placed all of the JSONs exactly right, but I still can't get them read. Ive been at this for a few days now, with no changes. So if someone can PLEASE tell me whats wrong with the src folder I posted up Id be so grateful.
I loaded up your mod and ran Minecraft, this error was printed to the log:
Exception loading model yourmodname:block/yourBlockName with loader instance, skipping
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated object at line 3 column 6
After fixing the model by adding the missing comma, the block rendered just fine everywhere.
In future, I'm more likely to help debug your code if it's visible on a site like GitHub without downloading it locally. If I need to, I'll clone it and run it in my IDE.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Actually that explains it. The tutorial code I was using doesn't have the comma there either now that I look. Shows what I get for blindly trusting people on the internet eh?
But thank you, thank you very very much. I spent three days tearing apart the tutorials, copying and re-copying the code. I thought I was an idiot. (Well, still am but for different reasons)
Thanks. I can finally get on with the mod
E: Oh yeah...github. I shouldve thought of that. I will be sure to keep that in mind in the future. Sorry for that
Hello everyone,
Ive been following some tutorials on adding custom blocks to 1.8
Ive run into a problem where my block textures won't load, and Im not sure why.
Everything else works fine, the scale JSON works, the lang file works, it all works except the texture.
HERE is my src folder, so if someone could help Id be most greatful.
Try follow The Grey Ghost's tutorials on troubleshooting block/item rendering here and here.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
OK so I have a few questions pertainign to the exact syntax of these JSON files.
Start with the texture one:
{
"parent": "block/cube_all",
"textures": {
"all": "tutorial:blocks/tutorialBlock"
}
}
I know that where is says "tutorialBlock" I need the name of the texture PNG, but what EXACTLY do I need in the section that says
"tutorial"?
Do I need my MODID string?
Do I need the name of my mod's main class file?
Do I need the name of the folder the mod is stored in?
What about the other two JSONs?
{
"parent": "tutorial:block/tutorialBlock",
"display": {
"thirdperson": {
"rotation": [ 10, -45, 170 ],
"translation": [ 0, 1.5, -2.75 ],
"scale": [ 0.375, 0.375, 0.375 ]
}
}
{
"variants": {
"normal": { "model": "tutorial:tutorialBlock" }
}
}
What do I need for the "tutorial" and "tutorialBlock sections?
Do I need the folder name, the MODID, the class name, the block's name variable?
Please spell this out for me exactly. Every tutorial Ive seen names everything the exact same (IE the MODID is the same as the folder name, etc.) I did not name everything the same and so now Im all lost.
For reference THIS is the main tutorial Ive been using
The part before the colon is the domain name of your assets, i.e. the name of the assets/<domain>/textures/blocks/... folder. Most people use the mod ID for this, but it can be a completely unrelated name.
The part before the colon is the domain, as above.
The part after the colon is the name of the model file (without the .json extension) in your assets/<domain>/models/block folder.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Thanks, that really clears things up!
One last bit though, specifically in the models/block JSON what is it looking for after the block/
"parent": "<domain>:block/,<THIS?>"
Block class name? Block object from the main file? Something different?
And what do I need to name the JSON files? After the class, the object, the name variable, what?
The "parent" field is the model file (without the extension) to use as the parent of this model.
I've just realised that your blockstates JSON needs to be in your mod ID's domain. Minecraft will look for it at <modid>:blockstates/<blockName>.json (i.e. assets/<modid>/blockstates/<blockName>.json), where <modid> is your mod ID in lowercase and <blockName> is the name you registered the Block with (GameRegistry.registerBlock).
You could work around this by registering a custom StateMapper for all your blocks, but I think you'd be better off putting your assets in the proper domain.
Your model files don't need specific names, Minecraft will simply use whatever you've specified in the blockstates JSON (for Block models) or registered with the item model mesher (for Item models).
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Alright, I renamed and moved things around, but its still not working right. At this point Im at a loss as to why.
HERE, Ive uploaded my new src folder. Can you please tell me what Ive done wrong?
And Im sorry about the weird names, Ive been trying to build this first mod as a template of sorts, giving me blanks to fill in basically.
Thanks so much for the help so far
Please help? This still aint working.
Alright, Im frustrated enough to bump this again now. Sorry to keep pushing but I really am at my wit's end with all this.
As far as I can tell I have named and placed all of the JSONs exactly right, but I still can't get them read. Ive been at this for a few days now, with no changes. So if someone can PLEASE tell me whats wrong with the src folder I posted up Id be so grateful.
I loaded up your mod and ran Minecraft, this error was printed to the log:
After fixing the model by adding the missing comma, the block rendered just fine everywhere.
In future, I'm more likely to help debug your code if it's visible on a site like GitHub without downloading it locally. If I need to, I'll clone it and run it in my IDE.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
...One comma.
Actually that explains it. The tutorial code I was using doesn't have the comma there either now that I look. Shows what I get for blindly trusting people on the internet eh?
But thank you, thank you very very much. I spent three days tearing apart the tutorials, copying and re-copying the code. I thought I was an idiot. (Well, still am but for different reasons)
Thanks. I can finally get on with the mod
E: Oh yeah...github. I shouldve thought of that. I will be sure to keep that in mind in the future. Sorry for that