英文:
My "custom model data" textures didn't work with my own file
问题
这是我的wooden_sword.json文件,item/gold是我添加的.png文件。但是它没有正常工作,只显示错误的紫色/黑色纹理。
{
"parent": "item/handheld",
"textures": {
"layer0": "item/wooden_sword"
},
"overrides":[
{"predicate": {"custom_model_data":1}, "model":"item/iron_ingot"},
{"predicate": {"custom_model_data":2}, "model":"item/gold"}
]
}
item/iron_ingot是包的原始文件,它可以正常工作。我认为加载我添加的纹理存在一些问题。
英文:
This is my wooden_sword.json, the item/gold is a .png file I added. And it didn't work, only show the error purple/black texture.
{
"parent": "item/handheld",
"textures": {
"layer0": "item/wooden_sword"
},
"overrides":[
{"predicate": {"custom_model_data":1}, "model":"item/iron_ingot"},
{"predicate": {"custom_model_data":2}, "model":"item/gold"}
]
}
The item/iron_ingot is the original file of the pack, and work correctly. I think there are some problems of loading the texture I added
答案1
得分: 1
我已完成。我所需要做的就是在模型文件夹中添加一个名为[纹理名称].json的.json文件。
{
"parent": "item/generated",
"textures": {
"layer0": "item/[纹理名称]"
}
}
之后,它会显示我自己文件的纹理。
英文:
I finished it. All I have to do is adding a .json file named [texture name].json in the models file.
{
"parent": "item/generated",
"textures": {
"layer0": "item/[texture name]"
}
}
After this, it showed the texture of my own files.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论