Description
I think SubLevelAssemblyHelper.moveOtherStuff() is moving hanging entities using the wrong position:
entity.setPos(transform.apply(entity.position())) Source
For HangingEntity, entity.position() is the center of its bounding box, not necessarily its attachment block. BlockAttachedEntity.setPos(...) then converts that position back into an attachment BlockPos.
This is important for paintings because vanilla applies a 0.5 block offset for even dimensions in Painting.calculateBoundingBox() That offset can thus turn into a one-block attachment shift during assembly. I can reproduce this like this
This matches the behavior reported in Immersive Paintings #139 where odd-sized paintings work, while some even-sized paintings shift (and later break). Immersive Paintings uses the same offset logic in its ImmersivePaintingEntity.
A possible fix would be to transform the hanging entity's attachment position (getPos()) instead of entity.position(). Now, I might be completely wrong here but I'm running out of ideas.
Related Immersive Paintings PR #151
Game Log
https://mclo.gs/z5r8eLe
Description
I think
SubLevelAssemblyHelper.moveOtherStuff()is moving hanging entities using the wrong position:entity.setPos(transform.apply(entity.position()))SourceFor HangingEntity, entity.position() is the center of its bounding box, not necessarily its attachment block.
BlockAttachedEntity.setPos(...)then converts that position back into an attachment BlockPos.This is important for paintings because vanilla applies a 0.5 block offset for even dimensions in
Painting.calculateBoundingBox()That offset can thus turn into a one-block attachment shift during assembly. I can reproduce this like thisThis matches the behavior reported in Immersive Paintings #139 where odd-sized paintings work, while some even-sized paintings shift (and later break). Immersive Paintings uses the same offset logic in its ImmersivePaintingEntity.
A possible fix would be to transform the hanging entity's attachment position (getPos()) instead of entity.position(). Now, I might be completely wrong here but I'm running out of ideas.
Related Immersive Paintings PR #151
Game Log
https://mclo.gs/z5r8eLe