public void sendBlockBreakProgress(int breakerId, BlockPos pos, int progress) { for (EntityPlayerMP entityplayermp : this.mcServer.getPlayerList().getPlayerList()) { if (entityplayermp != null && entityplayermp.world == this.theWorldServer && entityplayermp.getEntityId() != breakerId) { double d0 = (double)pos.getX() - entityplayermp.posX; double d1 = (double)pos.getY() - entityplayermp.posY; double d2 = (double)pos.getZ() - entityplayermp.posZ; if (d0 * d0 + d1 * d1 + d2 * d2 < 1024.0D) { entityplayermp.connection.sendPacket(new SPacketBlockBreakAnim(breakerId, pos, progress)); } } } }
public void sendBlockBreakProgress(int breakerId, BlockPos pos, int progress) { for (EntityPlayerMP entityplayermp : this.mcServer.getPlayerList().getPlayerList()) { if (entityplayermp != null && entityplayermp.worldObj == this.theWorldServer && entityplayermp.getEntityId() != breakerId) { double d0 = (double)pos.getX() - entityplayermp.posX; double d1 = (double)pos.getY() - entityplayermp.posY; double d2 = (double)pos.getZ() - entityplayermp.posZ; if (d0 * d0 + d1 * d1 + d2 * d2 < 1024.0D) { entityplayermp.connection.sendPacket(new SPacketBlockBreakAnim(breakerId, pos, progress)); } } } }
/** * Updates all registered IWorldAccess instances with destroyBlockInWorldPartially */ public void handleBlockBreakAnim(SPacketBlockBreakAnim packetIn) { PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController); this.gameController.world.sendBlockBreakProgress(packetIn.getBreakerId(), packetIn.getPosition(), packetIn.getProgress()); }
/** * Updates all registered IWorldAccess instances with destroyBlockInWorldPartially */ public void handleBlockBreakAnim(SPacketBlockBreakAnim packetIn) { PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController); this.gameController.theWorld.sendBlockBreakProgress(packetIn.getBreakerId(), packetIn.getPosition(), packetIn.getProgress()); }
/** * Updates all registered IWorldAccess instances with destroyBlockInWorldPartially */ void handleBlockBreakAnim(SPacketBlockBreakAnim packetIn);