mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Move vectors to static creators, for caching
This commit is contained in:
@ -249,7 +249,7 @@ public abstract class SpongeWorld extends AbstractWorld {
|
||||
List<Entity> entities = new ArrayList<>();
|
||||
for (org.spongepowered.api.entity.Entity entity : getWorld().getEntities()) {
|
||||
org.spongepowered.api.world.Location<World> loc = entity.getLocation();
|
||||
if (region.contains(new BlockVector3(loc.getX(), loc.getY(), loc.getZ()))) {
|
||||
if (region.contains(BlockVector3.at(loc.getX(), loc.getY(), loc.getZ()))) {
|
||||
entities.add(new SpongeEntity(entity));
|
||||
}
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ public interface SpongeImplAdapter {
|
||||
}
|
||||
|
||||
default Location adapt(org.spongepowered.api.world.Location<org.spongepowered.api.world.World> loc, Vector3d rot) {
|
||||
Vector3 position = new Vector3(loc.getX(), loc.getY(), loc.getZ());
|
||||
Vector3 position = Vector3.at(loc.getX(), loc.getY(), loc.getZ());
|
||||
|
||||
return new Location(getWorld(loc.getExtent()), position, (float) rot.getY(), (float) rot.getX());
|
||||
}
|
||||
|
Reference in New Issue
Block a user