方块问题排查指南
TIP
本页面包含关于_方块_的问题排查信息。在继续阅读前,建议先查看我们的全局问题排查指南。
0.0 - 常见问题
"我按照教程操作或尝试制作自己的方块时出现了问题!"
别担心!本页面将帮助您解决常见问题。
1.0 - 纹理问题排查
解决与方块纹理相关的问题。
1.1 - 纹理显示为黑紫相间
我将介绍三种不同布局的方块:类似泥土的
、类似原木的
和类似草方块的 
请导航至 RP/textures/terrain_texture.json 文件,确保文件名正确。
{
"resource_pack_name": "wiki",
"texture_name": "atlas.terrain",
"texture_data": {
"wiki:dirt_like": {
"textures": "textures/blocks/dirt_like" // 可替换为任意名称,但需记住该名称
},
"wiki:custom_log_top": {
"textures": "textures/blocks/custom_log_top" // 可替换为任意名称,但需记住该名称
},
"wiki:custom_log_side": {
"textures": "textures/blocks/custom_log_side" // 可替换为任意名称,但需记住该名称
},
"wiki:custom_grass_top": {
"textures": "textures/blocks/custom_grass_top" // 可替换为任意名称,但需记住该名称
},
"wiki:custom_grass_bottom": {
"textures": "textures/blocks/custom_grass_bottom" // 可替换为任意名称,但需记住该名称
},
"wiki:custom_grass_side": {
"textures": "textures/blocks/custom_grass_side" // 可替换为任意名称,但需记住该名称
}
}
}接下来,检查您的方块文件。确保文件中包含 material_instances 组件。
类似泥土的方块示例:
{
"format_version": "1.21.70",
"minecraft:block": {
"description": {
"identifier": "wiki:dirt_like"
},
"components": {
"minecraft:material_instances": {
"*": {
"texture": "wiki:dirt_like"
}
}
}
}
}类似原木的方块示例:
{
"format_version": "1.21.70",
"minecraft:block": {
"description": {
"identifier": "wiki:custom_log"
},
"components": {
"minecraft:material_instances": {
"*": {
"texture": "wiki:custom_log_side"
},
"end": {
"texture": "wiki:custom_log_top"
},
"up": "end",
"down": "end"
}
}
}
}类似草方块的示例:
{
"format_version": "1.21.70",
"minecraft:block": {
"description": {
"identifier": "wiki:custom_grass"
},
"components": {
"minecraft:material_instances": {
"*": {
"texture": "wiki:custom_grass_side"
},
"up": {
"texture": "wiki:custom_grass_top"
},
"down": {
"texture": "wiki:custom_grass_bottom"
}
}
}
}
}如果操作正确,您的方块现在应该显示正确的纹理。
1.2 - 纹理显示为带问号的泥土方块
问题:我的自定义方块变成了带有问号的泥土方块。

这是一个unknown方块,通常出现在方块标识符被更改或方块JSON无效时。
解决方案:使用JSON校验工具检查文件,并确认标识符未被更改。确保方块包含minecraft:geometry和minecraft:material_instances组件,或在RP/blocks.json中有纹理条目。
2.0 - 渲染问题排查
本节将介绍常见的方块渲染问题及其解决方法。
2.1 - 透明度无效
问题:纹理文件中有透明像素,但在游戏中应用后变为不透明。
解决方案:导航至方块文件,找到material_instances组件并添加以下内容:
{
"format_version": "1.21.70",
"minecraft:block": {
...
"components": {
"minecraft:material_instances": {
"*": {
"render_method": "alpha_test"
}
}
}
}
}2.2 - 方块产生阴影
问题:带有自定义几何体的方块产生了阴影。
解决方案:在方块代码中添加以下组件:
"minecraft:light_dampening": 03.0 - 常见内容日志错误
本节将介绍常见的内容日志错误及其调试方法。
3.1 - 碰撞/选择框错误
问题:出现类似以下内容错误:
[Blocks][error]-minecraft:collision_box: min 值不能低于 (-8, 0, -8),max 值不能超过 (8, 16, 8)
解决方案:检查minecraft:collision_box或minecraft:selection_box组件,并确保:
- X和Z值在
-8到8范围内。 - Y值在
0到16范围内。 - 碰撞框不超过方块的16×16×16单位区域。
3.2 - 模型错误
问题:出现类似以下内容错误:
geometry.your_block 包含超出范围的X个盒子...
解决方案:您的几何体超出了Minecraft允许的范围。可以缩小几何体或将其拆分为多个方块。
后续步骤
如果尝试上述步骤后问题仍未解决,欢迎加入Discord服务器提问。
如果您发现任何错误或过时信息,请通过GitHub贡献您的修改!





