本篇教程的视频

本篇教程的源代码

GitHub地址:TutorialMod-Facing-1.20.1

本篇教程目标

  • 理解方块的朝向这个方块状态
  • 为方块添加朝向,并生成其方块状态文件

查看源代码

那么在我们的游戏中,除了六个面都是相同材质的方块之外,大多数方块都是有朝向的

比如熔炉,我暂且将它开口的那个面称之为特征面

当我们放下熔炉方块时,不论你面朝何方(除了上下),熔炉的特征面永远是面向玩家的

同理,楼梯讲台这种异形方块也都是有朝向的

FACING属性

这里我们就来看看熔炉方块的源代码,重点找到它的方块状态,这里找到AbstractFurnaceBlock

1
public static final DirectionProperty FACING = HorizontalFacingBlock.FACING;

这里定义了一个FACING属性,从它的名字来看就是我们要找的方块朝向

这个是一个DirectionProperty类型的变量,是Minecraft中用于表示方位的属性

1
public static final DirectionProperty FACING = Properties.HORIZONTAL_FACING;

虽然说熔炉方块的FACING引用的是HorizontalFacingBlock中的,不过它本质上引用的是Properties.HORIZONTAL_FACING

Properties类中,我们可以找到它的定义

1
public static final DirectionProperty HORIZONTAL_FACING = DirectionProperty.of("facing", Direction.Type.HORIZONTAL);

另外我们也可以看到另一个名为FACING这个属性的定义

1
2
3
public static final DirectionProperty FACING = DirectionProperty.of(
"facing", Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN
);

原版就只有木桶方块引用的是这个FACING,相比较而言,HORIZONTAL_FACING这个属性只有东西南北四个方向,而FACING则多了上下

哎?那么楼梯的上下是怎么区分的?好问题

楼梯方块有其他的方块状态共同决定其形状,它的方法也和其他方块不一样

具体的感兴趣的同学可以自己研究,未来我们或许会讲讲楼梯方块的具体实现

状态初始化

另外在熔炉方块的构造函数中,我们可以看到对方块状态初始化

1
2
3
4
protected AbstractFurnaceBlock(AbstractBlock.Settings settings) {
super(settings);
this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH).with(LIT, Boolean.valueOf(false)));
}

这里我们看到了FACING,并且初始化为Direction.NORTH,也就是朝

另外一个LIT属性我们在未来的教程中也会讲,这个是控制方块发光的属性,因为熔炉在工作时,它会照亮周围

一些方法

然后,我们再看看引用FACING的一些方法

1
2
3
4
@Override
public BlockState getPlacementState(ItemPlacementContext ctx) {
return this.getDefaultState().with(FACING, ctx.getHorizontalPlayerFacing().getOpposite());
}

这里我们看到了getPlacementState这个方法,这个方法用于获取方块放置时的状态

getHorizontalPlayerFacing这个方法用于获取玩家放置方块时的朝向

getOpposite方法用于获取方位的反方向,比如玩家面朝南,那么熔炉就会朝北

1
2
3
4
@Override
public BlockState rotate(BlockState state, BlockRotation rotation) {
return state.with(FACING, rotation.rotate(state.get(FACING)));
}

rotate这个方法用于旋转方块,这里我们直接将FACING属性旋转即可

1
2
3
4
@Override
public BlockState mirror(BlockState state, BlockMirror mirror) {
return state.rotate(mirror.getRotation(state.get(FACING)));
}

mirror这个方法用于镜像方块,这里我们直接将FACING属性旋转即可

当然这两个方法具体我也不太清楚是用来干什么的,带有方块朝向的方块,一般都会重写这两个方法

1
2
3
4
@Override
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
builder.add(FACING, LIT);
}

最后还要将方块属性加入到方块中,不然方块还是没有这些属性的

添加朝向

这期教程我们也是用Blockbench制作的方块

导出方块碰撞箱

