Fix portals placing in the ground

This commit is contained in:
Sollace 2024-01-27 00:21:27 +00:00
parent 8b7a55d764
commit cd9597f117
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -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