Skip to content

Commit

Permalink
Fix the draw smoke task being able to load chunks (#7053)
Browse files Browse the repository at this point in the history
  • Loading branch information
Warriorrrr authored Oct 28, 2023
1 parent 439af91 commit 8cc8ef3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Towny/src/main/java/com/palmergames/bukkit/util/DrawUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ public static void runOnSurface(World world, int x1, int z1, int x2, int z2, int

for (int z = _z1; z <= _z2; z++) {
for (int x = _x1; x <= _x2; x++) {
if (!world.isChunkLoaded(x >> 4, z >> 4)) {
continue;
}

int start = world.getHighestBlockYAt(x, z);
int end = (start + height) < world.getMaxHeight() ? (start + height - 1) : world.getMaxHeight();
for (int y = start; y <= end; y++) {
Expand Down

0 comments on commit 8cc8ef3

Please sign in to comment.