本帖最后由 红.龙 于 2021-7-21 14:01 编辑
在制作版本迁移模组的灵魂火把时,IDEA读取soul_torch.json时发送了6次[Client thread/ERROR] [FML]: MultiModel minecraft:builtin/missing is empty (no base model or parts were provided/resolved)
报错,分别对应"variants"下"facing=up","facing=south","facing=west","facing=north","facing=east","inventory"6种情况。
在游戏中无论如何放置soul_torch都为紫黑块。facing参数正常。
BlockSoulTorch类直接继承原版BlockTorch类,代码如下。
package reddragon.versiontransport.block;
import net.minecraft.block.BlockTorch;
import reddragon.versiontransport.VT;
import static reddragon.versiontransport.item.CreativeTabRegister.VT_DECORATION;
public class BlockSoulTorch extends BlockTorch
{
public BlockSoulTorch()
{
this.setCreativeTab(VT_DECORATION);
this.setUnlocalizedName(VT.MODID+"soulTorch");
this.setRegistryName("soul_torch");
this.setLightLevel(13);
}
}
注册过程与其它方块相同,并无差错。json中"elements"直接照搬原版火把的json文件。
soul_torch.json:
{
"forge_marker": 1,
"ambientocclusion": false,
"textures": {
"particle": "versiontransport:blocks/soul_torch"
},
"variants": {
"inventory": [{}],
"facing": {
"south": {
"elements": [
{ "from": [ -1, 3.5, 7 ],
"to": [ 1, 13.5, 9 ],
"rotation": { "origin": [ 0, 3.5, 8 ], "axis": "z", "angle": -22.5 },
"shade": false,
"faces": {
"down": { "uv": [ 7, 13, 9, 15 ], "texture": "versiontransport:blocks/soul_torch" },
"up": { "uv": [ 7, 6, 9, 8 ], "texture": "versiontransport:blocks/soul_torch" }
}
},
{ "from": [ -1, 3.5, 0 ],
"to": [ 1, 19.5, 16 ],
"rotation": { "origin": [ 0, 3.5, 8 ], "axis": "z", "angle": -22.5 },
"shade": false,
"faces": {
"west": { "uv": [ 0, 0, 16, 16 ], "texture": "versiontransport:blocks/soul_torch" },
"east": { "uv": [ 0, 0, 16, 16 ], "texture": "versiontransport:blocks/soul_torch" }
}
},
{ "from": [ -8, 3.5, 7 ],
"to": [ 8, 19.5, 9 ],
"rotation": { "origin": [ 0, 3.5, 8 ], "axis": "z", "angle": -22.5 },
"shade": false,
"faces": {
"north": { "uv": [ 0, 0, 16, 16 ], "texture": "versiontransport:blocks/soul_torch" },
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "versiontransport:blocks/soul_torch" }
}
}
]
} //之后为当"facing"="east","north","west","up"时的"elements"
}
}
}
报错,分别对应"variants"下"facing=up","facing=south","facing=west","facing=north","facing=east","inventory"6种情况。
在游戏中无论如何放置soul_torch都为紫黑块。facing参数正常。
BlockSoulTorch类直接继承原版BlockTorch类,代码如下。
package reddragon.versiontransport.block;
import net.minecraft.block.BlockTorch;
import reddragon.versiontransport.VT;
import static reddragon.versiontransport.item.CreativeTabRegister.VT_DECORATION;
public class BlockSoulTorch extends BlockTorch
{
public BlockSoulTorch()
{
this.setCreativeTab(VT_DECORATION);
this.setUnlocalizedName(VT.MODID+"soulTorch");
this.setRegistryName("soul_torch");
this.setLightLevel(13);
}
}
注册过程与其它方块相同,并无差错。json中"elements"直接照搬原版火把的json文件。
soul_torch.json:
{
"forge_marker": 1,
"ambientocclusion": false,
"textures": {
"particle": "versiontransport:blocks/soul_torch"
},
"variants": {
"inventory": [{}],
"facing": {
"south": {
"elements": [
{ "from": [ -1, 3.5, 7 ],
"to": [ 1, 13.5, 9 ],
"rotation": { "origin": [ 0, 3.5, 8 ], "axis": "z", "angle": -22.5 },
"shade": false,
"faces": {
"down": { "uv": [ 7, 13, 9, 15 ], "texture": "versiontransport:blocks/soul_torch" },
"up": { "uv": [ 7,6, 9,8 ], "texture": "versiontransport:blocks/soul_torch" }
}
},
{ "from": [ -1, 3.5, 0 ],
"to": [ 1, 19.5, 16 ],
"rotation": { "origin": [ 0, 3.5, 8 ], "axis": "z", "angle": -22.5 },
"shade": false,
"faces": {
"west": { "uv": [ 0, 0, 16, 16 ], "texture": "versiontransport:blocks/soul_torch" },
"east": { "uv": [ 0, 0, 16, 16 ], "texture": "versiontransport:blocks/soul_torch" }
}
},
{ "from": [ -8, 3.5, 7 ],
"to": [ 8, 19.5, 9 ],
"rotation": { "origin": [ 0, 3.5, 8 ], "axis": "z", "angle": -22.5 },
"shade": false,
"faces": {
"north": { "uv": [ 0, 0, 16, 16 ], "texture": "versiontransport:blocks/soul_torch" },
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "versiontransport:blocks/soul_torch" }
}
}
]
} //之后为当"facing"="east","north","west","up"时的"elements"
}
}
}
在制作版本迁移模组的灵魂火把时,IDEA读取soul_torch.json时发送了6次[Client thread/ERROR] [FML]: MultiModel minecraft:builtin/missing is empty (no base model or parts were provided/resolved)
报错,分别对应"variants"下"facing=up","facing=south","facing=west","facing=north","facing=east","inventory"6种情况。
在游戏中无论如何放置soul_torch都为紫黑块。facing参数正常。
BlockSoulTorch类直接继承原版BlockTorch类,代码如下。
package reddragon.versiontransport.block;
import net.minecraft.block.BlockTorch;
import reddragon.versiontransport.VT;
import static reddragon.versiontransport.item.CreativeTabRegister.VT_DECORATION;
public class BlockSoulTorch extends BlockTorch
{
public BlockSoulTorch()
{
this.setCreativeTab(VT_DECORATION);
this.setUnlocalizedName(VT.MODID+"soulTorch");
this.setRegistryName("soul_torch");
this.setLightLevel(13);
}
}
注册过程与其它方块相同,并无差错。json中"elements"直接照搬原版火把的json文件。
soul_torch.json:
{
"forge_marker": 1,
"ambientocclusion": false,
"textures": {
"particle": "versiontransport:blocks/soul_torch"
},
"variants": {
"inventory": [{}],
"facing": {
"south": {
"elements": [
{ "from": [ -1, 3.5, 7 ],
"to": [ 1, 13.5, 9 ],
"rotation": { "origin": [ 0, 3.5, 8 ], "axis": "z", "angle": -22.5 },
"shade": false,
"faces": {
"down": { "uv": [ 7, 13, 9, 15 ], "texture": "versiontransport:blocks/soul_torch" },
"up": { "uv": [ 7, 6, 9, 8 ], "texture": "versiontransport:blocks/soul_torch" }
}
},
{ "from": [ -1, 3.5, 0 ],
"to": [ 1, 19.5, 16 ],
"rotation": { "origin": [ 0, 3.5, 8 ], "axis": "z", "angle": -22.5 },
"shade": false,
"faces": {
"west": { "uv": [ 0, 0, 16, 16 ], "texture": "versiontransport:blocks/soul_torch" },
"east": { "uv": [ 0, 0, 16, 16 ], "texture": "versiontransport:blocks/soul_torch" }
}
},
{ "from": [ -8, 3.5, 7 ],
"to": [ 8, 19.5, 9 ],
"rotation": { "origin": [ 0, 3.5, 8 ], "axis": "z", "angle": -22.5 },
"shade": false,
"faces": {
"north": { "uv": [ 0, 0, 16, 16 ], "texture": "versiontransport:blocks/soul_torch" },
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "versiontransport:blocks/soul_torch" }
}
}
]
} //之后为当"facing"="east","north","west","up"时的"elements"
}
}
}
2021.12 数据,可能有更多内容
在制作版本迁移模组的灵魂火把时,IDEA读取soul_torch.json时发送了6次[Client thread/ERROR] [FML]: MultiModel minecraft:builtin/missing is empty (no base model or parts were provided/resolved)报错,分别对应"variants"下"facing=up","facing=south","facing=west","facing=north","facing=east","inventory"6种情况。
在游戏中无论如何放置soul_torch都为紫黑块。facing参数正常。
BlockSoulTorch类直接继承原版BlockTorch类,代码如下。
package reddragon.versiontransport.block;
import net.minecraft.block.BlockTorch;
import reddragon.versiontransport.VT;
import static reddragon.versiontransport.item.CreativeTabRegister.VT_DECORATION;
public class BlockSoulTorch extends BlockTorch
{
public BlockSoulTorch()
{
this.setCreativeTab(VT_DECORATION);
this.setUnlocalizedName(VT.MODID+"soulTorch");
this.setRegistryName("soul_torch");
this.setLightLevel(13);
}
}
注册过程与其它方块相同,并无差错。json中"elements"直接照搬原版火把的json文件。
soul_torch.json:
{
"forge_marker": 1,
"ambientocclusion": false,
"textures": {
"particle": "versiontransport:blocks/soul_torch"
},
"variants": {
"inventory": [{}],
"facing": {
"south": {
"elements": [
{ "from": [ -1, 3.5, 7 ],
"to": [ 1, 13.5, 9 ],
"rotation": { "origin": [ 0, 3.5, 8 ], "axis": "z", "angle": -22.5 },
"shade": false,
"faces": {
"down": { "uv": [ 7, 13, 9, 15 ], "texture": "versiontransport:blocks/soul_torch" },
"up": { "uv": [ 7,6, 9,8 ], "texture": "versiontransport:blocks/soul_torch" }
}
},
{ "from": [ -1, 3.5, 0 ],
"to": [ 1, 19.5, 16 ],
"rotation": { "origin": [ 0, 3.5, 8 ], "axis": "z", "angle": -22.5 },
"shade": false,
"faces": {
"west": { "uv": [ 0, 0, 16, 16 ], "texture": "versiontransport:blocks/soul_torch" },
"east": { "uv": [ 0, 0, 16, 16 ], "texture": "versiontransport:blocks/soul_torch" }
}
},
{ "from": [ -8, 3.5, 7 ],
"to": [ 8, 19.5, 9 ],
"rotation": { "origin": [ 0, 3.5, 8 ], "axis": "z", "angle": -22.5 },
"shade": false,
"faces": {
"north": { "uv": [ 0, 0, 16, 16 ], "texture": "versiontransport:blocks/soul_torch" },
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "versiontransport:blocks/soul_torch" }
}
}
]
} //之后为当"facing"="east","north","west","up"时的"elements"
}
}
}
首先请问你的 soul_torch.json 是 blockstates 文件夹下的,还是 models/blocks 文件夹下的?如果是 blockstates 文件夹下的话,方块状态json好像不是这样搞的吧?看这 variants 我估计是方块状态json,那我在假设你这个json是方块状态json的前提下再回答
以我个人的认知水平,方块状态json里面是不能直接写模型代码的(比如 ambientocclusion 和 elements 这些),比较标准的方块状态json应该类似这样。虽然说很多mod都直接在方块状态里面写材质,我个人更推荐在模型文件中写材质
复制代码然后在 models/blocks 里面,创建模型文件 soul_torch_south.json 作为模型文件
复制代码
以我个人的认知水平,方块状态json里面是不能直接写模型代码的(比如 ambientocclusion 和 elements 这些),比较标准的方块状态json应该类似这样。虽然说很多mod都直接在方块状态里面写材质,我个人更推荐在模型文件中写材质
- {
- "forge_marker": 1,
- "variants": {
- "inventory": [{}],
- "facing": {
- "south": {
- "model": "versiontransport:blocks/soul_torch_south"
- }
- }
- }
- }
- {
- "textures": {
- "torch": "versiontransport:blocks/soul_torch",
- "particle": "versiontransport:blocks/soul_torch"
- },
- "elements": [
- { "from": [ -1, 3.5, 7 ],
- "to": [ 1, 13.5, 9 ],
- "rotation": { "origin": [ 0, 3.5, 8 ], "axis": "z", "angle": -22.5 },
- "shade": false,
- "faces": {
- "down": { "uv": [ 7, 13, 9, 15 ], "texture": "#torch" },
- "up": { "uv": [ 7, 6, 9, 8 ], "texture": "#torch" }
- }
- },
- { "from": [ -1, 3.5, 0 ],
- "to": [ 1, 19.5, 16 ],
- "rotation": { "origin": [ 0, 3.5, 8 ], "axis": "z", "angle": -22.5 },
- "shade": false,
- "faces": {
- "west": { "uv": [ 0, 0, 16, 16 ], "texture": "#torch" },
- "east": { "uv": [ 0, 0, 16, 16 ], "texture": "#torch" }
- }
- },
- { "from": [ -8, 3.5, 7 ],
- "to": [ 8, 19.5, 9 ],
- "rotation": { "origin": [ 0, 3.5, 8 ], "axis": "z", "angle": -22.5 },
- "shade": false,
- "faces": {
- "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#torch" },
- "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#torch" }
- }
- }
- ]
- }
GeForceLegend 发表于 2021-7-20 20:24
首先请问你的 soul_torch.json 是 blockstates 文件夹下的,还是 models/blocks 文件夹下的?如果是 blocks ...
多谢指点!问题终于解决了!