9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-19 15:09:15 +00:00
This commit is contained in:
XiaoMoMi
2025-11-20 23:55:59 +08:00
parent a0c4d120db
commit c2a8fdf6e5
2 changed files with 10 additions and 4 deletions

View File

@@ -84,11 +84,14 @@ public class ItemDisplayBlockEntityElementConfig implements BlockEntityElementCo
if (previousRotation.x != 0 || previousRotation.y != 0 || previousRotation.z != 0 || previousRotation.w != 1) { if (previousRotation.x != 0 || previousRotation.y != 0 || previousRotation.z != 0 || previousRotation.w != 1) {
return null; return null;
} }
Vector3f translation = previous.config.translation;
if (translation.x != 0 || translation.y != 0 || translation.z != 0) {
return null;
}
return new ItemDisplayBlockEntityElement(this, pos, previous.entityId, return new ItemDisplayBlockEntityElement(this, pos, previous.entityId,
previous.config.yRot != this.yRot || previous.config.yRot != this.yRot ||
previous.config.xRot != this.xRot || previous.config.xRot != this.xRot ||
!previous.config.position.equals(this.position) || !previous.config.position.equals(this.position)
!previous.config.translation.equals(this.translation)
); );
} }

View File

@@ -72,11 +72,14 @@ public class TextDisplayBlockEntityElementConfig implements BlockEntityElementCo
if (previousRotation.x != 0 || previousRotation.y != 0 || previousRotation.z != 0 || previousRotation.w != 1) { if (previousRotation.x != 0 || previousRotation.y != 0 || previousRotation.z != 0 || previousRotation.w != 1) {
return null; return null;
} }
Vector3f translation = previous.config.translation;
if (translation.x != 0 || translation.y != 0 || translation.z != 0) {
return null;
}
return new TextDisplayBlockEntityElement(this, pos, previous.entityId, return new TextDisplayBlockEntityElement(this, pos, previous.entityId,
previous.config.yRot != this.yRot || previous.config.yRot != this.yRot ||
previous.config.xRot != this.xRot || previous.config.xRot != this.xRot ||
!previous.config.position.equals(this.position) || !previous.config.position.equals(this.position)
!previous.config.translation.equals(this.translation)
); );
} }