那么在导出方块之前,我们再安装一个插件,用于导出方块的碰撞箱

在文件->插件中搜索并安装Mod Utils这个插件,然后我们在导出这就会多了一个选项,Export VoxelShape(1.14+ Moded Minecraft)

图片

但在导出之前,还得将我们方块(组成方块的小体块)放到一个名为VoxelShapes这个组下面,这样才能被这个插件识别(感觉这插件要求还挺多)

图片

然后再点击Export VoxelShape(1.14+ Modded Minecraft),就会弹出一个窗口,然后就可以选择映射,这里我们要选择Yarn,导出当前方块的碰撞箱

图片

但这还没完,因为我们需要4个不同面向的方块碰撞箱,那么现在你想到,把方块整体转一下呗

哎,在你的方块中没有斜着的体块时可以这么做,但是,本期教程的案例是我从方舟模组中拿过来的一个时钟(见视频教程),
这里面有很多斜着的小体块,当我们整体旋转时,斜着的小体块就跑掉了

图片

因为由于Blockbench的限制,Java版的方块只支持单轴旋转

那么怎么办呢?这个倒是简单,直接做一个能够覆盖整个方块的体块,然后将其他的体块删了,再导出方块的碰撞箱,
如此导出其他3个碰撞箱

图片

另外注意,在旋转方块时,将枢轴点调整到一个完整方块的中心,即XZ调到8Y轴可以不管

SimpleOrangeClock

这里我们新建一个自定义的方块类,SimpleOrangeClock,继承Block

1
2
3
4
5
public class SimpleOrangeClock extends Block {
public SimpleOrangeClock(Settings settings) {
super(settings);
}
}

方块状态

接下来我们来设置这个方块的方块状态

首先引入FACING这个参数

1
public static final DirectionProperty FACING = Properties.HORIZONTAL_FACING;

这里我们可以直接引用Properties.HORIZONTAL_FACING

碰撞箱

随后我们将导出的方块碰撞箱放到方块中来

1
2
3
4
private static final VoxelShape SHAPE_N = Block.createCuboidShape(3, 3, 15, 13, 13, 16);
private static final VoxelShape SHAPE_W = Block.createCuboidShape(15, 3, 3, 16, 13, 13);
private static final VoxelShape SHAPE_S = Block.createCuboidShape(3, 3, 0, 13, 13, 1);
private static final VoxelShape SHAPE_E = Block.createCuboidShape(0, 3, 3, 1, 13, 13);

一共是4个方位的不同碰撞箱

方块状态初始化

构造函数中的方块状态初始化写一下

1
this.setDefaultState(this.getStateManager().getDefaultState().with(FACING, Direction.NORTH));

和原版一样,初始化为朝北

后面我们就要重写一些方法了

getOuutlineShape

1
2
3
4
5
6
7
8
9
@Override
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
return switch (state.get(FACING)) {
case SOUTH -> SHAPE_S;
case EAST -> SHAPE_E;
case WEST -> SHAPE_W;
default -> SHAPE_N;
};
}

重写getOutlineShape这个方法,这个方法用于获取方块的碰撞箱

因为FACING的实际属性是一个枚举类型的(你一路挖下去就能发现),所以这里可以直接用switch来判断当前方块面向并返回对应的碰撞箱

哎,这里就有人要问了,FACING不是DirectionProperty吗,怎么就成枚举了?

其实原版大多数的方块状态都是一个注册id再带上一个枚举类型的变量,后面我们自己来定义方块状态属性时,你可能就能理解了

这里的FACING属性,其实就是一个facing的注册id,带上一个有东西南北这4个不同面向的方块属性

appendProperties

1
2
3
4
@Override
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
builder.add(FACING);
}

别忘了将FACING属性加入到方块中

其他的

1
2
3
4
5
6
7
8
9
10
11
12
13
14
@Override
public BlockState rotate(BlockState state, BlockRotation rotation) {
return state.with(FACING, rotation.rotate(state.get(FACING)));
}

