Skip to content

Commit

Permalink
getChunk loads chunks, use right method (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhanaticD committed Jun 8, 2020
1 parent 7ba70c9 commit 3f92772
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private void removeWaterBucketAndShake(Greenhouse g) {

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)
Expand All @@ -142,4 +142,4 @@ private void stopSnow(World world) {
snowTasks.remove(world);
}
}
}
}

0 comments on commit 3f92772

Please sign in to comment.