mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2026-01-03 22:26:16 +00:00
修复entity-renderer旋转造成的问题
This commit is contained in:
@@ -80,6 +80,10 @@ public class ItemDisplayBlockEntityElementConfig implements BlockEntityElementCo
|
||||
|
||||
@Override
|
||||
public ItemDisplayBlockEntityElement create(World world, BlockPos pos, ItemDisplayBlockEntityElement previous) {
|
||||
Quaternionf previousRotation = previous.config.rotation;
|
||||
if (previousRotation.x != 0 || previousRotation.y != 0 || previousRotation.z != 0 || previousRotation.w != 1) {
|
||||
return null;
|
||||
}
|
||||
return new ItemDisplayBlockEntityElement(this, pos, previous.entityId, previous.config.yRot != this.yRot || !previous.config.position.equals(this.position));
|
||||
}
|
||||
|
||||
|
||||
@@ -68,6 +68,10 @@ public class TextDisplayBlockEntityElementConfig implements BlockEntityElementCo
|
||||
|
||||
@Override
|
||||
public TextDisplayBlockEntityElement create(World world, BlockPos pos, TextDisplayBlockEntityElement previous) {
|
||||
Quaternionf previousRotation = previous.config.rotation;
|
||||
if (previousRotation.x != 0 || previousRotation.y != 0 || previousRotation.z != 0 || previousRotation.w != 1) {
|
||||
return null;
|
||||
}
|
||||
return new TextDisplayBlockEntityElement(this, pos, previous.entityId, previous.config.yRot != this.yRot || !previous.config.position.equals(this.position));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user