From cd9597f117f3b264b85f704da26d4d6809f5e6fd Mon Sep 17 00:00:00 2001 From: Sollace Date: Sat, 27 Jan 2024 00:21:27 +0000 Subject: [PATCH] Fix portals placing in the ground --- .../unicopia/ability/magic/spell/effect/PortalSpell.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/PortalSpell.java b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/PortalSpell.java index fa2963f5..82a66ad9 100644 --- a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/PortalSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/PortalSpell.java @@ -211,7 +211,7 @@ public class PortalSpell extends AbstractSpell implements PlaceableSpell.Placeme LivingEntity caster = source.getMaster(); Vec3d targetPos = caster.getRotationVector().multiply(3).add(caster.getEyePos()); parent.setOrientation(pitch, yaw); - entity.setPos(targetPos.x, caster.getEyePos().y - (entity.getHeight() * 0.5F), targetPos.z); + entity.setPos(targetPos.x, Math.abs(pitch) > 15 ? targetPos.y : caster.getPos().y, targetPos.z); } @Override