mojira.dev
MC-134110

Structure mirroring breaking apart double chests

The bug

When loading any structure that contains a double chest, that chest will always load as two independent single chests if the structure is being mirrored. This happens regardless of the orientation of the chest, the direction of the mirroring, and the rotation of the structure.

How to reproduce

  1. /place template minecraft:woodland_mansion/2x2_a2 ~ ~ ~ none
  2. Observe double chests.

  3. /place template minecraft:woodland_mansion/2x2_a2 ~ ~ ~ none left_right
  4. Observe single chests next to each other.

There is a fix in Forge #7803 .

Linked issues

Attachments

Comments 8

It seems that this happens, because chests' block state don't change the type value based on mirroring in a structure, resulting in an invalid chest (with the connections going outside), which will become single chests because of block updates.
the fix is quite simple: make chests' type values left and right turn to right and left when being mirrored, just like door hinges

Yes, the change is less than a line of code in the ChestBlock class.  The mirror function (as named in the official mappings) already exists and just needs the block state updated to swap left and right chest types (a function which also already exists, net.minecraft.world.level.block.state.properties.ChestType.getOpposite in the official mappings).

Confirmed for 1.17.1.

Confirmed for 1.19 Pre-release 3, I noticed it in a Woodland Mansion storage room.

Can confirm in 1.19.

Confirmed for 1.19.2.
Last time Callum updated this report was 2 years ago, so I'd like to request ownership.

Callum Milne

user-f2760

(Unassigned)

Confirmed

Platform

Low

Structures

structure_block

Minecraft 1.13, Minecraft 1.13.1, Minecraft 1.13.2-pre1, Minecraft 1.13.2-pre2, Minecraft 1.13.2, ..., 1.19.3, 1.19.4, 1.20.1, 1.20.2, 23w43b

Retrieved