UID1636799性别保密经验 EP铁粒 粒回帖0主题精华在线时间 小时注册时间2024-2-28最后登录1970-1-1
| 24铁粒 在试图更改资源文件中的 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": [4, 2, 4],
- "to": [12, 10, 12],
- "faces": {
- "north": {"uv": [0, 8, 8, 16], "texture": "#layer1"},
- "east": {"uv": [8, 8, 0, 16], "texture": "#layer1"},
- "south": {"uv": [0, 8, 8, 16], "texture": "#layer1"},
- "west": {"uv": [8, 8, 0, 16], "texture": "#layer1"},
- "up": {"uv": [0, 0, 8, 8], "texture": "#layer1"},
- "down": {"uv": [8, 0, 16, 8], "texture": "#layer1"}
- }
- },
- {
- "from": [6, 10, 6],
- "to": [10, 12, 10],
- "faces": {
- "north": {"uv": [6, 4, 10, 6], "texture": "#layer2"},
- "east": {"uv": [6, 4, 10, 6], "texture": "#layer2"},
- "south": {"uv": [6, 4, 10, 6], "texture": "#layer2"},
- "west": {"uv": [6, 4, 10, 6], "texture": "#layer2"},
- "up": {"uv": [12, 0, 16, 4], "texture": "#layer2"},
- "down": {"uv": [0, 0, 4, 4], "texture": "#layer2"}
- }
- },
- {
- "from": [4, 12, 4],
- "to": [12, 13, 12],
- "faces": {
- "north": {"uv": [4, 3, 12, 4], "texture": "#layer2"},
- "east": {"uv": [4, 3, 12, 4], "texture": "#layer2"},
- "south": {"uv": [4, 3, 12, 4], "texture": "#layer2"},
- "west": {"uv": [4, 3, 12, 4], "texture": "#layer2"},
- "up": {"uv": [4, 6, 12, 14], "texture": "#layer2"},
- "down": {"uv": [4, 6, 12, 14], "texture": "#layer2"}
- }
- },
- {
- "from": [6.2, 12, 6.2],
- "to": [9.8, 14, 9.8],
- "faces": {
- "north": {"uv": [0, 14, 4, 16], "texture": "#layer2"},
- "east": {"uv": [4, 14, 0, 16], "texture": "#layer2"},
- "south": {"uv": [0, 14, 4, 16], "texture": "#layer2"},
- "west": {"uv": [4, 14, 0, 16], "texture": "#layer2"},
- "up": {"uv": [0, 11, 4, 15], "texture": "#layer2"},
- "down": {"uv": [0, 7, 4, 11], "texture": "#layer2"}
- }
- },
- {
- "from": [5, 3, 5],
- "to": [11, 9, 11],
- "color": 7,
- "faces": {
- "north": {"uv": [1, 15, 7, 9], "texture": "#missing"},
- "east": {"uv": [1, 15, 7, 9], "texture": "#missing"},
- "south": {"uv": [1, 15, 7, 9], "texture": "#missing"},
- "west": {"uv": [1, 15, 7, 9], "texture": "#missing"},
- "up": {"uv": [9, 7, 15, 1], "texture": "#missing"},
- "down": {"uv": [1, 7, 7, 1], "texture": "#missing"}
- }
- }
- ],
- "gui_light": "front",
- "display": {
- "thirdperson_righthand": {
- "rotation": [30, 0, 0],
- "translation": [0, 0.75, 0],
- "scale": [0.4, 0.4, 0.4]
- },
- "thirdperson_lefthand": {
- "rotation": [30, 0, 0],
- "translation": [0, 0.75, 0],
- "scale": [0.4, 0.4, 0.4]
- },
- "firstperson_righthand": {
- "rotation": [-30, 15, 5],
- "translation": [4.5, 0, 0],
- "scale": [0.75, 0.75, 0.75]
- },
- "firstperson_lefthand": {
- "rotation": [-30, 15, 5],
- "translation": [4.5, 0, 0],
- "scale": [0.75, 0.75, 0.75]
- },
- "ground": {
- "translation": [0, 1, 0],
- "scale": [0.4, 0.4, 0.4]
- },
- "gui": {
- "translation": [0, 0.5, 0]
- },
- "head": {
- "translation": [0, 12.25, 0]
- },
- "fixed": {
- "rotation": [-90, 0, 0],
- "translation": [0, 0, -6]
- }
- },
- "layers": [
- {
- "layer0": "item/models/bottle/potion_overlay",
- "tint_index": 0
- }
- ]
- }
复制代码 |
|
最佳答案查看完整内容 初步判断62行到67行出错
这一个块绑定了丢失纹理#missingno
完整修改建议:
第108~113行:删除(包括107行的逗号)
第62~67行:将 "texture": "#missing" 修改为 "texture": "#layer0", "tintindex": 0
第5行:插入 "layer0": "item/models/bottle/potion_overlay", 行
类似模型见模型#物品着色和模型#方块着色 |