java - Minecraft 的 3D 块模型作为项目工作,但在放置时变为空块(Minecraft Modding 1.16.5)
问题描述
我有一个类似于头骨的 3d 模型块。它将模型呈现为一个项目,但是当我放置它时,它变成了一个空块。
最初它是一件盔甲,但我找不到任何教我如何制作 3D 盔甲的东西。所以现在它是一个可穿戴的块。我还没有实现可穿戴功能。因此,需要任何帮助来制作像头骨一样的积木。
这是我的块模型代码:
{
"credit": "Made with Blockbench",
"parent": "beeutil:block/bee_helmet",
"ambientocclusion": false,
"texture_size": [32, 32],
"textures": {
"0": "beeutil:block/bee_helmet",
"particle": "beeutil:block/bee_helmet"
},
"elements": [
{
"from": [3, 0, 3],
"to": [13, 9, 13],
"faces": {
"north": {"uv": [5, 0, 10, 4.5], "texture": "#0"},
"east": {"uv": [5, 4.5, 10, 9], "texture": "#0"},
"south": {"uv": [5, 9, 10, 13.5], "texture": "#0"},
"west": {"uv": [0, 10, 5, 14.5], "texture": "#0"},
"up": {"uv": [5, 5, 0, 0], "texture": "#0"},
"down": {"uv": [5, 5, 0, 10], "texture": "#0"}
}
},
{
"from": [3, 9, 5],
"to": [4, 12, 6],
"faces": {
"north": {"uv": [10, 2, 10.5, 3.5], "texture": "#0"},
"east": {"uv": [10, 3.5, 10.5, 5], "texture": "#0"},
"south": {"uv": [10, 5, 10.5, 6.5], "texture": "#0"},
"west": {"uv": [10, 6.5, 10.5, 8], "texture": "#0"},
"up": {"uv": [11.5, 2.5, 11, 2], "texture": "#0"},
"down": {"uv": [11.5, 2.5, 11, 3], "texture": "#0"}
}
},
{
"from": [3, 11, 6],
"to": [4, 13, 7],
"faces": {
"north": {"uv": [10.5, 5, 11, 6], "texture": "#0"},
"east": {"uv": [10.5, 6, 11, 7], "texture": "#0"},
"south": {"uv": [10.5, 7, 11, 8], "texture": "#0"},
"west": {"uv": [10.5, 8, 11, 9], "texture": "#0"},
"up": {"uv": [11.5, 3.5, 11, 3], "texture": "#0"},
"down": {"uv": [11.5, 3.5, 11, 4], "texture": "#0"}
}
},
{
"from": [3, 11, 11],
"to": [4, 13, 13],
"faces": {
"north": {"uv": [10.5, 9, 11, 10], "texture": "#0"},
"east": {"uv": [10, 0, 11, 1], "texture": "#0"},
"south": {"uv": [10.5, 10, 11, 11], "texture": "#0"},
"west": {"uv": [10, 1, 11, 2], "texture": "#0"},
"up": {"uv": [11.5, 1, 11, 0], "texture": "#0"},
"down": {"uv": [11.5, 1, 11, 2], "texture": "#0"}
}
},
{
"from": [3, 9, 10],
"to": [4, 12, 11],
"faces": {
"north": {"uv": [10, 8, 10.5, 9.5], "texture": "#0"},
"east": {"uv": [10, 9.5, 10.5, 11], "texture": "#0"},
"south": {"uv": [10.5, 2, 11, 3.5], "texture": "#0"},
"west": {"uv": [10.5, 3.5, 11, 5], "texture": "#0"},
"up": {"uv": [11.5, 4.5, 11, 4], "texture": "#0"},
"down": {"uv": [11.5, 4.5, 11, 5], "texture": "#0"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [0, -90, -90],
"scale": [0.5, 0.5, 0.5]
},
"thirdperson_lefthand": {
"rotation": [90, 90, 0],
"scale": [0.5, 0.5, 0.5]
},
"firstperson_righthand": {
"rotation": [0, -90, 0],
"translation": [0, 3, 0],
"scale": [0.8, 0.8, 0.8]
},
"firstperson_lefthand": {
"rotation": [0, 90, 0]
},
"ground": {
"translation": [0, 4.75, 0]
},
"gui": {
"rotation": [0, 90, 0],
"translation": [0, 2.5, 0]
},
"head": {
"rotation": [0, -90, 0],
"translation": [-0.25, 5.5, 0],
"scale": [1.5, 1.5, 1.5]
},
"fixed": {
"rotation": [0, -90, 0],
"translation": [0, 4, 0]
}
}
}
这是我的方块状态代码:
{
"varients": {
"": { "model": "beeutil:block/bee_helmet"}
}
}
这是我的模型项目代码:
{
"parent": "beeutil:block/bee_helmet"
}
解决方案
推荐阅读
- python - LSTM模型损失波动然后变高,准确度整体提高
- angular - 为什么 Angular 2+ 路由器路由定义是 Javascript 对象而不是 Typescript 类?
- bitmap - 如何将 BitmapImage 转换为 StorageFile?
- r - 查找不与现有范围重叠的时间的最近范围
- android - 错误:未定义对 'oboe::AudioStreamBuilder::openStream(oboe::AudioStream**)' 的引用
- jsf - jsf静态列表不会出现在数据表中
- spring-integration - 如何使用自定义错误通道和 WebFlux.inboundGateway 回复错误响应?
- javascript - 将对象键作为参数传递给函数
- node.js - 在本地机器上的 VSCode 中使用 NodeJS 运行带有层的 AWS Lambda
- vb.net - 替换或删除字符串中的字符