0x26 S26PacketMapChunkBulk
Sends multiple chunks at once. Used for initial world load and large area updates.
Published 2026-06-18 · Updated 2026-10-14
Fields
| Field | Type | Description |
|---|---|---|
| chunks | Chunk[] | Array of chunk data with X/Z/bitmask/compressed data |
| skyLightSent | boolean | Whether skylight data is included |
Wire Encoding
| Field | Type | Notes |
|---|---|---|
| Sky Light | bool | Includes skylight |
| Column Count | VarInt | |
| Per Column | int,int,short,VarInt,byte[] | X, Z, bitmask, dataSize, compressed data |
MCP References
NetHandlerPlayClient.handleMapChunkBulk()Handler Interface
INetHandlerPlayClientNotes
Vanilla Source
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 | |
| 111 | |
| 112 | |
| 113 | |
| 114 | |
| 115 | |
| 116 | |
| 117 | |
| 118 | |
Deobfuscated MCP 1.8.9 source of S26PacketMapChunkBulk, fetched directly from Marcelektro/MavenMCP-1.8.9 (net/minecraft/network/play/server/S26PacketMapChunkBulk.java) at build time and verified present.
Deep Dive
Role in the protocol
S26 is the bulk chunk loader: one packet carrying many chunk columns with a shared sky-light flag. Each column is x/z ints, a 16-bit section bitmask, a VarInt data size, then the compressed section data. The server builds it in EntityPlayerMP when a player joins or moves between chunk groups (corpus line 330), batching all newly-loaded columns so the client can decode them in one pass. It is the load-bearing packet for world join and teleport.
Vanilla handling
NetHandlerPlayClient.handleMapChunkBulk loops the columns, calls doPreChunk to mark each as loaded, invalidates the block receive region, then reads each chunk via the shared PacketUtil.readCompressed path and loads it into the world. Sky-light presence is decided once per packet by the boolean flag. The client then re-renders the whole batch; on 1.8.9 this is one of the few handlers that visibly blocks the render thread while decompressing.
Why clients touch it
Zero module hits in the 8-client corpus. The only non-vanilla reference is Rise 6.x's script NetworkAPI class registration. The packet metadata for S26 mentions XRay cancelling bulk chunks, but in these 8 clients no XRay module references S26PacketMapChunkBulk at all (Tenacity's XRay touches S21PacketChunkData, not S26). The absence is practical: cancelling S26 on a join breaks the world wholesale, and the ores an XRay wants to hide are already filtered in the chunk-render path, not at the packet layer.
Exploit surface
The real abuse surface is server-to-client: a malicious server can send an S26 with an enormous uncompressed payload or a huge column count to stall the client's decompression loop, a classic 1.8 lag-machine vector. Client-side there is nothing to exploit; the packet is inbound truth. Chunk-banning clients that want to blank specific regions do it by editing the column bitmask before the vanilla handler runs, which no module in this corpus implements for S26.
Server-Side Handling
EntityPlayerMP gathers pending ChunkCoordIntPair columns and constructs S26 when the load queue is flushed. The sky-light boolean is set once from the world's dimension provider. There is no per-packet size cap in vanilla; the server trusts its own chunk generation. A client can request chunks (C03 position movement) but cannot dictate the bulk layout.
Protocol Analysis
Wire format: boolean skyLightSent, VarInt column count, then per column: int x, int z, short bitmask, VarInt data length, compressed byte[]. The bitmask is a 16-bit section selector; sections absent from the mask are inherited from the previous chunk state. The compressed payload is zlib via PacketUtil.readCompressed, with the data length prefix on the wire.
Anti-Cheat Landscape
No anti-cheat inspects S26 content; it is inbound and unspoofable. The relevant protection is on the client: crash-patch modules that bound the column count or payload size. None of the 8 clients ship one for S26 specifically; Tenacity's AntiExploit covers explosion and particle floods instead.
implementation Implementation Cases
The bulk chunk-load packet used on join and teleport. Zero modules in the 8 clients consume it; the only non-vanilla reference is Rise 6.x's scripting API registration. Its payload is inbound world truth, and the exploitable direction is server to client.
anticheat Anti-Cheat Checks
S26 is the bulk chunk variant of S21 used by 1.7 and 1.8 servers: one packet carries several chunk columns with a shared skylight flag. Anticheats treat it exactly like the single-chunk packet: the bytes are decoded into the compensated world (Grim PacketWorldReaderEight handleMapChunkBulk, Intave MapChunkBulkReader, Kauri World update via ChunkDataBulk, Truthful CompensatedWorld via the global chunk cache), and the same xray and world-downloader protections apply (Photon WorldDownloaderSentinel). The corpus for S26 is therefore the replication pipeline with bulk-specific readers.
Decode the S26 bulk packet into Grim's compensated world, column by column.
handleMapChunkBulk reads the skylight boolean, column count, and per-column x/z and section masks, then for each column decodes the 16 sections with the 1.8 palette reader, skips the 256 biome bytes plus 2048 block-light (and 2048 sky-light when the flag is set) per section, and merges the column into the compensated world cache with the transaction id. The dispatch lives in BasePacketWorldReader, which routes chunk-data-bulk packets here.
// ===== FILE: GrimAnticheat-Grim, common/src/main/java/ac/grim/grimac/events/packets/worldreader/PacketWorldReaderEight.java =====
package ac.grim.grimac.events.packets.worldreader;
import ac.grim.grimac.player.GrimPlayer;
import com.github.retrooper.packetevents.event.PacketSendEvent;
import com.github.retrooper.packetevents.protocol.world.chunk.impl.v1_16.Chunk_v1_9;
import com.github.retrooper.packetevents.protocol.world.chunk.palette.DataPalette;
import com.github.retrooper.packetevents.protocol.world.chunk.palette.ListPalette;
import com.github.retrooper.packetevents.protocol.world.chunk.palette.PaletteType;
import com.github.retrooper.packetevents.protocol.world.chunk.storage.BitStorage;
import com.github.retrooper.packetevents.wrapper.PacketWrapper;
import io.netty.buffer.ByteBuf;
import java.util.BitSet;
public class PacketWorldReaderEight extends BasePacketWorldReader {
@Override
public void handleMapChunkBulk(final GrimPlayer player, final PacketSendEvent event) {
PacketWrapper<?> wrapper = new PacketWrapper<>(event);
ByteBuf buffer = (ByteBuf) wrapper.getBuffer();
boolean skylight = wrapper.readBoolean();
int columns = wrapper.readVarInt();
int[] x = new int[columns];
int[] z = new int[columns];
int[] mask = new int[columns];
for (int column = 0; column < columns; column++) {
x[column] = wrapper.readInt();
z[column] = wrapper.readInt();
mask[column] = wrapper.readUnsignedShort();
}
for (int column = 0; column < columns; column++) {
BitSet bitset = BitSet.valueOf(new long[]{mask[column]});
Chunk_v1_9[] chunkSections = new Chunk_v1_9[16];
readChunk(buffer, chunkSections, bitset);
// 256 is the biome data at the end of the array
// 2048 is blocklight
// 2048 is skylight, which is determined by the first boolean sent
int chunks = Integer.bitCount(mask[column]);
buffer.readerIndex(buffer.readerIndex() + 256 + (chunks * 2048) + (skylight ? (chunks * 2048) : 0));
addChunkToCache(event, player, chunkSections, true, x[column], z[column], null);
}
}
@Override
public void handleMapChunk(final GrimPlayer player, final PacketSendEvent event) {
PacketWrapper<?> wrapper = new PacketWrapper<>(event);
final int chunkX = wrapper.readInt();
final int chunkZ = wrapper.readInt();
boolean groundUp = wrapper.readBoolean();
BitSet mask = BitSet.valueOf(new long[]{(long) wrapper.readUnsignedShort()});
int size = wrapper.readVarInt(); // Ignore size
final Chunk_v1_9[] chunks = new Chunk_v1_9[16];
this.readChunk((ByteBuf) event.getByteBuf(), chunks, mask);
this.addChunkToCache(event, player, chunks, groundUp, chunkX, chunkZ, null);
event.setLastUsedWrapper(null); // Make sure this incomplete packet isn't sent
}
private void readChunk(final ByteBuf buf, final Chunk_v1_9[] chunks, final BitSet set) {
for (int ind = 0; ind < 16; ++ind) {
if (set.get(ind)) {
chunks[ind] = readChunk(buf);
}
}
}
public Chunk_v1_9 readChunk(final ByteBuf in) {
ListPalette palette = new ListPalette(4);
BitStorage storage = new BitStorage(4, 4096);
DataPalette dataPalette = new DataPalette(palette, storage, PaletteType.CHUNK);
palette.stateToId(0); // Make sure to init chunk as air
int lastNext = -1;
int lastID = -1;
int blockCount = 0;
for (int i = 0; i < 4096; ++i) {
int next = in.readShort();
if (next != 0) { // If not air, doesn't need any endian flip
blockCount++;
}
// 0111 0000 0000 0000
// First byte of block type, followed by data, followed by second and third byte of block data
//
// This is bedrock
//
// Due to endian weirdness, it must be turned into
// 0000 0000 01110 0000
if (next != lastNext) { // If same, then couldn't have changed palette size, optimization
lastNext = next;
next = (short) (((next & 0xFF00) >> 8) | (next << 8)); // Flip endian bytes, computations are cheap compared to memory access
dataPalette.set(i & 15, (i >> 8) & 15, (i >> 4) & 15, next); // Allow it to resize
lastID = dataPalette.storage.get(i); // Get stored ID
continue;
}
dataPalette.storage.set(i, lastID);
}
return new Chunk_v1_9(blockCount, dataPalette);
}
}
// NOTE (AI): The S26 corpus hits include the BasePacketWorldReader dispatch (handleMapChunkBulk) and the reader's own method.Read the chunk coordinates of every column in the S26 bulk packet for Intave's chunk coordinate tracking.
ChunkCoordinateReader implementation that clones the packet's x and z integer arrays, giving the block cache the coordinates of every column in the bulk; PacketReaders registers it as setup(MAP_CHUNK_BULK, MapChunkBulkReader::new). The coordinates feed the multi-chunk block cache that physics and interaction checks use.
// ===== FILE: intave-intave, src/main/java/de/jpx3/intave/packet/reader/MapChunkBulkReader.java =====
package de.jpx3.intave.packet.reader;
public final class MapChunkBulkReader extends AbstractPacketReader implements ChunkCoordinateReader {
@Override
public int[] xCoordinates() {
return packet().getIntegerArrays().read(0).clone();
}
@Override
public int[] zCoordinates() {
return packet().getIntegerArrays().read(1).clone();
}
}
// NOTE (AI): The S26 corpus hits are the registration line and the surrounding isChunkLoaded keyword matches.Detect WorldDownloader mods at the wdl channel handshake and disable their chunk caching and saving.
Same module as the S21 entry: it answers wdl|INIT with wdl|CONTROL packets that disable general saving, chunk caching, entity, tile-entity and container saving per config, then runs the sentinel detection. Bulk chunk delivery (S26) is the mod's highest-bandwidth input, so the module closes the hole before the client can persist anything.
// ===== FILE: Photon-GitHub-AntiCheatAddition, src/main/java/de/photon/anticheataddition/modules/sentinel/mods/WorldDownloaderSentinel.java =====
package de.photon.anticheataddition.modules.sentinel.mods;
import com.google.common.io.ByteStreams;
import de.photon.anticheataddition.AntiCheatAddition;
import de.photon.anticheataddition.modules.ModuleLoader;
import de.photon.anticheataddition.modules.sentinel.SentinelModule;
import de.photon.anticheataddition.util.pluginmessage.MessageChannel;
import org.bukkit.entity.Player;
import org.bukkit.plugin.messaging.PluginMessageListener;
import org.jetbrains.annotations.NotNull;
public final class WorldDownloaderSentinel extends SentinelModule implements PluginMessageListener
{
public static final WorldDownloaderSentinel INSTANCE = new WorldDownloaderSentinel();
private static final MessageChannel WDL_CONTROL_CHANNEL = MessageChannel.of("wdl", "control", "WDL|CONTROL");
public static final MessageChannel WDL_INIT_CHANNEL = MessageChannel.of("wdl", "init", "WDL|INIT");
private final boolean disable = loadBoolean(".disable.general", true);
private final boolean disableFuture = loadBoolean(".disable.future", true);
private final int saveRadius = loadInt(".disable.save_radius", 0);
private final boolean disableChunkCaching = loadBoolean(".disable.chunk_caching", true);
private final boolean disableEntitySaving = loadBoolean(".disable.entity_saving", true);
private final boolean disableTileEntitySaving = loadBoolean(".disable.tile_entity_saving", true);
private final boolean disableContainerSaving = loadBoolean(".disable.container_saving", true);
private WorldDownloaderSentinel()
{
super("WorldDownloader");
}
@Override
public void onPluginMessageReceived(@NotNull final String channel, @NotNull final Player player, final byte[] message)
{
// This must not be empty as we defined our channel with both a full key and a legacy string.
final var sendChannel = WDL_CONTROL_CHANNEL.getChannel().orElseThrow();
/*Documentation:
* https://github.com/Pokechu22/WorldDownloader-Serverside-Companion/blob/master/src/main/java/wdl/WDLPackets.java
*
* and
*
* https://wiki.vg/User:Pokechu22/World_downloader
*
* The first packet specifies, whether new functions are allowed, the second what current functions are allowed.*/
final var packetZero = ByteStreams.newDataOutput();
packetZero.writeInt(0);
packetZero.writeBoolean(!disableFuture);
player.sendPluginMessage(AntiCheatAddition.getInstance(), sendChannel, packetZero.toByteArray());
final var packetOne = ByteStreams.newDataOutput();
packetOne.writeInt(1);
packetOne.writeBoolean(!disable);
packetOne.writeInt(saveRadius);
packetOne.writeBoolean(!disableChunkCaching);
packetOne.writeBoolean(!disableEntitySaving);
packetOne.writeBoolean(!disableTileEntitySaving);
packetOne.writeBoolean(!disableContainerSaving);
player.sendPluginMessage(AntiCheatAddition.getInstance(), sendChannel, packetOne.toByteArray());
detection(player);
}
@Override
protected ModuleLoader createModuleLoader()
{
return ModuleLoader.builder(this)
.addIncomingMessageChannel(WDL_INIT_CHANNEL)
.addOutgoingMessageChannel(WDL_CONTROL_CHANNEL)
.build();
}
}
// NOTE (AI): The S26 corpus hit is the same chunk_caching flag family as S21; the module never inspects the chunk payload itself.Store the 16x384x16 block grid of each replicated chunk so Kauri's checks can query block states.
Chunk holds a synchronized WrappedBlock[16][384][16] array keyed by chunk x/z; updateBlock writes into it (with the negative-y offset for 1.18 worlds) and getBlockAt returns an Optional of the block, mapping coordinates into the local grid. World fills these chunks from chunk-data and chunk-data-bulk packets via runUpdate, and BlockUpdateHandler routes S22 and S23 updates into the same storage.
// ===== FILE: funkemunky-KauriV3, Anticheat/src/main/java/dev/brighten/ac/handler/block/Chunk.java =====
package dev.brighten.ac.handler.block;
import com.github.retrooper.packetevents.util.Vector3i;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import java.util.Arrays;
import java.util.Objects;
import java.util.Optional;
@RequiredArgsConstructor
public class Chunk {
@Getter
private final int x, z;
private final WrappedBlock[][][] blocks = new WrappedBlock[16][384][16];
/**
* Get a block at the specified location
* @param location - Location of the block
* @return Optional of the block at the specified location
*/
public Optional<WrappedBlock> getBlockAt(Vector3i location) {
return getBlockAt(location.getX(), location.getY(), location.getZ());
}
/**
* @param x - X coordinate of the block
* @param y - Y coordinate of the block
* @param z - Z coordinate of the block
* @return Optional of the block at the specified location
*/
public Optional<WrappedBlock> getBlockAt(int x, int y, int z) {
synchronized (blocks) {
x = x & 15;
z = z & 15;
if(y > 320 || y < -64) {
return Optional.empty();
}
if(y < 0) {
y = Math.abs(y) + 320;
}
return Optional.ofNullable(blocks[x][y][z]);
}
}
/**
* Update a block in the chunk
* @param x - X coordinate of the block
* @param y - Y coordinate of the block
* @param z - Z coordinate of the block
* @param block - Block to update to
*/
public void updateBlock(int x, int y, int z, WrappedBlock block) {
synchronized (blocks) {
if(y < 0) {
y = Math.abs(y) + 1000;
}
blocks[x & 15][y][z & 15] = block;
}
}
/**
* Update a block in the chunk
* @param location - Location of the block
* @param block - Block to update to
*/
public void updateBlock(Vector3i location, WrappedBlock block) {
updateBlock(location.getX(), location.getY(), location.getZ(), block);
}
@Override
public boolean equals(Object o) {
if (!(o instanceof Chunk chunk)) return false;
return x == chunk.x && z == chunk.z && Objects.deepEquals(blocks, chunk.blocks);
}
@Override
public int hashCode() {
return Objects.hash(x, z, Arrays.deepHashCode(blocks));
}
}
// NOTE (AI): The file is pure storage; the S26 bulk decode that populates it is runUpdate(WrapperPlayServerChunkDataBulk) in BlockUpdateHandler.Related Packets
Wiki Cross-Reference
Clientbound 0x26 bulk loader: skylight bool, VarInt column count, then per-column data.
Each column sends X and Z ints plus a 16-bit section bitmask and compressed payload.
Used for join and large loads; column layout reuses the S21 section encoding.
MCP 1.8.9 S26PacketMapChunkBulk implements Packet
1.8.9 callers: EntityPlayerMP.? sends new S26PacketMapChunkBulk (line 344): https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/entity/player/EntityPlayerMP.java
Cross-checked against minecraft.wiki (CC BY-SA 3.0) for 1.8.9 accuracy.
Vanilla Internals
Full 1.8.9 logic-class sources that send or handle this packet, stored verbatim.