Edit: A new problem has appeared where I have a model that is using the wrong texture map. If I remove the textures, it errors suggesting that the textures are being loaded but not loaded.
Edit2: I'm stupid the UV map was misplaced.
I have an item using a b3d model which is working correctly other than the fact that it does not display a texture.
I am not sure what is wrong here as the console does not show any errors.
I am wondering if it has something to do with my model setup in Blender or something else.
I am using this code in my ClientProxy which is run during the pre initialization (Reference.MODID's value is kk and Strings.KingdomKey's value is kingdomkey)
B3DLoader.instance.addDomain(Reference.MODID);
ModelLoader.setCustomModelResourceLocation(ModItems.KingdomKey, 0, new ModelResourceLocation(Reference.MODID + ":" + Strings.KingdomKey, "inventory"));
Here's my blockstate json for my item (kingdomkey.json)
{
"forge_marker": 1,
"defaults": {
"textures": {
"texture": "kk:items/keyblades/kingdomkey"
},
"model": "kk:kingdomkey.b3d"
},
"variants": {
"inventory": [
{
"transform": {
"thirdperson": {
"scale": 0.02
},
"gui": {
"scale": 0.02
},
"firstperson": {
"scale": 0.02
}
}
}
]
}
}
Here's my texture (kingdomkey.png)
And my UV map in Blender
As you can see in this screenshot the model renders fine but it is missing the texture. The orientation's not right but that's not a problem.
If anyone knows what the problem is I'd be grateful to know. I have spent many hours trying to get this to work. Also this is my first post on here so I hope I'm doing things right.