Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-03 01:50:07 +01:00
Fix entity rotation.
Dieser Commit ist enthalten in:
Ursprung
7257c7bb2b
Commit
2009344058
@ -92,9 +92,10 @@ public class ExtentEntityCopy implements EntityFunction {
|
|||||||
|
|
||||||
if (!transform.isIdentity()) {
|
if (!transform.isIdentity()) {
|
||||||
Location location = entity.getLocation();
|
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();
|
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
|
// Some entities store their position data in NBT
|
||||||
state = transformNbtData(state);
|
state = transformNbtData(state);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren