Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onPlayerInteract(PlayerInteractEvent e) {
- if (e.getClickedBlock() == null) {
- return;
- }
- Location loc = player.getLocation();
- int radius = 2;
- for(double y = 0; y <= 50; y+=0.05) {
- double x = radius * Math.cos(y);
- double z = radius * Math.sin(y);
- PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(
- EnumParticle.HEART, // tipo da particle
- true, // true
- e.getClickedBlock().getX(), // cordenada x
- e.getClickedBlock().getY(), // cordenada y
- e.getClickedBlock().getZ(), // cordenada z
- 0, // x offset
- 0, // y offset
- 0, // z offset
- 10, // velocidade
- 1000, // número de partículas.
- null
- );
- ((CraftPlayer) e.getPlayer()).getHandle().playerConnection.sendPacket(packet);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement