
tintindex actually set as tintIndex
VeeAyeInIn opened this issue ยท 0 comments
When you declare a tintindex of a JFace, it actually sets the value to "tintIndex", which at first glance looks the same, but the capital 'I' keeps the tints from affecting the face properly.
JModel blockModel = JModel.model("block/cube_all").textures(
JModel.textures().var("all", prefixIdentifier(baseIdentifier, "block")).particle("#all")
).element(JModel.element()
.from(0, 0, 0)
.to(16, 16, 16)
.faces(JModel.faces()
.down (JModel.face("all") .cullface(Direction.DOWN) .uv(0, 0, 16, 16) .tintIndex(0))
.up (JModel.face("all") .cullface(Direction.UP) .uv(0, 0, 16, 16) .tintIndex(0))
.north (JModel.face("all") .cullface(Direction.NORTH) .uv(0, 0, 16, 16) .tintIndex(0))
.south (JModel.face("all") .cullface(Direction.SOUTH) .uv(0, 0, 16, 16) .tintIndex(0))
.west (JModel.face("all") .cullface(Direction.WEST) .uv(0, 0, 16, 16) .tintIndex(0))
.east (JModel.face("all") .cullface(Direction.EAST) .uv(0, 0, 16, 16) .tintIndex(0))
)
);
In this case, it outputs a normally correct JSON file, save for the use of "tintIndex"
Expected output:
{
"parent": "block/cube_all",
"textures": {
"all": "minecraft:block/stone",
"particle": "#all"
},
"elements": [
{
"from": [
0.0,
0.0,
0.0
],
"to": [
16.0,
16.0,
16.0
],
"faces": {
"up": {
"uv": [
0.0,
0.0,
16.0,
16.0
],
"texture": "#all",
"cullface": "up",
"tintindex": 0
},
"down": {
"uv": [
0.0,
0.0,
16.0,
16.0
],
"texture": "#all",
"cullface": "down",
"tintindex": 0
},
"north": {
"uv": [
0.0,
0.0,
16.0,
16.0
],
"texture": "#all",
"cullface": "north",
"tintindex": 0
},
"south": {
"uv": [
0.0,
0.0,
16.0,
16.0
],
"texture": "#all",
"cullface": "south",
"tintindex": 0
},
"east": {
"uv": [
0.0,
0.0,
16.0,
16.0
],
"texture": "#all",
"cullface": "east",
"tintindex": 0
},
"west": {
"uv": [
0.0,
0.0,
16.0,
16.0
],
"texture": "#all",
"cullface": "west",
"tintindex": 0
}
}
}
]
}
Actual output:
{
"parent": "block/cube_all",
"textures": {
"all": "minecraft:block/stone",
"particle": "#all"
},
"elements": [
{
"from": [
0.0,
0.0,
0.0
],
"to": [
16.0,
16.0,
16.0
],
"faces": {
"up": {
"uv": [
0.0,
0.0,
16.0,
16.0
],
"texture": "#all",
"cullface": "up",
"tintIndex": 0
},
"down": {
"uv": [
0.0,
0.0,
16.0,
16.0
],
"texture": "#all",
"cullface": "down",
"tintIndex": 0
},
"north": {
"uv": [
0.0,
0.0,
16.0,
16.0
],
"texture": "#all",
"cullface": "north",
"tintIndex": 0
},
"south": {
"uv": [
0.0,
0.0,
16.0,
16.0
],
"texture": "#all",
"cullface": "south",
"tintIndex": 0
},
"east": {
"uv": [
0.0,
0.0,
16.0,
16.0
],
"texture": "#all",
"cullface": "east",
"tintIndex": 0
},
"west": {
"uv": [
0.0,
0.0,
16.0,
16.0
],
"texture": "#all",
"cullface": "west",
"tintIndex": 0
}
}
}
]
}