【模型相关】关于Java版药水物品模型的一些问题
在试图更改资源文件中的 splash_potion.json、potion.json、lingering_potion.json 等药水相关的物品模型时,更改后的模型虽然能够正常显示,但不论是哪种药水,其中一个纹理 potion_overlay.png 在染色时只会显示洋红色(见图,即“不可合成的药水”的颜色)。这种情况下,需要做什么才能让其显示为原本应有的颜色;除了药水以外还有哪些纹理需要注意此类事项。
使用的软件是Blockbench,游戏版本是Java版,模型见展开内容。
{
"credit": "ALYBH, Made with Blockbench",
"textures": {
"particle": "item/models/bottle/splash_potion",
"layer1": "item/models/bottle/splash_potion",
"layer2": "item/models/bottle/glass_bottle"
},
"elements": [
{
"from": ,
"to": ,
"faces": {
"north": {"uv": , "texture": "#layer1"},
"east": {"uv": , "texture": "#layer1"},
"south": {"uv": , "texture": "#layer1"},
"west": {"uv": , "texture": "#layer1"},
"up": {"uv": , "texture": "#layer1"},
"down": {"uv": , "texture": "#layer1"}
}
},
{
"from": ,
"to": ,
"faces": {
"north": {"uv": , "texture": "#layer2"},
"east": {"uv": , "texture": "#layer2"},
"south": {"uv": , "texture": "#layer2"},
"west": {"uv": , "texture": "#layer2"},
"up": {"uv": , "texture": "#layer2"},
"down": {"uv": , "texture": "#layer2"}
}
},
{
"from": ,
"to": ,
"faces": {
"north": {"uv": , "texture": "#layer2"},
"east": {"uv": , "texture": "#layer2"},
"south": {"uv": , "texture": "#layer2"},
"west": {"uv": , "texture": "#layer2"},
"up": {"uv": , "texture": "#layer2"},
"down": {"uv": , "texture": "#layer2"}
}
},
{
"from": ,
"to": ,
"faces": {
"north": {"uv": , "texture": "#layer2"},
"east": {"uv": , "texture": "#layer2"},
"south": {"uv": , "texture": "#layer2"},
"west": {"uv": , "texture": "#layer2"},
"up": {"uv": , "texture": "#layer2"},
"down": {"uv": , "texture": "#layer2"}
}
},
{
"from": ,
"to": ,
"color": 7,
"faces": {
"north": {"uv": , "texture": "#missing"},
"east": {"uv": , "texture": "#missing"},
"south": {"uv": , "texture": "#missing"},
"west": {"uv": , "texture": "#missing"},
"up": {"uv": , "texture": "#missing"},
"down": {"uv": , "texture": "#missing"}
}
}
],
"gui_light": "front",
"display": {
"thirdperson_righthand": {
"rotation": ,
"translation": ,
"scale":
},
"thirdperson_lefthand": {
"rotation": ,
"translation": ,
"scale":
},
"firstperson_righthand": {
"rotation": [-30, 15, 5],
"translation": ,
"scale":
},
"firstperson_lefthand": {
"rotation": [-30, 15, 5],
"translation": ,
"scale":
},
"ground": {
"translation": ,
"scale":
},
"gui": {
"translation":
},
"head": {
"translation":
},
"fixed": {
"rotation": [-90, 0, 0],
"translation":
}
},
"layers": [
{
"layer0": "item/models/bottle/potion_overlay",
"tint_index": 0
}
]
}
本帖最后由 El_Trueno 于 2024-6-8 13:36 编辑
初步判断62行到67行出错
这一个块绑定了丢失纹理#missingno
完整修改建议:
第108~113行:删除(包括107行的逗号)
第62~67行:将 "texture": "#missing" 修改为 "texture": "#layer0", "tintindex": 0
第5行:插入 "layer0": "item/models/bottle/potion_overlay", 行
类似模型见模型#物品着色和模型#方块着色
页: [1]