Distribute heart particles using a gaussian curve

This commit is contained in:
Graphica 2017-06-28 18:32:39 -04:00 committed by cnr
parent a9311e7457
commit c2b025e883

View File

@ -1,5 +1,6 @@
package mineplex.core.gadget.gadgets.particle;
import mineplex.core.common.util.UtilMath;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@ -37,11 +38,11 @@ public class ParticleHeart extends ParticleGadget
{
if(getSet() == null || !getSet().isActive(player)) return;
UtilParticle.playParticleFor(player, ParticleType.HEART, player.getLocation().add(0, 1, 0), null, 0, 1, ViewDist.NORMAL);
UtilParticle.playParticleFor(player, ParticleType.HEART, player.getLocation().add(0, 1.2, 0), null, 0, 1, ViewDist.NORMAL);
}
else
{
UtilParticle.playParticleFor(player, ParticleType.HEART, player.getLocation().add(0, 1, 0), 0.5f, 0.5f, 0.5f, 0, 1, ViewDist.NORMAL);
UtilParticle.playParticleFor(player, ParticleType.HEART, UtilMath.gauss(player.getLocation(), 1, 3, 1).add(0, 1.2, 0), null, 0, 1, ViewDist.NORMAL);
}
}