@Override
public BlockState mirror(BlockState state, BlockMirror mirror) {
return state.rotate(mirror.getRotation(state.get(FACING)));
}

@Override
public BlockState getPlacementState(ItemPlacementContext ctx) {
return this.getDefaultState().with(FACING, ctx.getHorizontalPlayerFacing().getOpposite());
}

另外的三个我们就不再赘述了,按照原版来写就好了

注册方块

注册方块

1
2
public static final Block SIMPLE_ORANGE_CLOCK = register("simple_orange_clock",
new SimpleOrangeClock(AbstractBlock.Settings.create().strength(2.0f, 6.0f)));

实例化SimpleOrangeClock

添加物品栏

1
entries.add(ModBlocks.SIMPLE_ORANGE_CLOCK);

不要忘了物品栏

数据生成

语言文件

1
translationBuilder.add(ModBlocks.SIMPLE_ORANGE_CLOCK, "Simple Orange Clock");

模型文件

1
blockStateModelGenerator.registerNorthDefaultHorizontalRotation(ModBlocks.SIMPLE_ORANGE_CLOCK);

方块状态文件,这里我们用到了registerNorthDefaultHorizontalRotation来生成默认面向北的方块状态文件

当然,这个并不会生成我们的方块模型文件,我们使用Blockbench制作的模型文件

