Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-24 18:10:08 +01:00
Don't transform entity positions if the isIdentity() == true.
Dieser Commit ist enthalten in:
Ursprung
173f832352
Commit
7257c7bb2b
@ -88,13 +88,19 @@ public class ExtentEntityCopy implements EntityFunction {
|
||||
public boolean apply(Entity entity) throws WorldEditException {
|
||||
BaseEntity state = entity.getState();
|
||||
if (state != null) {
|
||||
Location location = entity.getLocation();
|
||||
Vector newPosition = transform.apply(location.toVector().subtract(from));
|
||||
Vector newDirection = transform.apply(location.getDirection()).subtract(transform.apply(Vector.ZERO)).normalize();
|
||||
Location newLocation = new Location(destination, newPosition.add(to), newDirection);
|
||||
Location newLocation;
|
||||
|
||||
// Some entities store their position data in NBT
|
||||
state = transformNbtData(state);
|
||||
if (!transform.isIdentity()) {
|
||||
Location location = entity.getLocation();
|
||||
Vector newPosition = transform.apply(location.toVector().subtract(from));
|
||||
Vector newDirection = transform.apply(location.getDirection()).subtract(transform.apply(Vector.ZERO)).normalize();
|
||||
newLocation = new Location(destination, newPosition.add(to), newDirection);
|
||||
|
||||
// Some entities store their position data in NBT
|
||||
state = transformNbtData(state);
|
||||
} else {
|
||||
newLocation = entity.getLocation();
|
||||
}
|
||||
|
||||
boolean success = destination.createEntity(newLocation, state) != null;
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren