Skip to content

Commit

Permalink
Fixes copy-paste issues in range update mode
Browse files Browse the repository at this point in the history
While migrating to version 2.0 I made a copy-paste mistakes and broke range area calculation. These changes should fix it.

Fixes #106
  • Loading branch information
BONNe committed Aug 22, 2022
1 parent 9c9bbd0 commit 6fcec8b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/world/bentobox/biomes/tasks/BiomeUpdateHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,8 @@ private void calculateArea()

if (x < 0)
{
minX = Math.max(minX, Utils.normalizeBy4(x + halfDiameter));
maxX = Math.min(maxX, Utils.normalizeBy4(x - halfDiameter));
minX = Math.max(minX, Utils.normalizeBy4(x - halfDiameter));
maxX = Math.min(maxX, Utils.normalizeBy4(x + halfDiameter));
}
else
{
Expand All @@ -401,8 +401,8 @@ private void calculateArea()

if (z < 0)
{
minZ = Math.max(minZ, Utils.normalizeBy4(z + halfDiameter));
maxZ = Math.min(maxZ, Utils.normalizeBy4(z - halfDiameter));
minZ = Math.max(minZ, Utils.normalizeBy4(z - halfDiameter));
maxZ = Math.min(maxZ, Utils.normalizeBy4(z + halfDiameter));
}
else
{
Expand All @@ -413,7 +413,7 @@ private void calculateArea()
// Calculate Y location
int y = this.standingLocation.getBlockY();
minY = Math.max(this.world.getMinHeight(), Utils.normalizeBy4(y - halfDiameter));
maxY = Math.max(this.world.getMaxHeight(), Utils.normalizeBy4(y + halfDiameter));
maxY = Math.min(this.world.getMaxHeight(), Utils.normalizeBy4(y + halfDiameter));
}
default -> {
// Select whole island height.
Expand Down

0 comments on commit 6fcec8b

Please sign in to comment.