Skip to content

Commit

Permalink
Set minimum selection height under player location
Browse files Browse the repository at this point in the history
  • Loading branch information
LordTuxn committed Oct 6, 2021
1 parent 77e8c79 commit 566e238
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ public static CompletableFuture<Void> Create(Player player, CityProject cityProj
}

// Set minimum selection height under player location
polyRegion.setMinimumY((int) player.getLocation().getY() - 5);
if (polyRegion.getMinimumY() > player.getLocation().getY() - 5) {
polyRegion.setMinimumY((int) player.getLocation().getY() - 5);
}

if (polyRegion.getMaximumY() <= player.getLocation().getY() + 1) {
polyRegion.setMaximumY((int) player.getLocation().getY() + 1);
Expand Down

0 comments on commit 566e238

Please sign in to comment.