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: variables:
name: "UltimateStacker" name: "UltimateStacker"
path: "/builds/$CI_PROJECT_PATH" path: "/builds/$CI_PROJECT_PATH"
version: "1.8.10" version: "1.8.11"
build: build:
stage: build stage: build

View File

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