我的“自定义模型数据”纹理在使用我的自己的文件时无法正常工作。

huangapple go评论59阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2020年10月3日 15:14:57
  • 转载请务必保留本文链接:https://go.coder-hub.com/64181673.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定