下面是本期教程使用的模型文件,供参考

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
{
"credit": "Made with Blockbench",
"texture_size": [32, 32],
"textures": {
"0": "tutorial-mod:block/simple_orange_clock",
"particle": "tutorial-mod:block/simple_orange_clock"
},
"elements": [
{
"from": [7, 3, 15],
"to": [9, 4, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 1, 15]},
"faces": {
"north": {"uv": [4, 2, 5, 2.5], "texture": "#0"},
"east": {"uv": [0.5, 7.5, 1, 8], "texture": "#0"},
"south": {"uv": [4, 2.5, 5, 3], "texture": "#0"},
"west": {"uv": [4, 7.5, 4.5, 8], "texture": "#0"},
"up": {"uv": [5, 3.5, 4, 3], "texture": "#0"},
"down": {"uv": [5, 3.5, 4, 4], "texture": "#0"}
}
},
{
"from": [5.4588, 3.30656, 15],
"to": [7.4588, 4.30656, 16],
"rotation": {"angle": -22.5, "axis": "z", "origin": [6.4588, 4.30656, 16]},
"faces": {
"north": {"uv": [5.5, 2, 6.5, 2.5], "texture": "#0"},
"east": {"uv": [7.5, 5.5, 8, 6], "texture": "#0"},
"south": {"uv": [5.5, 2.5, 6.5, 3], "texture": "#0"},
"west": {"uv": [7.5, 6, 8, 6.5], "texture": "#0"},
"up": {"uv": [6.5, 3.5, 5.5, 3], "texture": "#0"},
"down": {"uv": [6.5, 3.5, 5.5, 4], "texture": "#0"}
}
},
{
"from": [3.56645, 2.76537, 15],
"to": [5.56645, 3.76537, 16],
"rotation": {"angle": -45, "axis": "z", "origin": [6.56645, 3.76537, 16]},
"faces": {
"north": {"uv": [5.5, 4, 6.5, 4.5], "texture": "#0"},
"east": {"uv": [7.5, 6.5, 8, 7], "texture": "#0"},
"south": {"uv": [5.5, 4.5, 6.5, 5], "texture": "#0"},
"west": {"uv": [7.5, 7, 8, 7.5], "texture": "#0"},
"up": {"uv": [6.5, 5.5, 5.5, 5], "texture": "#0"},
"down": {"uv": [6.5, 5.5, 5.5, 6], "texture": "#0"}
}
},
{
"from": [4.73384, 6.17331, 15],
"to": [5.73384, 8.17331, 16],
"rotation": {"angle": 22.5, "axis": "z", "origin": [6.73384, 3.17331, 16]},
"faces": {
"north": {"uv": [0, 6, 0.5, 7], "texture": "#0"},
"east": {"uv": [0.5, 6, 1, 7], "texture": "#0"},
"south": {"uv": [1, 6, 1.5, 7], "texture": "#0"},
"west": {"uv": [1.5, 6, 2, 7], "texture": "#0"},
"up": {"uv": [8, 8, 7.5, 7.5], "texture": "#0"},
"down": {"uv": [8.5, 0, 8, 0.5], "texture": "#0"}
}
},
{
"from": [12.02734, 7.02734, 15],
"to": [13.02734, 9.02734, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [-0.97266, 0.02734, 15]},
"faces": {
"north": {"uv": [4, 4, 4.5, 5], "texture": "#0"},
"east": {"uv": [4.5, 4, 5, 5], "texture": "#0"},
"south": {"uv": [5, 2, 5.5, 3], "texture": "#0"},
"west": {"uv": [5, 3, 5.5, 4], "texture": "#0"},
"up": {"uv": [8, 4.5, 7.5, 4], "texture": "#0"},
"down": {"uv": [8, 4.5, 7.5, 5], "texture": "#0"}
}
},
{
"from": [2.97266, 7.02734, 15],
"to": [3.97266, 9.02734, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [0.97266, 0.02734, 15]},
"faces": {
"north": {"uv": [4, 5, 4.5, 6], "texture": "#0"},
"east": {"uv": [5, 4, 5.5, 5], "texture": "#0"},
"south": {"uv": [4.5, 5, 5, 6], "texture": "#0"},
"west": {"uv": [5, 5, 5.5, 6], "texture": "#0"},
"up": {"uv": [8, 5.5, 7.5, 5], "texture": "#0"},
"down": {"uv": [6, 7.5, 5.5, 8], "texture": "#0"}
}
},
{
"from": [8.72644, 5.05826, 15],
"to": [9.72644, 7.05826, 16],
"rotation": {"angle": -45, "axis": "z", "origin": [8.72644, 3.05826, 16]},
"faces": {
"north": {"uv": [6.5, 7, 7, 8], "texture": "#0"},
"east": {"uv": [7, 7, 7.5, 8], "texture": "#0"},
"south": {"uv": [0, 7.5, 0.5, 8.5], "texture": "#0"},
"west": {"uv": [7.5, 0, 8, 1], "texture": "#0"},
"up": {"uv": [5.5, 8.5, 5, 8], "texture": "#0"},
"down": {"uv": [8.5, 5, 8, 5.5], "texture": "#0"}
}
},
{
"from": [10.95541, 5.63838, 15],
"to": [11.95541, 7.63838, 16],
"rotation": {"angle": -22.5, "axis": "z", "origin": [10.95541, 4.63838, 16]},
"faces": {
"north": {"uv": [1.5, 7, 2, 8], "texture": "#0"},
"east": {"uv": [4.5, 7, 5, 8], "texture": "#0"},
"south": {"uv": [5, 7, 5.5, 8], "texture": "#0"},
"west": {"uv": [6, 7, 6.5, 8], "texture": "#0"},
"up": {"uv": [5, 8.5, 4.5, 8], "texture": "#0"},
"down": {"uv": [8.5, 4.5, 8, 5], "texture": "#0"}
}
},
{
"from": [9.99373, 2.00419, 15],
"to": [11.99373, 3.00419, 16],
"rotation": {"angle": 22.5, "axis": "z", "origin": [6.99373, 0.00419, 16]},
"faces": {
"north": {"uv": [7, 2, 8, 2.5], "texture": "#0"},
"east": {"uv": [4, 8, 4.5, 8.5], "texture": "#0"},
"south": {"uv": [7, 2.5, 8, 3], "texture": "#0"},
"west": {"uv": [8, 4, 8.5, 4.5], "texture": "#0"},
"up": {"uv": [8, 3.5, 7, 3], "texture": "#0"},
"down": {"uv": [8, 3.5, 7, 4], "texture": "#0"}
}
},
{
"from": [13.17539, 9.2557, 15],
"to": [14.17539, 11.2557, 16],
"rotation": {"angle": 22.5, "axis": "z", "origin": [14.17539, 6.2557, 16]},
"faces": {
"north": {"uv": [5.5, 6.5, 6, 7.5], "texture": "#0"},
"east": {"uv": [7, 0, 7.5, 1], "texture": "#0"},
"south": {"uv": [1, 7, 1.5, 8], "texture": "#0"},
"west": {"uv": [7, 1, 7.5, 2], "texture": "#0"},
"up": {"uv": [4, 8.5, 3.5, 8], "texture": "#0"},
"down": {"uv": [8.5, 3.5, 8, 4], "texture": "#0"}
}
},
{
"from": [9.26197, 9.46088, 15],
"to": [11.26197, 10.46088, 16],
"rotation": {"angle": -45, "axis": "z", "origin": [12.26197, 9.46088, 16]},
"faces": {
"north": {"uv": [6.5, 5.5, 7.5, 6], "texture": "#0"},
"east": {"uv": [3, 8, 3.5, 8.5], "texture": "#0"},
"south": {"uv": [6.5, 6, 7.5, 6.5], "texture": "#0"},
"west": {"uv": [8, 3, 8.5, 3.5], "texture": "#0"},
"up": {"uv": [7.5, 7, 6.5, 6.5], "texture": "#0"},
"down": {"uv": [1, 7, 0, 7.5], "texture": "#0"}
}
},
{
"from": [8.5412, 11.74812, 15],
"to": [10.5412, 12.74812, 16],
"rotation": {"angle": -22.5, "axis": "z", "origin": [9.5412, 11.74812, 16]},
"faces": {
"north": {"uv": [6.5, 4, 7.5, 4.5], "texture": "#0"},
"east": {"uv": [2.5, 8, 3, 8.5], "texture": "#0"},
"south": {"uv": [4.5, 6.5, 5.5, 7], "texture": "#0"},
"west": {"uv": [8, 2.5, 8.5, 3], "texture": "#0"},
"up": {"uv": [7.5, 5, 6.5, 4.5], "texture": "#0"},
"down": {"uv": [7.5, 5, 6.5, 5.5], "texture": "#0"}
}
},
{
"from": [6.91134, 10.44574, 15],
"to": [8.91134, 11.44574, 16],
"rotation": {"angle": 22.5, "axis": "z", "origin": [3.91134, 7.44574, 16]},
"faces": {
"north": {"uv": [2, 6, 3, 6.5], "texture": "#0"},
"east": {"uv": [0.5, 8, 1, 8.5], "texture": "#0"},
"south": {"uv": [3, 6, 4, 6.5], "texture": "#0"},
"west": {"uv": [8, 0.5, 8.5, 1], "texture": "#0"},
"up": {"uv": [5, 6.5, 4, 6], "texture": "#0"},
"down": {"uv": [6, 6, 5, 6.5], "texture": "#0"}
}
},
{
"from": [2.51386, 8.72078, 15],
"to": [3.51386, 10.72078, 16],
"rotation": {"angle": -22.5, "axis": "z", "origin": [3.51386, 7.72078, 16]},
"faces": {
"north": {"uv": [6, 6, 6.5, 7], "texture": "#0"},
"east": {"uv": [2, 6.5, 2.5, 7.5], "texture": "#0"},
"south": {"uv": [6.5, 2, 7, 3], "texture": "#0"},
"west": {"uv": [2.5, 6.5, 3, 7.5], "texture": "#0"},
"up": {"uv": [1.5, 8.5, 1, 8], "texture": "#0"},
"down": {"uv": [2, 8, 1.5, 8.5], "texture": "#0"}
}
},
{
"from": [2.03092, 10.75378, 15],
"to": [3.03092, 12.75378, 16],
"rotation": {"angle": -45, "axis": "z", "origin": [3.03092, 8.75378, 16]},
"faces": {
"north": {"uv": [3, 6.5, 3.5, 7.5], "texture": "#0"},
"east": {"uv": [6.5, 3, 7, 4], "texture": "#0"},
"south": {"uv": [3.5, 6.5, 4, 7.5], "texture": "#0"},
"west": {"uv": [4, 6.5, 4.5, 7.5], "texture": "#0"},
"up": {"uv": [2.5, 8.5, 2, 8], "texture": "#0"},
"down": {"uv": [8.5, 2, 8, 2.5], "texture": "#0"}
}
},
{
"from": [7, 12.05468, 15],
"to": [9, 13.05468, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 0.05468, 15]},
"faces": {
"north": {"uv": [7.5, 1, 8.5, 1.5], "texture": "#0"},
"east": {"uv": [5.5, 8, 6, 8.5], "texture": "#0"},
"south": {"uv": [7.5, 1.5, 8.5, 2], "texture": "#0"},
"west": {"uv": [8, 5.5, 8.5, 6], "texture": "#0"},
"up": {"uv": [3, 8, 2, 7.5], "texture": "#0"},
"down": {"uv": [4, 7.5, 3, 8], "texture": "#0"}
}
},
{
"from": [3.9, 5, 16],
"to": [12.1, 11, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 16]},
"faces": {
"north": {"uv": [0, 0, 4, 3], "texture": "#0"},
"east": {"uv": [0, 0, 0, 3], "texture": "#0"},
"south": {"uv": [0, 3, 4, 6], "texture": "#0"},
"west": {"uv": [0, 0, 0, 3], "texture": "#0"},
"up": {"uv": [4, 0, 0, 0], "texture": "#0"},
"down": {"uv": [4, 0, 0, 0], "texture": "#0"}
}
},
{
"from": [5, 11, 16],
"to": [11, 12.1, 16],
"faces": {
"north": {"uv": [4, 0, 7, 0.5], "texture": "#0"},
"east": {"uv": [0, 0, 0, 0.5], "texture": "#0"},
"south": {"uv": [4, 0.5, 7, 1], "texture": "#0"},
"west": {"uv": [0, 0, 0, 0.5], "texture": "#0"},
"up": {"uv": [3, 0, 0, 0], "texture": "#0"},
"down": {"uv": [3, 0, 0, 0], "texture": "#0"}
}
},
{
"from": [5, 4, 16],
"to": [11, 5, 16],
"faces": {
"north": {"uv": [4, 1, 7, 1.5], "texture": "#0"},
"east": {"uv": [0, 0, 0, 0.5], "texture": "#0"},
"south": {"uv": [4, 1.5, 7, 2], "texture": "#0"},
"west": {"uv": [0, 0, 0, 0.5], "texture": "#0"},
"up": {"uv": [3, 0, 0, 0], "texture": "#0"},
"down": {"uv": [3, 0, 0, 0], "texture": "#0"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [75, 45, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"thirdperson_lefthand": {
"rotation": [75, 45, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"firstperson_righthand": {
"rotation": [0, 45, 0],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_lefthand": {
"rotation": [0, 225, 0],
"scale": [0.4, 0.4, 0.4]
},
"ground": {
"translation": [0, 3, 0],
"scale": [0.25, 0.25, 0.25]
},
"gui": {
"rotation": [30, 225, 0],
"scale": [0.625, 0.625, 0.625]
},
"head": {
"rotation": [0, 180, 0],
"translation": [0, 13, 7]
},
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [
{
"name": "group",
"origin": [8, 8, 8],
"color": 0,
"children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
}
]
}

测试

那么最后,我们就可以进入游戏进行测试了