Skip to content

Commit

Permalink
Merge branch 'GriefPrevention:master' into update
Browse files Browse the repository at this point in the history
  • Loading branch information
SrBedrock authored Apr 25, 2024
2 parents 4d2c589 + 4c71b71 commit 2620183
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions src/main/java/me/ryanhamshire/GriefPrevention/Claim.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,25 @@ boolean hasSurfaceFluids()
this.id = id;

//store corners
this.lesserBoundaryCorner = lesserBoundaryCorner;
this.greaterBoundaryCorner = greaterBoundaryCorner;
this.lesserBoundaryCorner = lesserBoundaryCorner.clone();
this.greaterBoundaryCorner = greaterBoundaryCorner.clone();

// Sanitize corners
int x1 = this.lesserBoundaryCorner.getBlockX();
int x2 = this.greaterBoundaryCorner.getBlockX();
if (x1 > x2)
{
this.greaterBoundaryCorner.setX(x1);
this.lesserBoundaryCorner.setX(x2);
}
int z1 = this.lesserBoundaryCorner.getBlockZ();
int z2 = this.greaterBoundaryCorner.getBlockZ();
if (z1 > z2)
{
this.greaterBoundaryCorner.setZ(z1);
this.lesserBoundaryCorner.setZ(z2);
}
this.lesserBoundaryCorner.setY(Math.min(this.lesserBoundaryCorner.getBlockY(), this.greaterBoundaryCorner.getBlockY()));

//owner
this.ownerID = ownerID;
Expand Down

0 comments on commit 2620183

Please sign in to comment.