Distribute heart particles using a gaussian curve
This commit is contained in:
parent
a9311e7457
commit
c2b025e883
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user