As a safety measure limit maxY <0.6D

This commit is contained in:
fullwall 2021-11-21 22:14:01 +08:00
parent 61c6863d5f
commit caff1e9ba4

View File

@ -122,7 +122,7 @@ public class Util {
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;