private Packet getFastPacket51(int cx, int cz) { World world = getPlayer().getWorld(); if (!world.isChunkLoaded(cx, cz)) { world.loadChunk(cx, cz); } Packet packet = new Packet51MapChunk(cx << 4, 0, cz << 4, 16, 128, 16, this.player.world); try { packet.lowPriority = false; Field g = Packet51MapChunk.class.getDeclaredField("buffer"); g.setAccessible(true); byte[] compressedData = (byte[]) g.get(packet); if (compressedData == null) { MCPacket.setPacket(packet, 51); if (!PacketListeners.canSendUncompressedPacket(getPlayer(), MCPacket)) { return null; } AtomicInteger size = new AtomicInteger(0); Field rawData; try { rawData = Packet51MapChunk.class.getDeclaredField("rawData"); } catch (NoSuchFieldException e) { rawData = Packet51MapChunk.class.getDeclaredField("buffer"); } Field h = Packet51MapChunk.class.getDeclaredField("size"); rawData.setAccessible(true); h.setAccessible(true); byte[] rawBytes = (byte[]) rawData.get(packet); if (rawBytes != null) { g.set(packet, compressData(rawBytes, size)); h.set(packet, size.get()); } } } catch (NoSuchFieldException e) { return null; } catch (IllegalAccessException e) { e.printStackTrace(); } return packet; }