Fixed the portal spell's effect not really lining up with its orientation

This commit is contained in:
Sollace 2023-09-05 20:03:31 +01:00
parent 54e0922c93
commit 3a4da158db
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB
2 changed files with 2 additions and 2 deletions

View file

@ -75,7 +75,7 @@ public class PortalSpell extends AbstractSpell implements PlaceableSpell.Placeme
teleportationTarget.getTarget().ifPresentOrElse(target -> {
particleEffect.update(getUuid(), source, spawner -> {
spawner.addParticle(new SphereParticleEffect(UParticles.DISK, getType().getColor(), 0.8F, 1.8F, new Vec3d(pitch, yaw, 0)), source.getOriginVector(), Vec3d.ZERO);
spawner.addParticle(new SphereParticleEffect(UParticles.DISK, getType().getColor(), 0.8F, 1.8F, new Vec3d(-pitch + 90, -yaw, 0)), source.getOriginVector(), Vec3d.ZERO);
});
}, () -> {
particleEffect.destroy();

View file

@ -18,7 +18,7 @@ public class DiskParticle extends SphereParticle {
super(effect, w, x, y, z, 0, 0, 0);
rotation.mul(RotationAxis.POSITIVE_Y.rotationDegrees((float)effect.getOffset().y));
rotation.mul(RotationAxis.POSITIVE_X.rotationDegrees(90 - (float)effect.getOffset().x));
rotation.mul(RotationAxis.POSITIVE_X.rotationDegrees(180 - (float)effect.getOffset().x));
effect.setOffset(new Vec3d(0, 0.25, 0));
}