mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-11-27 12:35:17 +01:00
Fixed distance comparing.
This commit is contained in:
parent
b4a31c525a
commit
7907cf195a
@ -4,7 +4,7 @@ stages:
|
||||
variables:
|
||||
name: "UltimateStacker"
|
||||
path: "/builds/$CI_PROJECT_PATH"
|
||||
version: "1.8.10"
|
||||
version: "1.8.11"
|
||||
|
||||
build:
|
||||
stage: build
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user