Fixed crash when teleporting

This commit is contained in:
Sollace 2021-09-03 00:47:34 +02:00
parent e6223c8de1
commit 430ee9a85e

View file

@ -85,7 +85,7 @@ public class UnicornTeleportAbility implements Ability<Pos> {
boolean airAbove = enterable(w, pos.up()) && enterable(w, pos.up(2));
if (exception(w, pos, player.getMaster())) {
if (exception(w, pos, player.getMaster()) && ray.getType() == HitResult.Type.BLOCK) {
Direction sideHit = ((BlockHitResult)ray).getSide();
if (player.getMaster().isSneaking()) {