From d9b6c3f6e03e619f10c97a1e7b3a167c86f0faac Mon Sep 17 00:00:00 2001 From: Sollace Date: Thu, 7 May 2020 13:14:46 +0200 Subject: [PATCH] Fixed particles not spawning for small entities --- .../com/minelittlepony/unicopia/particles/ParticleUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/particles/ParticleUtils.java b/src/main/java/com/minelittlepony/unicopia/particles/ParticleUtils.java index b31e048d..129f7a4c 100644 --- a/src/main/java/com/minelittlepony/unicopia/particles/ParticleUtils.java +++ b/src/main/java/com/minelittlepony/unicopia/particles/ParticleUtils.java @@ -12,10 +12,10 @@ import net.minecraft.particle.ParticleEffect; public final class ParticleUtils { public static void spawnParticles(ParticleEffect particleId, Entity entity, int count) { - double halfDist = entity.getStandingEyeHeight() / 1.5; + double halfDist = Math.abs(entity.getStandingEyeHeight() / 1.5); double middle = entity.getBoundingBox().y1 + halfDist; - Shape shape = new Sphere(false, (float)halfDist + entity.getWidth()); + Shape shape = new Sphere(false, Math.abs((float)halfDist + entity.getWidth())); shape.randomPoints(count, entity.world.random).forEach(point -> { entity.world.addParticle(particleId,