Skip to content

Commit

Permalink
As a safety measure limit maxY <0.6D
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Nov 21, 2021
1 parent 61c6863 commit caff1e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main/src/main/java/net/citizensnpcs/util/Util.java
Expand Up @@ -122,7 +122,7 @@ public static Location getCenterLocation(Block block) {
Location center = new Location(bloc.getWorld(), bloc.getBlockX() + 0.5, bloc.getBlockY(),
bloc.getBlockZ() + 0.5);
BoundingBox bb = NMS.getCollisionBox(block);
if (bb != null) {
if (bb != null && bb.maxY < 0.6D) {
center.setY(center.getY() + bb.maxY);
}
return center;
Expand Down

0 comments on commit caff1e9

Please sign in to comment.