getChunk loads chunks, use right method (#49)

This commit is contained in:
Josh 2020-06-08 15:33:56 -04:00 committed by GitHub
parent 7ba70c9e1d
commit 3f92772e39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -117,7 +117,7 @@ public class SnowTracker implements Listener {
private void shakeGlobes(World world) {
addon.getManager().getMap().getGreenhouses().stream().filter(g -> g.getBiomeRecipe().getIceCoverage() > 0)
.filter(g -> g.getLocation().getChunk().isLoaded())
.filter(g -> (g.getLocation().getWorld().isChunkLoaded(((int) g.getBoundingBox().getMaxX()) >> 4, ((int) g.getBoundingBox().getMaxZ()) >> 4) && g.getLocation().getWorld().isChunkLoaded(((int) g.getBoundingBox().getMinX()) >> 4, ((int) g.getBoundingBox().getMinZ()) >> 4)))
.filter(g -> g.getLocation().getWorld().equals(world))
.filter(g -> !g.isBroken())
.filter(g -> g.getRoofHopperLocation() != null)
@ -142,4 +142,4 @@ public class SnowTracker implements Listener {
snowTasks.remove(world);
}
}
}
}