-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathSPEC.json5
More file actions
107 lines (94 loc) · 5.52 KB
/
SPEC.json5
File metadata and controls
107 lines (94 loc) · 5.52 KB
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
// This JSON file holds the complete specification for JSON-defined entity models. It only ends in .json5 for formatting purposes.
// Note that this should be used as a reference, and not copied directly. Comments are not allowed in the final JSON file.
{
// The mesh definition holds all children, cubes, and extra data in the model. Required.
"mesh": {
// Overwrite is a true/false boolean used to determine whether to overwrite a model of the same name that is defined in code or an earlier resource pack.
// Its value does not affect anything if there is no model to overwrite.
// If set to false and another model with the same name exists, that model will be merged with this one.
// Merging happens by joining the children of both models together. Children defined in this model override any other.
// If set to true, any model will be overwritten entirely with this one.
// Optional. Defaults to true.
"overwrite": true,
// A parent model is useful to define shared children between models.
// A parent model's children map, if it exists, will be merged into this model's children.
// Merging happens by joining the children of both models together. Children defined in this model override any other.
// Optional.
"parent": "minecraft:cat#main",
// The universal cube deformation can be used to scale an entire model.
// By default, all grow values start at 0.
// Each grow value is applied by expanding the supplied axis in both directions by the amount specified.
// Optional.
"universalCubeDeformation": {
"growX": 2.5, // Grows the X axis by the defined value at both edges. Optional.
"growY": 3.0, // Grows the Y axis by the defined value at both edges. Optional.
"growZ": 4.5 // Grows the Z axis by the defined value at both edges. Optional.
},
// A cube deformation which should be applied with the same value for all 3 axes can also be defined with one number.
// This grows the X, Y, and Z axes all by the value 5 on all sides.
// "universalCubeDeformation": 5,
// The root definition holds the children and cube data defined in the model.
// Optional, although in almost all cases you will want to have this.
"root": {
// The children map of name to part definition. Optional.
"children": {
// This declares a child with the name "head".
// You should name your child parts something sensible, as the same name has to appear in code.
"head": {
// The children of this child part.
// Each child part can have its own children, as many sub children as you want.
// Each sub child is affected by the part pose (offset and rotation) of its parent.
// Optional.
"children": {},
// The list of cubes for the child part. You can have as many cubes as you want.
// Each one is a square with a defined size, position, and growth factor.
// Optional.
"cubes": [
{
// The UV texture coordinates.
// U - x (left to right) coordinate on the texture.
// V - y (up to down) coordinate on the texture.
// Required.
"texCoord": {
"u": 0,
"v": 0
},
// Mirrors the UV mapping texture on the X axis.
// For example, used in vanilla to mirror the left leg/arm using the same UV mapping texture as the right leg/arm.
// Optional. Defaults to false.
"mirror": false,
// The comment and can be helpful to document what each model cube is, but it does nothing on its own. Optional.
"comment": "main",
// The origin specifies what coordinates to place this cube at. Required.
"origin": [
-3.5,
-3.0,
-4.0
],
// The dimensions specify the length of the cube on each axis in order of X, Y, Z. Required.
"dimensions": [
5.0,
4.0,
5.0
],
// "grow" is a cube deformation, it works the same as "universalCubeDeformation" but for only this cube.
// Optional, defaults to no growth.
"grow": 0.01
}
],
// The part pose determines the offset and rotation of this part definition relative to the origin of the parent part definition.
// All values default to 0.
// Optional.
"partPose": {
"x": 10.2, // Offsets this part definition by the amount specified on the X axis, relative to the origin of the parent part definition. Optional.
"y": 15.0, // Offsets this part definition by the amount specified on the Y axis, relative to the origin of the parent part definition. Optional.
"z": -9.0, // Offsets this part definition by the amount specified on the Z axis, relative to the origin of the parent part definition. Optional.
"xRot": 0, // Rotates this part definition by the amount specified, in radians, on the X axis, relative to the origin of the parent part definition. Optional.
"yRot": 0, // Rotates this part definition by the amount specified, in radians, on the Y axis, relative to the origin of the parent part definition. Optional.
"zRot": 0 // Rotates this part definition by the amount specified, in radians, on the Z axis, relative to the origin of the parent part definition. Optional.
}
}
}
}
}
}