Fixed distance comparing.

This commit is contained in:
Brianna 2019-08-04 16:04:44 -04:00
parent b4a31c525a
commit 7907cf195a
2 changed files with 4 additions and 3 deletions

View File

@ -4,7 +4,7 @@ stages:
variables:
name: "UltimateStacker"
path: "/builds/$CI_PROJECT_PATH"
version: "1.8.10"
version: "1.8.11"
build:
stage: build

View File

@ -59,8 +59,9 @@ public class EntityUtils {
cachedChunks.put(chunk, entityArray);
}
for (Entity e : entityArray) {
if (!(e instanceof LivingEntity)
|| location.distance(e.getLocation()) >= radius) continue;
if (e.getWorld() == location.getWorld()
|| !(e instanceof LivingEntity)
|| location.distanceSquared(e.getLocation()) >= radius * radius) continue;
entities.add((LivingEntity) e);
}
}