Help forming matrix-form transformation NBT tag for block display
I'm trying to summon a block display entity with a translation tag of
Continue to help post[-0.5f, 0.0f, -0.5f]
(so it's centered horizontally on the origin), but trying to set that in compound form (eg. transformation: {translation: [-0.5f, 0.0f, -0.5f]}
) doesn't seem to do the trick (although applying that with /data
after the entity is created does work). I'm assuming this is because setting the transformation data of a display entity on creation requires that transformation data to be in matrix form, but the wiki's explanation of how that matrix form is made is quite confusing to me.
I've tried both of the following commands, but both of them just result in the transformation data being ignored.
summon minecraft:block_display ~ ~ ~ {block_state: {Name: "minecraft:stone"}, transformation: [0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -0.5f, 0.0f, -0.5f]}
summon minecraft:block_display ~ ~ ~ {block_state: {Name: "minecraft:stone"}, transformation: [[0.0f, 0.0f, 0.0f, 0.0f], [0.0f, 0.0f, 0.0f], [0.0f, 0.0f, 0.0f, 0.0f], [-0.5f, 0.0f, -0.5f]]}
What am I doing wrong? How can I properly form the transformation data for it to be valid for applying display translation on spawning?