mojira.dev
MC-105317

Structure blocks do not rotate entities correctly when loading

Saving a structure with a structure block and then loading it with a rotation (In this case I selected 270 degrees) loaded the entities in a different rotation relative to the structure compared to when it was saved.

Linked issues

Attachments

Comments 20

Confirmed
Added a smaller structure

Problem is still present in 1.14

This also affects villages as of 1.14 (specifically the house village/taiga/houses/taiga_armorer_2), see MC-150634

How many votes are needed for Bug to be assigned?

 

From my testing, structure blocks rotate entities the opposite direction they are supposed to (MC-188092)
And I haven't looked very thoroughly, but I think this is caused by

entity.moveTo(vec3.x, vec3.y, vec3.z, mirror + entity.yRot - entity.rotate(rotation), entity.xRot)

in StructureTemplate#placeEntities
Since entity.rotate returns the entity's current rotation plus the passed in rotation, and since mirror is usually yRot, the end result is yRot+yRot-(yRot+rotation), which simplifies to yRot-rotation instead of yRot+rotation

10 more comments

Affects 1.18.2-pre2

Affects 1.18.2-pre3

Affects 1.18.2-rc1

I don't think it makes much sense to keep editing this bug report. I'm not quite sure about the remaining bug you claim exists, but from what it seems it is different in that the original bug report didn't cover item frames at all.

Additionally for future viewing, if we end up editing this bug report now to specifically talk about item frames, it'll be difficult to understand what was actually (attempted to be) fixed in the previous times this was marked as fixed. Hence we try to avoid doing that.

Rather please consider filing a new bug report (about item frames specifically) that we can mark as related to this one. If more info then surfaces (aka it also affects other entities than item frames) we can then continue editing that new bug report.

Bradley Forrester

elvendorke

Confirmed

Important

Structures

structure_block

Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w32b, Minecraft 16w33a, Minecraft 16w36a, ..., 1.16.5, 1.17.1, 21w37a, 1.18.1, 22w05a

22w06a

Retrieved