ModularMachinery Wiki(ZH)/机械结构到 JSON 转换工具 【进阶】:修订间差异

trfix
(trfix)
(trfix)
接下来,需要进行"post-processing"。因为模组只把选定的方块以及它的 blockstate 序列化为metadata,并且保存到相应的json文件中。如果这个位置的方块有 tileentity,它的数据将会被序列化,并保存在相应的json文件中。如果文件中的方块已经有了tileentity,它的数据将被序列化并保存在相应的'nbt'-tag中。除非你想与这个NBT-tag中的某些条目相适应,否则我们建议您完全删除'nbt'-specification。适当地调整每个位置的元素,这对于机器来说是合理的。
 
该导出机器的JSON文件只有“parts”-tags,目前只定义了多方块结构,所以还需添加"registryname"和"localizedname"等。
<syntaxhighlight lang="JSON">
{
"parts": [
{
"x": -1,
"y": 0,
"z": 0,
"elements": [
"modularmachinery:blockfluidinputhatch"
]
},
{
"x": -1,
"y": 0,
"z": 1,
"elements": [
"modularmachinery:blockcasing@1"
]
},
{
"x": 0,
"y": 0,
"z": 1,
"elements": [
"minecraft:water"
]
},
{
"x": 1,
"y": 0,
"z": 0,
"elements": [
"modularmachinery:blockinputbus"
]
},
{
"x": -1,
"y": 0,
"z": 2,
"elements": [
"modularmachinery:blockenergyoutputhatch"
]
},
{
"x": 1,
"y": 0,
"z": 1,
"elements": [
"modularmachinery:blockcasing@1"
]
},
{
"x": 0,
"y": 0,
"z": 2,
"elements": [
"modularmachinery:blockcasing@0"
]
},
{
"x": 1,
"y": 0,
"z": 2,
"elements": [
"modularmachinery:blockoutputbus"
]
},
{
"x": 1,
"y": -1,
"z": 0,
"elements": [
"modularmachinery:blockcasing@1"
]
},
{
"x": 0,
"y": -1,
"z": 0,
"elements": [
"modularmachinery:blockcasing@0"
]
},
{
"x": -1,
"y": 1,
"z": 0,
"elements": [
"modularmachinery:blockcasing@0"
]
},
{
"x": -1,
"y": -1,
"z": 0,
"elements": [
"modularmachinery:blockcasing@1"
]
},
{
"x": 0,
"y": 1,
"z": 0,
"elements": [
"modularmachinery:blockcasing@1"
]
},
{
"x": -1,
"y": 1,
"z": 1,
"elements": [
"modularmachinery:blockcasing@0"
]
},
{
"x": 0,
"y": 1,
"z": 1,
"elements": [
"modularmachinery:blockcasing@0"
]
},
{
"x": 1,
"y": 1,
"z": 0,
"elements": [
"modularmachinery:blockcasing@0"
]
},
{
"x": -1,
"y": 1,
"z": 2,
"elements": [
"modularmachinery:blockcasing@0"
]
},
{
"x": 0,
"y": 1,
"z": 2,
"elements": [
"modularmachinery:blockcasing@1"
]
},
{
"x": 1,
"y": 1,
"z": 1,
"elements": [
"modularmachinery:blockcasing@0"
]
},
{
"x": -1,
"y": -1,
"z": 1,
"elements": [
"modularmachinery:blockcasing@0"
]
},
{
"x": 1,
"y": 1,
"z": 2,
"elements": [
"modularmachinery:blockcasing@0"
]
},
{
"x": 0,
"y": -1,
"z": 1,
"elements": [
"modularmachinery:blockcasing@0"
]
},
{
"x": -1,
"y": -1,
"z": 2,
"elements": [
"modularmachinery:blockcasing@0"
]
},
{
"x": 0,
"y": -1,
"z": 2,
"elements": [
"modularmachinery:blockcasing@0"
]
},
{
"x": 1,
"y": -1,
"z": 1,
"elements": [
"modularmachinery:blockcasing@0"
]
},
{
"x": 1,
"y": -1,
"z": 2,
"elements": [
"modularmachinery:blockcasing@0"
]
}
]}
</syntaxhighlight>
Tr:[[Citysands]]
[[分类:Mod作品]]
优秀编辑者、​界面管理员、​监督员、​管理员
1,754

个编辑