Prevent head bonks

This commit is contained in:
Brady
2023-06-22 12:08:30 -05:00
parent b366b1b1d1
commit f4a99253f4

View File

@@ -628,6 +628,11 @@ public final class ElytraBehavior extends Behavior implements IElytraBehavior, H
if (!this.clearView(start, dest, ignoreLava)) {
return false;
}
// Prevent head bonks
// Even though the player's hitbox is supposed to be 0.6 tall, there's no way it's actually that short
if (!this.clearView(start.add(0, 1.6, 0), dest, ignoreLava)) {
return false;
}
if (growAmount == null) {
return true;
}