mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-11-30 14:03:24 +01:00
Fixed distance comparing.
This commit is contained in:
parent
b4a31c525a
commit
7907cf195a
@ -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
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user