Solved Block MineAnimation

Discussion in 'Spigot Plugin Development' started by mopmop, Jun 11, 2018.

  1. I can not have more PacketPlayOutBlockBreakAnimation blocks (blocks with cracks in them) but every time I send another blockbreakanimation package, the first one disappears.

    Code (Java):
                        PacketPlayOutBlockBreakAnimation packet = new PacketPlayOutBlockBreakAnimation(0, new BlockPosition(e.getBlock().getX(), e.getBlock().getY(), e.getBlock().getZ()), (int)miner);
                        ((CraftServer) Bukkit.getServer()).getHandle().sendPacketNearby(e.getBlock().getX(), e.getBlock().getY(), e.getBlock().getZ(), 30, dimension , packet);
  2. The first argument is the entity id. One entity can't break two blocks at the same time.
    If you want to know more about packets, visit this page and click on the version you're using.
    • Agree Agree x 1
  3. I believe you just give the packets a different entity ID, but beware that you should not use entity ID of players / entities or else it may cause issues.
    • Agree Agree x 1
  4. Please mark this thread as solved.
    • Agree Agree x 1