Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the draw smoke task being able to load chunks #7053

Merged
merged 1 commit into from
Oct 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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