I'm making a Minecraft world exporter, where I'm currently working on adding support for Bedrock edition. It's basically all done. I've added in that it can also simulate and animate entities based on the data from the resource packs and behaviour packs.
I'm testing it out with some vanilla entities and it's all working, but some mobs don't show up the same as in Minecraft. For example, the heads of sheep are moved down.
When I look at the animations for sheep, I find this ```JSON
"animation.sheep.setup" : {
"loop" : true,
"bones" : {
"body" : {
"rotation" : [ "-this", 0.0, 0.0 ]
},
"head" : {
"position" : [ 0.0, "-6.0 - this", 0.0 ]
}
}
}
Which is the cause for the sheep's head to be moved down, but this animation is also applied in vanilla Minecraft, yet it doesn't move the sheep's head downwards.
Another example is polar bears. Polar bears are sunk into the ground. And again, then looking through the animation files I find this: ```JSON
"animation.polarbear.move" : {
"loop" : true,
"bones" : {
"body" : {
"position" : [ 0.0, "-9 - 2 * query.standing_scale - this", 0.0 ],
"rotation" : [ "(-(query.standing_scale) * 63) - this", 0.0, 0.0 ]
},
"leg0" : {
"position" : [ 0.0, "-1 * query.standing_scale", "6 * query.standing_scale" ],
"rotation" : [ "query.standing_scale * 63", 0.0, 0.0 ]
},
"leg1" : {
"position" : [ 0.0, "-1 * query.standing_scale", "6 * query.standing_scale" ],
"rotation" : [ "query.standing_scale * 63", 0.0, 0.0 ]
},
"leg2" : {
"rotation" : [ "(query.standing_scale > 1) ? (query.standing_scale * 81) - this : 0", 0.0, 0.0 ]
},
"leg3" : {
"rotation" : [ "(query.standing_scale > 1) ? (query.standing_scale * 81) - this : 0", 0.0, 0.0 ]
}
}
}
Which moves the body down by 9 units, causing it to sink into the ground.
I thought maybe it's something hardcoded, but in the minecraft-samples repository there are some example addons and this one has a black bear entity which is basically a copy of the polar bear. It also has the same animation as the polar bear, including the -9 on the body's position. So my exporter also moves it down, yet in Minecraft it shows up correctly.
So, there's something that Minecraft is doing that isn't documented anywhere or I missed something. I'm just a bit at a loss at what I'm missing.
Does anyone here have a clue at what's going on?