geforkt von Mirrors/FastAsyncWorldEdit
Fix NPE when rotating hanging entities (#356)
Dieser Commit ist enthalten in:
Ursprung
85d4b9f4ec
Commit
fabd7045e7
@ -158,12 +158,14 @@ public class ExtentEntityCopy implements EntityFunction {
|
||||
Vector vector = transform.apply(direction.toVector()).subtract(transform.apply(Vector.ZERO)).normalize();
|
||||
Direction newDirection = Direction.findClosest(vector, Flag.CARDINAL);
|
||||
|
||||
if (newDirection != null) {
|
||||
byte hangingByte = (byte) MCDirections.toHanging(newDirection);
|
||||
builder.putByte("Direction", hangingByte);
|
||||
builder.putByte("Facing", hangingByte);
|
||||
builder.putByte("Dir", MCDirections.toLegacyHanging(MCDirections.toHanging(newDirection)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new BaseEntity(state.getTypeId(), builder.build());
|
||||
}
|
||||
|
Laden…
x
In neuem Issue referenzieren
Einen Benutzer sperren