Package ac.boar.anticheat.util.geyser
Class ChunkDecoder
java.lang.Object
ac.boar.anticheat.util.geyser.ChunkDecoder
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic BlockStoragereadLayer(io.netty.buffer.ByteBuf buf, int initialId) static ChunkDecoder.DecodedSubChunkreadSubChunk(io.netty.buffer.ByteBuf buf, int airId, int fallbackIndex, int dimensionMinY) static intskipSubChunk(io.netty.buffer.ByteBuf buf, int fallbackIndex, int dimensionMinY) Skips one serialized sub-chunk and does not decode it.
-
Method Details
-
readLayer
-
skipSubChunk
public static int skipSubChunk(io.netty.buffer.ByteBuf buf, int fallbackIndex, int dimensionMinY) Skips one serialized sub-chunk and does not decode it. This method moves the reader index ofbufto the end of the sub-chunk, the same asreadSubChunk(io.netty.buffer.ByteBuf, int, int, int)moves it. It returns the section Y index. Use this method to measure the byte range of a sub-chunk before a cache lookup. This method must stay in sync with readSubChunk. -
readSubChunk
public static ChunkDecoder.DecodedSubChunk readSubChunk(io.netty.buffer.ByteBuf buf, int airId, int fallbackIndex, int dimensionMinY)
-