mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Fix entity rotation.
This commit is contained in:
parent
7257c7bb2b
commit
2009344058
@ -92,9 +92,10 @@ public class ExtentEntityCopy implements EntityFunction {
|
||||
|
||||
if (!transform.isIdentity()) {
|
||||
Location location = entity.getLocation();
|
||||
Vector newPosition = transform.apply(location.toVector().subtract(from));
|
||||
Vector pivot = from.round().add(0.5, 0.5, 0.5);
|
||||
Vector newPosition = transform.apply(location.toVector().subtract(pivot));
|
||||
Vector newDirection = transform.apply(location.getDirection()).subtract(transform.apply(Vector.ZERO)).normalize();
|
||||
newLocation = new Location(destination, newPosition.add(to), newDirection);
|
||||
newLocation = new Location(destination, newPosition.add(to.round().add(0.5, 0.5, 0.5)), newDirection);
|
||||
|
||||
// Some entities store their position data in NBT
|
||||
state = transformNbtData(state);
|
||||
|
Loading…
Reference in New Issue
Block a user