Skip to content

Instantly share code, notes, and snippets.

@phase
Last active November 16, 2020 02:10
Show Gist options
  • Save phase/9a42b3937650bf2de4785f2a3a25eb04 to your computer and use it in GitHub Desktop.
Save phase/9a42b3937650bf2de4785f2a3a25eb04 to your computer and use it in GitHub Desktop.
1.16.4 packet class parsing result (very wip)

net/minecraft/network/protocol/game/ClientboundAddEntityPacket

Field Name Field Type
id I
uuid Ljava/util/UUID;
x D
y D
z D
xa I
ya I
za I
xRot I
yRot I
type Lnet/minecraft/world/entity/EntityType;
data I

Deserialization (read())

  • id: [readVarInt()I]
  • uuid: [readUUID()Ljava/util/UUID;]
  • type: [readVarInt()I]
  • x: [readDouble()D]
  • y: [readDouble()D]
  • z: [readDouble()D]
  • xRot: [readByte()B]
  • yRot: [readByte()B]
  • data: [readInt()I]
  • xa: [readShort()S]
  • ya: [readShort()S]
  • za: [readShort()S]

Example read:

public void read(ByteBuf byteBuf) {
    this.id = byteBuf.readVarInt();
    this.uuid = byteBuf.readUUID();
    this.type = byteBuf.readVarInt();
    this.x = byteBuf.readDouble();
    this.y = byteBuf.readDouble();
    this.z = byteBuf.readDouble();
    this.xRot = byteBuf.readByte();
    this.yRot = byteBuf.readByte();
    this.data = byteBuf.readInt();
    this.xa = byteBuf.readShort();
    this.ya = byteBuf.readShort();
    this.za = byteBuf.readShort();
}

net/minecraft/network/protocol/game/ClientboundAddExperienceOrbPacket

Field Name Field Type
id I
x D
y D
z D
value I

Deserialization (read())

  • id: [readVarInt()I]
  • x: [readDouble()D]
  • y: [readDouble()D]
  • z: [readDouble()D]
  • value: [readShort()S]

Example read:

public void read(ByteBuf byteBuf) {
    this.id = byteBuf.readVarInt();
    this.x = byteBuf.readDouble();
    this.y = byteBuf.readDouble();
    this.z = byteBuf.readDouble();
    this.value = byteBuf.readShort();
}

net/minecraft/network/protocol/game/ClientboundAddMobPacket

Field Name Field Type
id I
uuid Ljava/util/UUID;
type I
x D
y D
z D
xd I
yd I
zd I
yRot B
xRot B
yHeadRot B

Deserialization (read())

  • id: [readVarInt()I]
  • uuid: [readUUID()Ljava/util/UUID;]
  • type: [readVarInt()I]
  • x: [readDouble()D]
  • y: [readDouble()D]
  • z: [readDouble()D]
  • yRot: [readByte()B]
  • xRot: [readByte()B]
  • yHeadRot: [readByte()B]
  • xd: [readShort()S]
  • yd: [readShort()S]
  • zd: [readShort()S]

Example read:

public void read(ByteBuf byteBuf) {
    this.id = byteBuf.readVarInt();
    this.uuid = byteBuf.readUUID();
    this.type = byteBuf.readVarInt();
    this.x = byteBuf.readDouble();
    this.y = byteBuf.readDouble();
    this.z = byteBuf.readDouble();
    this.yRot = byteBuf.readByte();
    this.xRot = byteBuf.readByte();
    this.yHeadRot = byteBuf.readByte();
    this.xd = byteBuf.readShort();
    this.yd = byteBuf.readShort();
    this.zd = byteBuf.readShort();
}

net/minecraft/network/protocol/game/ClientboundAddPaintingPacket

Field Name Field Type
id I
uuid Ljava/util/UUID;
pos Lnet/minecraft/core/BlockPos;
direction Lnet/minecraft/core/Direction;
motive I

Deserialization (read())

  • id: [readVarInt()I]
  • uuid: [readUUID()Ljava/util/UUID;]
  • motive: [readVarInt()I]
  • pos: [readBlockPos()Lnet/minecraft/core/BlockPos;]
  • direction: [readUnsignedByte()S]

Example read:

public void read(ByteBuf byteBuf) {
    this.id = byteBuf.readVarInt();
    this.uuid = byteBuf.readUUID();
    this.motive = byteBuf.readVarInt();
    this.pos = byteBuf.readBlockPos();
    this.direction = byteBuf.readUnsignedByte();
}

net/minecraft/network/protocol/game/ClientboundAddPlayerPacket

Field Name Field Type
entityId I
playerId Ljava/util/UUID;
x D
y D
z D
yRot B
xRot B

Deserialization (read())

  • entityId: [readVarInt()I]
  • playerId: [readUUID()Ljava/util/UUID;]
  • x: [readDouble()D]
  • y: [readDouble()D]
  • z: [readDouble()D]
  • yRot: [readByte()B]
  • xRot: [readByte()B]

Example read:

public void read(ByteBuf byteBuf) {
    this.entityId = byteBuf.readVarInt();
    this.playerId = byteBuf.readUUID();
    this.x = byteBuf.readDouble();
    this.y = byteBuf.readDouble();
    this.z = byteBuf.readDouble();
    this.yRot = byteBuf.readByte();
    this.xRot = byteBuf.readByte();
}

net/minecraft/network/protocol/game/ClientboundAnimatePacket

Field Name Field Type
id I
action I

Deserialization (read())

  • id: [readVarInt()I]
  • action: [readUnsignedByte()S]

Example read:

public void read(ByteBuf byteBuf) {
    this.id = byteBuf.readVarInt();
    this.action = byteBuf.readUnsignedByte();
}

net/minecraft/network/protocol/game/ClientboundAwardStatsPacket

Field Name Field Type
stats Lit/unimi/dsi/fastutil/objects/Object2IntMap;

Deserialization (read())

  • stats: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.stats = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ClientboundBlockBreakAckPacket

Field Name Field Type
pos Lnet/minecraft/core/BlockPos;
state Lnet/minecraft/world/level/block/state/BlockState;
action Lnet/minecraft/network/protocol/game/ServerboundPlayerActionPacket$Action;
allGood Z

Deserialization (read())

  • pos: [readBlockPos()Lnet/minecraft/core/BlockPos;]
  • state: [readVarInt()I]
  • action: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • allGood: [readBoolean()Z]

Example read:

public void read(ByteBuf byteBuf) {
    this.pos = byteBuf.readBlockPos();
    this.state = byteBuf.readVarInt();
    this.action = byteBuf.readEnum();
    this.allGood = byteBuf.readBoolean();
}

net/minecraft/network/protocol/game/ClientboundBlockDestructionPacket

Field Name Field Type
id I
pos Lnet/minecraft/core/BlockPos;
progress I

Deserialization (read())

  • id: [readVarInt()I]
  • pos: [readBlockPos()Lnet/minecraft/core/BlockPos;]
  • progress: [readUnsignedByte()S]

Example read:

public void read(ByteBuf byteBuf) {
    this.id = byteBuf.readVarInt();
    this.pos = byteBuf.readBlockPos();
    this.progress = byteBuf.readUnsignedByte();
}

net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket

Field Name Field Type
pos Lnet/minecraft/core/BlockPos;
type I
tag Lnet/minecraft/nbt/CompoundTag;

Deserialization (read())

  • pos: [readBlockPos()Lnet/minecraft/core/BlockPos;]
  • type: [readUnsignedByte()S]
  • tag: [readNbt()Lnet/minecraft/nbt/CompoundTag;]

Example read:

public void read(ByteBuf byteBuf) {
    this.pos = byteBuf.readBlockPos();
    this.type = byteBuf.readUnsignedByte();
    this.tag = byteBuf.readNbt();
}

net/minecraft/network/protocol/game/ClientboundBlockEventPacket

Field Name Field Type
pos Lnet/minecraft/core/BlockPos;
b0 I
b1 I
block Lnet/minecraft/world/level/block/Block;

Deserialization (read())

  • pos: [readBlockPos()Lnet/minecraft/core/BlockPos;]
  • b0: [readUnsignedByte()S]
  • b1: [readUnsignedByte()S]
  • block: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.pos = byteBuf.readBlockPos();
    this.b0 = byteBuf.readUnsignedByte();
    this.b1 = byteBuf.readUnsignedByte();
    this.block = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ClientboundBlockUpdatePacket

Field Name Field Type
pos Lnet/minecraft/core/BlockPos;
blockState Lnet/minecraft/world/level/block/state/BlockState;

Deserialization (read())

  • pos: [readBlockPos()Lnet/minecraft/core/BlockPos;]
  • blockState: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.pos = byteBuf.readBlockPos();
    this.blockState = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ClientboundBossEventPacket

Field Name Field Type
id Ljava/util/UUID;
operation Lnet/minecraft/network/protocol/game/ClientboundBossEventPacket$Operation;
name Lnet/minecraft/network/chat/Component;
pct F
color Lnet/minecraft/world/BossEvent$BossBarColor;
overlay Lnet/minecraft/world/BossEvent$BossBarOverlay;
darkenScreen Z
playMusic Z
createWorldFog Z

Deserialization (read())

  • id: [readUUID()Ljava/util/UUID;]
  • operation: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • name: [readComponent()Lnet/minecraft/network/chat/Component;]
  • pct: [readFloat()F]
  • color: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • overlay: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • pct: [readUnsignedByte()S, readFloat()F]
  • name: [readComponent()Lnet/minecraft/network/chat/Component;]
  • color: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • overlay: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]

Example read:

public void read(ByteBuf byteBuf) {
    this.id = byteBuf.readUUID();
    this.operation = byteBuf.readEnum();
    this.name = byteBuf.readComponent();
    this.pct = byteBuf.readFloat();
    this.color = byteBuf.readEnum();
    this.overlay = byteBuf.readEnum();
    this.pct = byteBuf.readUnsignedByte();
    this.name = byteBuf.readComponent();
    this.color = byteBuf.readEnum();
    this.overlay = byteBuf.readEnum();
}

net/minecraft/network/protocol/game/ClientboundChangeDifficultyPacket

Field Name Field Type
difficulty Lnet/minecraft/world/Difficulty;
locked Z

Deserialization (read())

  • difficulty: [readUnsignedByte()S]
  • locked: [readBoolean()Z]

Example read:

public void read(ByteBuf byteBuf) {
    this.difficulty = byteBuf.readUnsignedByte();
    this.locked = byteBuf.readBoolean();
}

net/minecraft/network/protocol/game/ClientboundChatPacket

Field Name Field Type
message Lnet/minecraft/network/chat/Component;
type Lnet/minecraft/network/chat/ChatType;
sender Ljava/util/UUID;

Deserialization (read())

  • message: [readComponent()Lnet/minecraft/network/chat/Component;]
  • type: [readByte()B]
  • sender: [readUUID()Ljava/util/UUID;]

Example read:

public void read(ByteBuf byteBuf) {
    this.message = byteBuf.readComponent();
    this.type = byteBuf.readByte();
    this.sender = byteBuf.readUUID();
}

net/minecraft/network/protocol/game/ClientboundCommandSuggestionsPacket

Field Name Field Type
id I
suggestions Lcom/mojang/brigadier/suggestion/Suggestions;

Deserialization (read())

  • id: [readVarInt()I]
  • suggestions: [readVarInt()I, readVarInt()I, readVarInt()I, readUtf(I)Ljava/lang/String;, readBoolean()Z, readComponent()Lnet/minecraft/network/chat/Component;]

Example read:

public void read(ByteBuf byteBuf) {
    this.id = byteBuf.readVarInt();
    this.suggestions = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ClientboundCommandsPacket

Field Name Field Type
root Lcom/mojang/brigadier/tree/RootCommandNode;

Deserialization (read())

  • root: [readVarInt()I, readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.root = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ClientboundContainerAckPacket

Field Name Field Type
containerId I
uid S
accepted Z

Deserialization (read())

  • containerId: [readUnsignedByte()S]
  • uid: [readShort()S]
  • accepted: [readBoolean()Z]

Example read:

public void read(ByteBuf byteBuf) {
    this.containerId = byteBuf.readUnsignedByte();
    this.uid = byteBuf.readShort();
    this.accepted = byteBuf.readBoolean();
}

net/minecraft/network/protocol/game/ClientboundContainerClosePacket

Field Name Field Type
containerId I

Deserialization (read())

  • containerId: [readUnsignedByte()S]

Example read:

public void read(ByteBuf byteBuf) {
    this.containerId = byteBuf.readUnsignedByte();
}

net/minecraft/network/protocol/game/ClientboundContainerSetContentPacket

Field Name Field Type
containerId I
items Ljava/util/List;

Deserialization (read())

  • containerId: [readUnsignedByte()S]
  • items: [readShort()S]

Example read:

public void read(ByteBuf byteBuf) {
    this.containerId = byteBuf.readUnsignedByte();
    this.items = byteBuf.readShort();
}

net/minecraft/network/protocol/game/ClientboundContainerSetDataPacket

Field Name Field Type
containerId I
id I
value I

Deserialization (read())

  • containerId: [readUnsignedByte()S]
  • id: [readShort()S]
  • value: [readShort()S]

Example read:

public void read(ByteBuf byteBuf) {
    this.containerId = byteBuf.readUnsignedByte();
    this.id = byteBuf.readShort();
    this.value = byteBuf.readShort();
}

net/minecraft/network/protocol/game/ClientboundContainerSetSlotPacket

Field Name Field Type
containerId I
slot I
itemStack Lnet/minecraft/world/item/ItemStack;

Deserialization (read())

  • containerId: [readByte()B]
  • slot: [readShort()S]
  • itemStack: [readItem()Lnet/minecraft/world/item/ItemStack;]

Example read:

public void read(ByteBuf byteBuf) {
    this.containerId = byteBuf.readByte();
    this.slot = byteBuf.readShort();
    this.itemStack = byteBuf.readItem();
}

net/minecraft/network/protocol/game/ClientboundCooldownPacket

Field Name Field Type
item Lnet/minecraft/world/item/Item;
duration I

Deserialization (read())

  • item: [readVarInt()I]
  • duration: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.item = byteBuf.readVarInt();
    this.duration = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ClientboundCustomPayloadPacket

Field Name Field Type
identifier Lnet/minecraft/resources/ResourceLocation;
data Lnet/minecraft/network/FriendlyByteBuf;

Deserialization (read())

  • identifier: [readResourceLocation()Lnet/minecraft/resources/ResourceLocation;]
  • data: [readBytes(I)Lio/netty/buffer/ByteBuf;]

Example read:

public void read(ByteBuf byteBuf) {
    this.identifier = byteBuf.readResourceLocation();
    this.data = byteBuf.readBytes();
}

net/minecraft/network/protocol/game/ClientboundCustomSoundPacket

Field Name Field Type
name Lnet/minecraft/resources/ResourceLocation;
source Lnet/minecraft/sounds/SoundSource;
x I
y I
z I
volume F
pitch F

Deserialization (read())

  • name: [readResourceLocation()Lnet/minecraft/resources/ResourceLocation;]
  • source: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • x: [readInt()I]
  • y: [readInt()I]
  • z: [readInt()I]
  • volume: [readFloat()F]
  • pitch: [readFloat()F]

Example read:

public void read(ByteBuf byteBuf) {
    this.name = byteBuf.readResourceLocation();
    this.source = byteBuf.readEnum();
    this.x = byteBuf.readInt();
    this.y = byteBuf.readInt();
    this.z = byteBuf.readInt();
    this.volume = byteBuf.readFloat();
    this.pitch = byteBuf.readFloat();
}

net/minecraft/network/protocol/game/ClientboundDisconnectPacket

Field Name Field Type
reason Lnet/minecraft/network/chat/Component;

Deserialization (read())

  • reason: [readComponent()Lnet/minecraft/network/chat/Component;]

Example read:

public void read(ByteBuf byteBuf) {
    this.reason = byteBuf.readComponent();
}

net/minecraft/network/protocol/game/ClientboundEntityEventPacket

Field Name Field Type
entityId I
eventId B

Deserialization (read())

  • entityId: [readInt()I]
  • eventId: [readByte()B]

Example read:

public void read(ByteBuf byteBuf) {
    this.entityId = byteBuf.readInt();
    this.eventId = byteBuf.readByte();
}

net/minecraft/network/protocol/game/ClientboundExplodePacket

Field Name Field Type
x D
y D
z D
power F
toBlow Ljava/util/List;
knockbackX F
knockbackY F
knockbackZ F

Deserialization (read())

  • x: [readFloat()F]
  • y: [readFloat()F]
  • z: [readFloat()F]
  • power: [readFloat()F]
  • toBlow: [readInt()I]
  • knockbackX: [readByte()B, readByte()B, readByte()B, readFloat()F]
  • knockbackY: [readFloat()F]
  • knockbackZ: [readFloat()F]

Example read:

public void read(ByteBuf byteBuf) {
    this.x = byteBuf.readFloat();
    this.y = byteBuf.readFloat();
    this.z = byteBuf.readFloat();
    this.power = byteBuf.readFloat();
    this.toBlow = byteBuf.readInt();
    this.knockbackX = byteBuf.readByte();
    this.knockbackY = byteBuf.readFloat();
    this.knockbackZ = byteBuf.readFloat();
}

net/minecraft/network/protocol/game/ClientboundForgetLevelChunkPacket

Field Name Field Type
x I
z I

Deserialization (read())

  • x: [readInt()I]
  • z: [readInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.x = byteBuf.readInt();
    this.z = byteBuf.readInt();
}

net/minecraft/network/protocol/game/ClientboundGameEventPacket

Field Name Field Type
event Lnet/minecraft/network/protocol/game/ClientboundGameEventPacket$Type;
param F

Deserialization (read())

  • event: [readUnsignedByte()S]
  • param: [readFloat()F]

Example read:

public void read(ByteBuf byteBuf) {
    this.event = byteBuf.readUnsignedByte();
    this.param = byteBuf.readFloat();
}

net/minecraft/network/protocol/game/ClientboundHorseScreenOpenPacket

Field Name Field Type
containerId I
size I
entityId I

Deserialization (read())

  • containerId: [readUnsignedByte()S]
  • size: [readVarInt()I]
  • entityId: [readInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.containerId = byteBuf.readUnsignedByte();
    this.size = byteBuf.readVarInt();
    this.entityId = byteBuf.readInt();
}

net/minecraft/network/protocol/game/ClientboundKeepAlivePacket

Field Name Field Type
id J

Deserialization (read())

  • id: [readLong()J]

Example read:

public void read(ByteBuf byteBuf) {
    this.id = byteBuf.readLong();
}

net/minecraft/network/protocol/game/ClientboundLevelChunkPacket

Field Name Field Type
x I
z I
availableSections I
heightmaps Lnet/minecraft/nbt/CompoundTag;
biomes [I
buffer [B
blockEntitiesTags Ljava/util/List;
fullChunk Z
customData Ljava/util/Map;

Deserialization (read())

  • x: [readInt()I]
  • z: [readInt()I]
  • fullChunk: [readBoolean()Z]
  • availableSections: [readVarInt()I]
  • heightmaps: [readNbt()Lnet/minecraft/nbt/CompoundTag;]
  • biomes: [readVarIntArray(I)[I]
  • buffer: [readVarInt()I]
  • blockEntitiesTags: [readBytes([B)Lio/netty/buffer/ByteBuf;, readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.x = byteBuf.readInt();
    this.z = byteBuf.readInt();
    this.fullChunk = byteBuf.readBoolean();
    this.availableSections = byteBuf.readVarInt();
    this.heightmaps = byteBuf.readNbt();
    this.biomes = byteBuf.readVarIntArray();
    this.buffer = byteBuf.readVarInt();
    this.blockEntitiesTags = byteBuf.readBytes();
}

net/minecraft/network/protocol/game/ClientboundLevelEventPacket

Field Name Field Type
type I
pos Lnet/minecraft/core/BlockPos;
data I
globalEvent Z

Deserialization (read())

  • type: [readInt()I]
  • pos: [readBlockPos()Lnet/minecraft/core/BlockPos;]
  • data: [readInt()I]
  • globalEvent: [readBoolean()Z]

Example read:

public void read(ByteBuf byteBuf) {
    this.type = byteBuf.readInt();
    this.pos = byteBuf.readBlockPos();
    this.data = byteBuf.readInt();
    this.globalEvent = byteBuf.readBoolean();
}

net/minecraft/network/protocol/game/ClientboundLevelParticlesPacket

Field Name Field Type
x D
y D
z D
xDist F
yDist F
zDist F
maxSpeed F
count I
overrideLimiter Z
particle Lnet/minecraft/core/particles/ParticleOptions;

Deserialization (read())

  • overrideLimiter: [readInt()I, readBoolean()Z]
  • x: [readDouble()D]
  • y: [readDouble()D]
  • z: [readDouble()D]
  • xDist: [readFloat()F]
  • yDist: [readFloat()F]
  • zDist: [readFloat()F]
  • maxSpeed: [readFloat()F]
  • count: [readInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.overrideLimiter = byteBuf.readInt();
    this.x = byteBuf.readDouble();
    this.y = byteBuf.readDouble();
    this.z = byteBuf.readDouble();
    this.xDist = byteBuf.readFloat();
    this.yDist = byteBuf.readFloat();
    this.zDist = byteBuf.readFloat();
    this.maxSpeed = byteBuf.readFloat();
    this.count = byteBuf.readInt();
}

net/minecraft/network/protocol/game/ClientboundLightUpdatePacket

Field Name Field Type
x I
z I
skyYMask I
blockYMask I
emptySkyYMask I
emptyBlockYMask I
skyUpdates Ljava/util/List;
blockUpdates Ljava/util/List;
trustEdges Z

Deserialization (read())

  • x: [readVarInt()I]
  • z: [readVarInt()I]
  • trustEdges: [readBoolean()Z]
  • skyYMask: [readVarInt()I]
  • blockYMask: [readVarInt()I]
  • emptySkyYMask: [readVarInt()I]
  • emptyBlockYMask: [readVarInt()I]
  • blockUpdates: [readByteArray(I)[B]

Example read:

public void read(ByteBuf byteBuf) {
    this.x = byteBuf.readVarInt();
    this.z = byteBuf.readVarInt();
    this.trustEdges = byteBuf.readBoolean();
    this.skyYMask = byteBuf.readVarInt();
    this.blockYMask = byteBuf.readVarInt();
    this.emptySkyYMask = byteBuf.readVarInt();
    this.emptyBlockYMask = byteBuf.readVarInt();
    this.blockUpdates = byteBuf.readByteArray();
}

net/minecraft/network/protocol/game/ClientboundLoginPacket

Field Name Field Type
playerId I
seed J
hardcore Z
gameType Lnet/minecraft/world/level/GameType;
previousGameType Lnet/minecraft/world/level/GameType;
levels Ljava/util/Set;
registryHolder Lnet/minecraft/core/RegistryAccess$RegistryHolder;
dimensionType Lnet/minecraft/world/level/dimension/DimensionType;
dimension Lnet/minecraft/resources/ResourceKey;
maxPlayers I
chunkRadius I
reducedDebugInfo Z
showDeathScreen Z
isDebug Z
isFlat Z

Deserialization (read())

  • playerId: [readInt()I]
  • hardcore: [readBoolean()Z]
  • gameType: [readByte()B]
  • previousGameType: [readByte()B]
  • levels: [readVarInt()I]
  • registryHolder: [readResourceLocation()Lnet/minecraft/resources/ResourceLocation;, readWithCodec(Lcom/mojang/serialization/Codec;)Ljava/lang/Object;]
  • dimensionType: [readWithCodec(Lcom/mojang/serialization/Codec;)Ljava/lang/Object;]
  • dimension: [readResourceLocation()Lnet/minecraft/resources/ResourceLocation;]
  • seed: [readLong()J]
  • maxPlayers: [readVarInt()I]
  • chunkRadius: [readVarInt()I]
  • reducedDebugInfo: [readBoolean()Z]
  • showDeathScreen: [readBoolean()Z]
  • isDebug: [readBoolean()Z]
  • isFlat: [readBoolean()Z]

Example read:

public void read(ByteBuf byteBuf) {
    this.playerId = byteBuf.readInt();
    this.hardcore = byteBuf.readBoolean();
    this.gameType = byteBuf.readByte();
    this.previousGameType = byteBuf.readByte();
    this.levels = byteBuf.readVarInt();
    this.registryHolder = byteBuf.readResourceLocation();
    this.dimensionType = byteBuf.readWithCodec();
    this.dimension = byteBuf.readResourceLocation();
    this.seed = byteBuf.readLong();
    this.maxPlayers = byteBuf.readVarInt();
    this.chunkRadius = byteBuf.readVarInt();
    this.reducedDebugInfo = byteBuf.readBoolean();
    this.showDeathScreen = byteBuf.readBoolean();
    this.isDebug = byteBuf.readBoolean();
    this.isFlat = byteBuf.readBoolean();
}

net/minecraft/network/protocol/game/ClientboundMapItemDataPacket

Field Name Field Type
mapId I
scale B
trackingPosition Z
locked Z
decorations [Lnet/minecraft/world/level/saveddata/maps/MapDecoration;
startX I
startY I
width I
height I
mapColors [B

Deserialization (read())

  • mapId: [readVarInt()I]
  • scale: [readByte()B]
  • trackingPosition: [readBoolean()Z]
  • locked: [readBoolean()Z]
  • decorations: [readVarInt()I]
  • width: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;, readByte()B, readByte()B, readByte()B, readBoolean()Z, readComponent()Lnet/minecraft/network/chat/Component;, readUnsignedByte()S]
  • height: [readUnsignedByte()S]
  • startX: [readUnsignedByte()S]
  • startY: [readUnsignedByte()S]
  • mapColors: [readByteArray()[B]

Example read:

public void read(ByteBuf byteBuf) {
    this.mapId = byteBuf.readVarInt();
    this.scale = byteBuf.readByte();
    this.trackingPosition = byteBuf.readBoolean();
    this.locked = byteBuf.readBoolean();
    this.decorations = byteBuf.readVarInt();
    this.width = byteBuf.readEnum();
    this.height = byteBuf.readUnsignedByte();
    this.startX = byteBuf.readUnsignedByte();
    this.startY = byteBuf.readUnsignedByte();
    this.mapColors = byteBuf.readByteArray();
}

net/minecraft/network/protocol/game/ClientboundMerchantOffersPacket

Field Name Field Type
containerId I
offers Lnet/minecraft/world/item/trading/MerchantOffers;
villagerLevel I
villagerXp I
showProgress Z
canRestock Z

Deserialization (read())

  • containerId: [readVarInt()I]
  • villagerLevel: [readVarInt()I]
  • villagerXp: [readVarInt()I]
  • showProgress: [readBoolean()Z]
  • canRestock: [readBoolean()Z]

Example read:

public void read(ByteBuf byteBuf) {
    this.containerId = byteBuf.readVarInt();
    this.villagerLevel = byteBuf.readVarInt();
    this.villagerXp = byteBuf.readVarInt();
    this.showProgress = byteBuf.readBoolean();
    this.canRestock = byteBuf.readBoolean();
}

net/minecraft/network/protocol/game/ClientboundMoveEntityPacket

Field Name Field Type
entityId I
xa S
ya S
za S
yRot B
xRot B
onGround Z
hasRot Z
hasPos Z

Deserialization (read())

  • entityId: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.entityId = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ClientboundMoveVehiclePacket

Field Name Field Type
x D
y D
z D
yRot F
xRot F

Deserialization (read())

  • x: [readDouble()D]
  • y: [readDouble()D]
  • z: [readDouble()D]
  • yRot: [readFloat()F]
  • xRot: [readFloat()F]

Example read:

public void read(ByteBuf byteBuf) {
    this.x = byteBuf.readDouble();
    this.y = byteBuf.readDouble();
    this.z = byteBuf.readDouble();
    this.yRot = byteBuf.readFloat();
    this.xRot = byteBuf.readFloat();
}

net/minecraft/network/protocol/game/ClientboundOpenBookPacket

Field Name Field Type
hand Lnet/minecraft/world/InteractionHand;

Deserialization (read())

  • hand: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]

Example read:

public void read(ByteBuf byteBuf) {
    this.hand = byteBuf.readEnum();
}

net/minecraft/network/protocol/game/ClientboundOpenScreenPacket

Field Name Field Type
containerId I
type I
title Lnet/minecraft/network/chat/Component;

Deserialization (read())

  • containerId: [readVarInt()I]
  • type: [readVarInt()I]
  • title: [readComponent()Lnet/minecraft/network/chat/Component;]

Example read:

public void read(ByteBuf byteBuf) {
    this.containerId = byteBuf.readVarInt();
    this.type = byteBuf.readVarInt();
    this.title = byteBuf.readComponent();
}

net/minecraft/network/protocol/game/ClientboundOpenSignEditorPacket

Field Name Field Type
pos Lnet/minecraft/core/BlockPos;

Deserialization (read())

  • pos: [readBlockPos()Lnet/minecraft/core/BlockPos;]

Example read:

public void read(ByteBuf byteBuf) {
    this.pos = byteBuf.readBlockPos();
}

net/minecraft/network/protocol/game/ClientboundPlaceGhostRecipePacket

Field Name Field Type
containerId I
recipe Lnet/minecraft/resources/ResourceLocation;

Deserialization (read())

  • containerId: [readByte()B]
  • recipe: [readResourceLocation()Lnet/minecraft/resources/ResourceLocation;]

Example read:

public void read(ByteBuf byteBuf) {
    this.containerId = byteBuf.readByte();
    this.recipe = byteBuf.readResourceLocation();
}

net/minecraft/network/protocol/game/ClientboundPlayerAbilitiesPacket

Field Name Field Type
invulnerable Z
isFlying Z
canFly Z
instabuild Z
flyingSpeed F
walkingSpeed F

Deserialization (read())

  • invulnerable: [readByte()B]
  • flyingSpeed: [readFloat()F]
  • walkingSpeed: [readFloat()F]

Example read:

public void read(ByteBuf byteBuf) {
    this.invulnerable = byteBuf.readByte();
    this.flyingSpeed = byteBuf.readFloat();
    this.walkingSpeed = byteBuf.readFloat();
}

net/minecraft/network/protocol/game/ClientboundPlayerCombatPacket

Field Name Field Type
event Lnet/minecraft/network/protocol/game/ClientboundPlayerCombatPacket$Event;
playerId I
killerId I
duration I
message Lnet/minecraft/network/chat/Component;

Deserialization (read())

  • event: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • duration: [readVarInt()I]
  • killerId: [readInt()I]
  • playerId: [readVarInt()I]
  • killerId: [readInt()I]
  • message: [readComponent()Lnet/minecraft/network/chat/Component;]

Example read:

public void read(ByteBuf byteBuf) {
    this.event = byteBuf.readEnum();
    this.duration = byteBuf.readVarInt();
    this.killerId = byteBuf.readInt();
    this.playerId = byteBuf.readVarInt();
    this.killerId = byteBuf.readInt();
    this.message = byteBuf.readComponent();
}

net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket

Field Name Field Type
action Lnet/minecraft/network/protocol/game/ClientboundPlayerInfoPacket$Action;
entries Ljava/util/List;

Deserialization (read())

  • action: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]

Example read:

public void read(ByteBuf byteBuf) {
    this.action = byteBuf.readEnum();
}

net/minecraft/network/protocol/game/ClientboundPlayerLookAtPacket

Field Name Field Type
x D
y D
z D
entity I
fromAnchor Lnet/minecraft/commands/arguments/EntityAnchorArgument$Anchor;
toAnchor Lnet/minecraft/commands/arguments/EntityAnchorArgument$Anchor;
atEntity Z

Deserialization (read())

  • fromAnchor: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • x: [readDouble()D]
  • y: [readDouble()D]
  • z: [readDouble()D]
  • atEntity: [readBoolean()Z]
  • entity: [readVarInt()I]
  • toAnchor: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]

Example read:

public void read(ByteBuf byteBuf) {
    this.fromAnchor = byteBuf.readEnum();
    this.x = byteBuf.readDouble();
    this.y = byteBuf.readDouble();
    this.z = byteBuf.readDouble();
    this.atEntity = byteBuf.readBoolean();
    this.entity = byteBuf.readVarInt();
    this.toAnchor = byteBuf.readEnum();
}

net/minecraft/network/protocol/game/ClientboundPlayerPositionPacket

Field Name Field Type
x D
y D
z D
yRot F
xRot F
relativeArguments Ljava/util/Set;
id I

Deserialization (read())

  • x: [readDouble()D]
  • y: [readDouble()D]
  • z: [readDouble()D]
  • yRot: [readFloat()F]
  • xRot: [readFloat()F]
  • relativeArguments: [readUnsignedByte()S]
  • id: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.x = byteBuf.readDouble();
    this.y = byteBuf.readDouble();
    this.z = byteBuf.readDouble();
    this.yRot = byteBuf.readFloat();
    this.xRot = byteBuf.readFloat();
    this.relativeArguments = byteBuf.readUnsignedByte();
    this.id = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ClientboundRecipePacket

Field Name Field Type
state Lnet/minecraft/network/protocol/game/ClientboundRecipePacket$State;
recipes Ljava/util/List;
toHighlight Ljava/util/List;
bookSettings Lnet/minecraft/stats/RecipeBookSettings;

Deserialization (read())

  • state: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • recipes: [readVarInt()I]
  • toHighlight: [readResourceLocation()Lnet/minecraft/resources/ResourceLocation;, readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.state = byteBuf.readEnum();
    this.recipes = byteBuf.readVarInt();
    this.toHighlight = byteBuf.readResourceLocation();
}

net/minecraft/network/protocol/game/ClientboundRemoveEntitiesPacket

Field Name Field Type
entityIds [I

Deserialization (read())

  • entityIds: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.entityIds = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ClientboundRemoveMobEffectPacket

Field Name Field Type
entityId I
effect Lnet/minecraft/world/effect/MobEffect;

Deserialization (read())

  • entityId: [readVarInt()I]
  • effect: [readUnsignedByte()S]

Example read:

public void read(ByteBuf byteBuf) {
    this.entityId = byteBuf.readVarInt();
    this.effect = byteBuf.readUnsignedByte();
}

net/minecraft/network/protocol/game/ClientboundResourcePackPacket

Field Name Field Type
url Ljava/lang/String;
hash Ljava/lang/String;

Deserialization (read())

  • url: [readUtf(I)Ljava/lang/String;]
  • hash: [readUtf(I)Ljava/lang/String;]

Example read:

public void read(ByteBuf byteBuf) {
    this.url = byteBuf.readUtf();
    this.hash = byteBuf.readUtf();
}

net/minecraft/network/protocol/game/ClientboundRespawnPacket

Field Name Field Type
dimensionType Lnet/minecraft/world/level/dimension/DimensionType;
dimension Lnet/minecraft/resources/ResourceKey;
seed J
playerGameType Lnet/minecraft/world/level/GameType;
previousPlayerGameType Lnet/minecraft/world/level/GameType;
isDebug Z
isFlat Z
keepAllPlayerData Z

Deserialization (read())

  • dimensionType: [readWithCodec(Lcom/mojang/serialization/Codec;)Ljava/lang/Object;]
  • dimension: [readResourceLocation()Lnet/minecraft/resources/ResourceLocation;]
  • seed: [readLong()J]
  • playerGameType: [readUnsignedByte()S]
  • previousPlayerGameType: [readUnsignedByte()S]
  • isDebug: [readBoolean()Z]
  • isFlat: [readBoolean()Z]
  • keepAllPlayerData: [readBoolean()Z]

Example read:

public void read(ByteBuf byteBuf) {
    this.dimensionType = byteBuf.readWithCodec();
    this.dimension = byteBuf.readResourceLocation();
    this.seed = byteBuf.readLong();
    this.playerGameType = byteBuf.readUnsignedByte();
    this.previousPlayerGameType = byteBuf.readUnsignedByte();
    this.isDebug = byteBuf.readBoolean();
    this.isFlat = byteBuf.readBoolean();
    this.keepAllPlayerData = byteBuf.readBoolean();
}

net/minecraft/network/protocol/game/ClientboundRotateHeadPacket

Field Name Field Type
entityId I
yHeadRot B

Deserialization (read())

  • entityId: [readVarInt()I]
  • yHeadRot: [readByte()B]

Example read:

public void read(ByteBuf byteBuf) {
    this.entityId = byteBuf.readVarInt();
    this.yHeadRot = byteBuf.readByte();
}

net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket

Field Name Field Type
sectionPos Lnet/minecraft/core/SectionPos;
positions [S
states [Lnet/minecraft/world/level/block/state/BlockState;
suppressLightUpdates Z

Deserialization (read())

  • sectionPos: [readLong()J]
  • suppressLightUpdates: [readBoolean()Z]

Example read:

public void read(ByteBuf byteBuf) {
    this.sectionPos = byteBuf.readLong();
    this.suppressLightUpdates = byteBuf.readBoolean();
}

net/minecraft/network/protocol/game/ClientboundSelectAdvancementsTabPacket

Field Name Field Type
tab Lnet/minecraft/resources/ResourceLocation;

Deserialization (read())

  • tab: [readBoolean()Z, readResourceLocation()Lnet/minecraft/resources/ResourceLocation;]

Example read:

public void read(ByteBuf byteBuf) {
    this.tab = byteBuf.readBoolean();
}

net/minecraft/network/protocol/game/ClientboundSetBorderPacket

Field Name Field Type
type Lnet/minecraft/network/protocol/game/ClientboundSetBorderPacket$Type;
newAbsoluteMaxSize I
newCenterX D
newCenterZ D
newSize D
oldSize D
lerpTime J
warningTime I
warningBlocks I

Deserialization (read())

  • type: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • newSize: [readDouble()D]
  • oldSize: [readDouble()D]
  • newSize: [readDouble()D]
  • newCenterX: [readDouble()D]
  • newCenterZ: [readDouble()D]
  • warningBlocks: [readVarInt()I]
  • warningTime: [readVarInt()I]
  • newCenterX: [readDouble()D]
  • newCenterZ: [readDouble()D]
  • oldSize: [readDouble()D]
  • newSize: [readDouble()D]
  • newAbsoluteMaxSize: [readVarInt()I]
  • warningBlocks: [readVarInt()I]
  • warningTime: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.type = byteBuf.readEnum();
    this.newSize = byteBuf.readDouble();
    this.oldSize = byteBuf.readDouble();
    this.newSize = byteBuf.readDouble();
    this.newCenterX = byteBuf.readDouble();
    this.newCenterZ = byteBuf.readDouble();
    this.warningBlocks = byteBuf.readVarInt();
    this.warningTime = byteBuf.readVarInt();
    this.newCenterX = byteBuf.readDouble();
    this.newCenterZ = byteBuf.readDouble();
    this.oldSize = byteBuf.readDouble();
    this.newSize = byteBuf.readDouble();
    this.newAbsoluteMaxSize = byteBuf.readVarInt();
    this.warningBlocks = byteBuf.readVarInt();
    this.warningTime = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ClientboundSetCameraPacket

Field Name Field Type
cameraId I

Deserialization (read())

  • cameraId: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.cameraId = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ClientboundSetCarriedItemPacket

Field Name Field Type
slot I

Deserialization (read())

  • slot: [readByte()B]

Example read:

public void read(ByteBuf byteBuf) {
    this.slot = byteBuf.readByte();
}

net/minecraft/network/protocol/game/ClientboundSetChunkCacheCenterPacket

Field Name Field Type
x I
z I

Deserialization (read())

  • x: [readVarInt()I]
  • z: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.x = byteBuf.readVarInt();
    this.z = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ClientboundSetChunkCacheRadiusPacket

Field Name Field Type
radius I

Deserialization (read())

  • radius: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.radius = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ClientboundSetDefaultSpawnPositionPacket

Field Name Field Type
pos Lnet/minecraft/core/BlockPos;
angle F

Deserialization (read())

  • pos: [readBlockPos()Lnet/minecraft/core/BlockPos;]

Example read:

public void read(ByteBuf byteBuf) {
    this.pos = byteBuf.readBlockPos();
}

net/minecraft/network/protocol/game/ClientboundSetDisplayObjectivePacket

Field Name Field Type
slot I
objectiveName Ljava/lang/String;

Deserialization (read())

  • slot: [readByte()B]
  • objectiveName: [readUtf(I)Ljava/lang/String;]

Example read:

public void read(ByteBuf byteBuf) {
    this.slot = byteBuf.readByte();
    this.objectiveName = byteBuf.readUtf();
}

net/minecraft/network/protocol/game/ClientboundSetEntityDataPacket

Field Name Field Type
id I
packedItems Ljava/util/List;

Deserialization (read())

  • id: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.id = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ClientboundSetEntityLinkPacket

Field Name Field Type
sourceId I
destId I

Deserialization (read())

  • sourceId: [readInt()I]
  • destId: [readInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.sourceId = byteBuf.readInt();
    this.destId = byteBuf.readInt();
}

net/minecraft/network/protocol/game/ClientboundSetEntityMotionPacket

Field Name Field Type
id I
xa I
ya I
za I

Deserialization (read())

  • id: [readVarInt()I]
  • xa: [readShort()S]
  • ya: [readShort()S]
  • za: [readShort()S]

Example read:

public void read(ByteBuf byteBuf) {
    this.id = byteBuf.readVarInt();
    this.xa = byteBuf.readShort();
    this.ya = byteBuf.readShort();
    this.za = byteBuf.readShort();
}

net/minecraft/network/protocol/game/ClientboundSetEquipmentPacket

Field Name Field Type
entity I
slots Ljava/util/List;

Deserialization (read())

  • entity: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.entity = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ClientboundSetExperiencePacket

Field Name Field Type
experienceProgress F
totalExperience I
experienceLevel I

Deserialization (read())

  • experienceProgress: [readFloat()F]
  • experienceLevel: [readVarInt()I]
  • totalExperience: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.experienceProgress = byteBuf.readFloat();
    this.experienceLevel = byteBuf.readVarInt();
    this.totalExperience = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ClientboundSetHealthPacket

Field Name Field Type
health F
food I
saturation F

Deserialization (read())

  • health: [readFloat()F]
  • food: [readVarInt()I]
  • saturation: [readFloat()F]

Example read:

public void read(ByteBuf byteBuf) {
    this.health = byteBuf.readFloat();
    this.food = byteBuf.readVarInt();
    this.saturation = byteBuf.readFloat();
}

net/minecraft/network/protocol/game/ClientboundSetObjectivePacket

Field Name Field Type
objectiveName Ljava/lang/String;
displayName Lnet/minecraft/network/chat/Component;
renderType Lnet/minecraft/world/scores/criteria/ObjectiveCriteria$RenderType;
method I

Deserialization (read())

  • objectiveName: [readUtf(I)Ljava/lang/String;]
  • method: [readByte()B]
  • displayName: [readComponent()Lnet/minecraft/network/chat/Component;]
  • renderType: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]

Example read:

public void read(ByteBuf byteBuf) {
    this.objectiveName = byteBuf.readUtf();
    this.method = byteBuf.readByte();
    this.displayName = byteBuf.readComponent();
    this.renderType = byteBuf.readEnum();
}

net/minecraft/network/protocol/game/ClientboundSetPassengersPacket

Field Name Field Type
vehicle I
passengers [I

Deserialization (read())

  • vehicle: [readVarInt()I]
  • passengers: [readVarIntArray()[I]

Example read:

public void read(ByteBuf byteBuf) {
    this.vehicle = byteBuf.readVarInt();
    this.passengers = byteBuf.readVarIntArray();
}

net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket

Field Name Field Type
name Ljava/lang/String;
displayName Lnet/minecraft/network/chat/Component;
playerPrefix Lnet/minecraft/network/chat/Component;
playerSuffix Lnet/minecraft/network/chat/Component;
nametagVisibility Ljava/lang/String;
collisionRule Ljava/lang/String;
color Lnet/minecraft/ChatFormatting;
players Ljava/util/Collection;
method I
options I

Deserialization (read())

  • name: [readUtf(I)Ljava/lang/String;]
  • method: [readByte()B]
  • displayName: [readComponent()Lnet/minecraft/network/chat/Component;]
  • options: [readByte()B]
  • nametagVisibility: [readUtf(I)Ljava/lang/String;]
  • collisionRule: [readUtf(I)Ljava/lang/String;]
  • color: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • playerPrefix: [readComponent()Lnet/minecraft/network/chat/Component;]
  • playerSuffix: [readComponent()Lnet/minecraft/network/chat/Component;]

Example read:

public void read(ByteBuf byteBuf) {
    this.name = byteBuf.readUtf();
    this.method = byteBuf.readByte();
    this.displayName = byteBuf.readComponent();
    this.options = byteBuf.readByte();
    this.nametagVisibility = byteBuf.readUtf();
    this.collisionRule = byteBuf.readUtf();
    this.color = byteBuf.readEnum();
    this.playerPrefix = byteBuf.readComponent();
    this.playerSuffix = byteBuf.readComponent();
}

net/minecraft/network/protocol/game/ClientboundSetScorePacket

Field Name Field Type
owner Ljava/lang/String;
objectiveName Ljava/lang/String;
score I
method Lnet/minecraft/server/ServerScoreboard$Method;

Deserialization (read())

  • owner: [readUtf(I)Ljava/lang/String;]
  • method: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • objectiveName: [readUtf(I)Ljava/lang/String;]
  • score: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.owner = byteBuf.readUtf();
    this.method = byteBuf.readEnum();
    this.objectiveName = byteBuf.readUtf();
    this.score = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ClientboundSetTimePacket

Field Name Field Type
gameTime J
dayTime J

Deserialization (read())

  • gameTime: [readLong()J]
  • dayTime: [readLong()J]

Example read:

public void read(ByteBuf byteBuf) {
    this.gameTime = byteBuf.readLong();
    this.dayTime = byteBuf.readLong();
}

net/minecraft/network/protocol/game/ClientboundSetTitlesPacket

Field Name Field Type
type Lnet/minecraft/network/protocol/game/ClientboundSetTitlesPacket$Type;
text Lnet/minecraft/network/chat/Component;
fadeInTime I
stayTime I
fadeOutTime I

Deserialization (read())

  • type: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • text: [readComponent()Lnet/minecraft/network/chat/Component;]
  • fadeInTime: [readInt()I]
  • stayTime: [readInt()I]
  • fadeOutTime: [readInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.type = byteBuf.readEnum();
    this.text = byteBuf.readComponent();
    this.fadeInTime = byteBuf.readInt();
    this.stayTime = byteBuf.readInt();
    this.fadeOutTime = byteBuf.readInt();
}

net/minecraft/network/protocol/game/ClientboundSoundEntityPacket

Field Name Field Type
sound Lnet/minecraft/sounds/SoundEvent;
source Lnet/minecraft/sounds/SoundSource;
id I
volume F
pitch F

Deserialization (read())

  • sound: [readVarInt()I]
  • source: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • id: [readVarInt()I]
  • volume: [readFloat()F]
  • pitch: [readFloat()F]

Example read:

public void read(ByteBuf byteBuf) {
    this.sound = byteBuf.readVarInt();
    this.source = byteBuf.readEnum();
    this.id = byteBuf.readVarInt();
    this.volume = byteBuf.readFloat();
    this.pitch = byteBuf.readFloat();
}

net/minecraft/network/protocol/game/ClientboundSoundPacket

Field Name Field Type
sound Lnet/minecraft/sounds/SoundEvent;
source Lnet/minecraft/sounds/SoundSource;
x I
y I
z I
volume F
pitch F

Deserialization (read())

  • sound: [readVarInt()I]
  • source: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • x: [readInt()I]
  • y: [readInt()I]
  • z: [readInt()I]
  • volume: [readFloat()F]
  • pitch: [readFloat()F]

Example read:

public void read(ByteBuf byteBuf) {
    this.sound = byteBuf.readVarInt();
    this.source = byteBuf.readEnum();
    this.x = byteBuf.readInt();
    this.y = byteBuf.readInt();
    this.z = byteBuf.readInt();
    this.volume = byteBuf.readFloat();
    this.pitch = byteBuf.readFloat();
}

net/minecraft/network/protocol/game/ClientboundStopSoundPacket

Field Name Field Type
name Lnet/minecraft/resources/ResourceLocation;
source Lnet/minecraft/sounds/SoundSource;

Deserialization (read())

  • source: [readByte()B, readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • name: [readResourceLocation()Lnet/minecraft/resources/ResourceLocation;]

Example read:

public void read(ByteBuf byteBuf) {
    this.source = byteBuf.readByte();
    this.name = byteBuf.readResourceLocation();
}

net/minecraft/network/protocol/game/ClientboundTabListPacket

Field Name Field Type
header Lnet/minecraft/network/chat/Component;
footer Lnet/minecraft/network/chat/Component;

Deserialization (read())

  • header: [readComponent()Lnet/minecraft/network/chat/Component;]
  • footer: [readComponent()Lnet/minecraft/network/chat/Component;]

Example read:

public void read(ByteBuf byteBuf) {
    this.header = byteBuf.readComponent();
    this.footer = byteBuf.readComponent();
}

net/minecraft/network/protocol/game/ClientboundTagQueryPacket

Field Name Field Type
transactionId I
tag Lnet/minecraft/nbt/CompoundTag;

Deserialization (read())

  • transactionId: [readVarInt()I]
  • tag: [readNbt()Lnet/minecraft/nbt/CompoundTag;]

Example read:

public void read(ByteBuf byteBuf) {
    this.transactionId = byteBuf.readVarInt();
    this.tag = byteBuf.readNbt();
}

net/minecraft/network/protocol/game/ClientboundTakeItemEntityPacket

Field Name Field Type
itemId I
playerId I
amount I

Deserialization (read())

  • itemId: [readVarInt()I]
  • playerId: [readVarInt()I]
  • amount: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.itemId = byteBuf.readVarInt();
    this.playerId = byteBuf.readVarInt();
    this.amount = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ClientboundTeleportEntityPacket

Field Name Field Type
id I
x D
y D
z D
yRot B
xRot B
onGround Z

Deserialization (read())

  • id: [readVarInt()I]
  • x: [readDouble()D]
  • y: [readDouble()D]
  • z: [readDouble()D]
  • yRot: [readByte()B]
  • xRot: [readByte()B]
  • onGround: [readBoolean()Z]

Example read:

public void read(ByteBuf byteBuf) {
    this.id = byteBuf.readVarInt();
    this.x = byteBuf.readDouble();
    this.y = byteBuf.readDouble();
    this.z = byteBuf.readDouble();
    this.yRot = byteBuf.readByte();
    this.xRot = byteBuf.readByte();
    this.onGround = byteBuf.readBoolean();
}

net/minecraft/network/protocol/game/ClientboundUpdateAdvancementsPacket

Field Name Field Type
reset Z
added Ljava/util/Map;
removed Ljava/util/Set;
progress Ljava/util/Map;

Deserialization (read())

  • reset: [readBoolean()Z]

Example read:

public void read(ByteBuf byteBuf) {
    this.reset = byteBuf.readBoolean();
}

net/minecraft/network/protocol/game/ClientboundUpdateAttributesPacket

Field Name Field Type
entityId I
attributes Ljava/util/List;

Deserialization (read())

  • entityId: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.entityId = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ClientboundUpdateMobEffectPacket

Field Name Field Type
entityId I
effectId B
effectAmplifier B
effectDurationTicks I
flags B

Deserialization (read())

  • entityId: [readVarInt()I]
  • effectId: [readByte()B]
  • effectAmplifier: [readByte()B]
  • effectDurationTicks: [readVarInt()I]
  • flags: [readByte()B]

Example read:

public void read(ByteBuf byteBuf) {
    this.entityId = byteBuf.readVarInt();
    this.effectId = byteBuf.readByte();
    this.effectAmplifier = byteBuf.readByte();
    this.effectDurationTicks = byteBuf.readVarInt();
    this.flags = byteBuf.readByte();
}

net/minecraft/network/protocol/game/ClientboundUpdateRecipesPacket

Field Name Field Type
recipes Ljava/util/List;

net/minecraft/network/protocol/game/ClientboundUpdateTagsPacket

Field Name Field Type
tags Lnet/minecraft/tags/TagContainer;

net/minecraft/network/protocol/game/ServerboundAcceptTeleportationPacket

Field Name Field Type
id I

Deserialization (read())

  • id: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.id = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ServerboundBlockEntityTagQuery

Field Name Field Type
transactionId I
pos Lnet/minecraft/core/BlockPos;

Deserialization (read())

  • transactionId: [readVarInt()I]
  • pos: [readBlockPos()Lnet/minecraft/core/BlockPos;]

Example read:

public void read(ByteBuf byteBuf) {
    this.transactionId = byteBuf.readVarInt();
    this.pos = byteBuf.readBlockPos();
}

net/minecraft/network/protocol/game/ServerboundChangeDifficultyPacket

Field Name Field Type
difficulty Lnet/minecraft/world/Difficulty;

Deserialization (read())

  • difficulty: [readUnsignedByte()S]

Example read:

public void read(ByteBuf byteBuf) {
    this.difficulty = byteBuf.readUnsignedByte();
}

net/minecraft/network/protocol/game/ServerboundChatPacket

Field Name Field Type
message Ljava/lang/String;

Deserialization (read())

  • message: [readUtf(I)Ljava/lang/String;]

Example read:

public void read(ByteBuf byteBuf) {
    this.message = byteBuf.readUtf();
}

net/minecraft/network/protocol/game/ServerboundClientCommandPacket

Field Name Field Type
action Lnet/minecraft/network/protocol/game/ServerboundClientCommandPacket$Action;

Deserialization (read())

  • action: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]

Example read:

public void read(ByteBuf byteBuf) {
    this.action = byteBuf.readEnum();
}

net/minecraft/network/protocol/game/ServerboundClientInformationPacket

Field Name Field Type
language Ljava/lang/String;
viewDistance I
chatVisibility Lnet/minecraft/world/entity/player/ChatVisiblity;
chatColors Z
modelCustomisation I
mainHand Lnet/minecraft/world/entity/HumanoidArm;

Deserialization (read())

  • language: [readUtf(I)Ljava/lang/String;]
  • viewDistance: [readByte()B]
  • chatVisibility: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • chatColors: [readBoolean()Z]
  • modelCustomisation: [readUnsignedByte()S]
  • mainHand: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]

Example read:

public void read(ByteBuf byteBuf) {
    this.language = byteBuf.readUtf();
    this.viewDistance = byteBuf.readByte();
    this.chatVisibility = byteBuf.readEnum();
    this.chatColors = byteBuf.readBoolean();
    this.modelCustomisation = byteBuf.readUnsignedByte();
    this.mainHand = byteBuf.readEnum();
}

net/minecraft/network/protocol/game/ServerboundCommandSuggestionPacket

Field Name Field Type
id I
command Ljava/lang/String;

Deserialization (read())

  • id: [readVarInt()I]
  • command: [readUtf(I)Ljava/lang/String;]

Example read:

public void read(ByteBuf byteBuf) {
    this.id = byteBuf.readVarInt();
    this.command = byteBuf.readUtf();
}

net/minecraft/network/protocol/game/ServerboundContainerAckPacket

Field Name Field Type
containerId I
uid S
accepted Z

Deserialization (read())

  • containerId: [readByte()B]
  • uid: [readShort()S]
  • accepted: [readByte()B]

Example read:

public void read(ByteBuf byteBuf) {
    this.containerId = byteBuf.readByte();
    this.uid = byteBuf.readShort();
    this.accepted = byteBuf.readByte();
}

net/minecraft/network/protocol/game/ServerboundContainerButtonClickPacket

Field Name Field Type
containerId I
buttonId I

Deserialization (read())

  • containerId: [readByte()B]
  • buttonId: [readByte()B]

Example read:

public void read(ByteBuf byteBuf) {
    this.containerId = byteBuf.readByte();
    this.buttonId = byteBuf.readByte();
}

net/minecraft/network/protocol/game/ServerboundContainerClickPacket

Field Name Field Type
containerId I
slotNum I
buttonNum I
uid S
itemStack Lnet/minecraft/world/item/ItemStack;
clickType Lnet/minecraft/world/inventory/ClickType;

Deserialization (read())

  • containerId: [readByte()B]
  • slotNum: [readShort()S]
  • buttonNum: [readByte()B]
  • uid: [readShort()S]
  • clickType: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • itemStack: [readItem()Lnet/minecraft/world/item/ItemStack;]

Example read:

public void read(ByteBuf byteBuf) {
    this.containerId = byteBuf.readByte();
    this.slotNum = byteBuf.readShort();
    this.buttonNum = byteBuf.readByte();
    this.uid = byteBuf.readShort();
    this.clickType = byteBuf.readEnum();
    this.itemStack = byteBuf.readItem();
}

net/minecraft/network/protocol/game/ServerboundContainerClosePacket

Field Name Field Type
containerId I

Deserialization (read())

  • containerId: [readByte()B]

Example read:

public void read(ByteBuf byteBuf) {
    this.containerId = byteBuf.readByte();
}

net/minecraft/network/protocol/game/ServerboundCustomPayloadPacket

Field Name Field Type
identifier Lnet/minecraft/resources/ResourceLocation;
data Lnet/minecraft/network/FriendlyByteBuf;

Deserialization (read())

  • identifier: [readResourceLocation()Lnet/minecraft/resources/ResourceLocation;]
  • data: [readBytes(I)Lio/netty/buffer/ByteBuf;]

Example read:

public void read(ByteBuf byteBuf) {
    this.identifier = byteBuf.readResourceLocation();
    this.data = byteBuf.readBytes();
}

net/minecraft/network/protocol/game/ServerboundEditBookPacket

Field Name Field Type
book Lnet/minecraft/world/item/ItemStack;
signing Z
slot I

Deserialization (read())

  • book: [readItem()Lnet/minecraft/world/item/ItemStack;]
  • signing: [readBoolean()Z]
  • slot: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.book = byteBuf.readItem();
    this.signing = byteBuf.readBoolean();
    this.slot = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ServerboundEntityTagQuery

Field Name Field Type
transactionId I
entityId I

Deserialization (read())

  • transactionId: [readVarInt()I]
  • entityId: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.transactionId = byteBuf.readVarInt();
    this.entityId = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ServerboundInteractPacket

Field Name Field Type
entityId I
action Lnet/minecraft/network/protocol/game/ServerboundInteractPacket$Action;
location Lnet/minecraft/world/phys/Vec3;
hand Lnet/minecraft/world/InteractionHand;
usingSecondaryAction Z

Deserialization (read())

  • entityId: [readVarInt()I]
  • action: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • location: [readFloat()F, readFloat()F, readFloat()F]
  • hand: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • usingSecondaryAction: [readBoolean()Z]

Example read:

public void read(ByteBuf byteBuf) {
    this.entityId = byteBuf.readVarInt();
    this.action = byteBuf.readEnum();
    this.location = byteBuf.readFloat();
    this.hand = byteBuf.readEnum();
    this.usingSecondaryAction = byteBuf.readBoolean();
}

net/minecraft/network/protocol/game/ServerboundJigsawGeneratePacket

Field Name Field Type
pos Lnet/minecraft/core/BlockPos;
levels I
keepJigsaws Z

Deserialization (read())

  • pos: [readBlockPos()Lnet/minecraft/core/BlockPos;]
  • levels: [readVarInt()I]
  • keepJigsaws: [readBoolean()Z]

Example read:

public void read(ByteBuf byteBuf) {
    this.pos = byteBuf.readBlockPos();
    this.levels = byteBuf.readVarInt();
    this.keepJigsaws = byteBuf.readBoolean();
}

net/minecraft/network/protocol/game/ServerboundKeepAlivePacket

Field Name Field Type
id J

Deserialization (read())

  • id: [readLong()J]

Example read:

public void read(ByteBuf byteBuf) {
    this.id = byteBuf.readLong();
}

net/minecraft/network/protocol/game/ServerboundLockDifficultyPacket

Field Name Field Type
locked Z

Deserialization (read())

  • locked: [readBoolean()Z]

Example read:

public void read(ByteBuf byteBuf) {
    this.locked = byteBuf.readBoolean();
}

net/minecraft/network/protocol/game/ServerboundMovePlayerPacket

Field Name Field Type
x D
y D
z D
yRot F
xRot F
onGround Z
hasPos Z
hasRot Z

Deserialization (read())

  • onGround: [readUnsignedByte()S]

Example read:

public void read(ByteBuf byteBuf) {
    this.onGround = byteBuf.readUnsignedByte();
}

net/minecraft/network/protocol/game/ServerboundMoveVehiclePacket

Field Name Field Type
x D
y D
z D
yRot F
xRot F

Deserialization (read())

  • x: [readDouble()D]
  • y: [readDouble()D]
  • z: [readDouble()D]
  • yRot: [readFloat()F]
  • xRot: [readFloat()F]

Example read:

public void read(ByteBuf byteBuf) {
    this.x = byteBuf.readDouble();
    this.y = byteBuf.readDouble();
    this.z = byteBuf.readDouble();
    this.yRot = byteBuf.readFloat();
    this.xRot = byteBuf.readFloat();
}

net/minecraft/network/protocol/game/ServerboundPaddleBoatPacket

Field Name Field Type
left Z
right Z

Deserialization (read())

  • left: [readBoolean()Z]
  • right: [readBoolean()Z]

Example read:

public void read(ByteBuf byteBuf) {
    this.left = byteBuf.readBoolean();
    this.right = byteBuf.readBoolean();
}

net/minecraft/network/protocol/game/ServerboundPickItemPacket

Field Name Field Type
slot I

Deserialization (read())

  • slot: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.slot = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ServerboundPlaceRecipePacket

Field Name Field Type
containerId I
recipe Lnet/minecraft/resources/ResourceLocation;
shiftDown Z

Deserialization (read())

  • containerId: [readByte()B]
  • recipe: [readResourceLocation()Lnet/minecraft/resources/ResourceLocation;]
  • shiftDown: [readBoolean()Z]

Example read:

public void read(ByteBuf byteBuf) {
    this.containerId = byteBuf.readByte();
    this.recipe = byteBuf.readResourceLocation();
    this.shiftDown = byteBuf.readBoolean();
}

net/minecraft/network/protocol/game/ServerboundPlayerAbilitiesPacket

Field Name Field Type
isFlying Z

Deserialization (read())

  • isFlying: [readByte()B]

Example read:

public void read(ByteBuf byteBuf) {
    this.isFlying = byteBuf.readByte();
}

net/minecraft/network/protocol/game/ServerboundPlayerActionPacket

Field Name Field Type
pos Lnet/minecraft/core/BlockPos;
direction Lnet/minecraft/core/Direction;
action Lnet/minecraft/network/protocol/game/ServerboundPlayerActionPacket$Action;

Deserialization (read())

  • action: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • pos: [readBlockPos()Lnet/minecraft/core/BlockPos;]
  • direction: [readUnsignedByte()S]

Example read:

public void read(ByteBuf byteBuf) {
    this.action = byteBuf.readEnum();
    this.pos = byteBuf.readBlockPos();
    this.direction = byteBuf.readUnsignedByte();
}

net/minecraft/network/protocol/game/ServerboundPlayerCommandPacket

Field Name Field Type
id I
action Lnet/minecraft/network/protocol/game/ServerboundPlayerCommandPacket$Action;
data I

Deserialization (read())

  • id: [readVarInt()I]
  • action: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • data: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.id = byteBuf.readVarInt();
    this.action = byteBuf.readEnum();
    this.data = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ServerboundPlayerInputPacket

Field Name Field Type
xxa F
zza F
isJumping Z
isShiftKeyDown Z

Deserialization (read())

  • xxa: [readFloat()F]
  • zza: [readFloat()F]
  • isJumping: [readByte()B]

Example read:

public void read(ByteBuf byteBuf) {
    this.xxa = byteBuf.readFloat();
    this.zza = byteBuf.readFloat();
    this.isJumping = byteBuf.readByte();
}

net/minecraft/network/protocol/game/ServerboundRecipeBookChangeSettingsPacket

Field Name Field Type
bookType Lnet/minecraft/world/inventory/RecipeBookType;
isOpen Z
isFiltering Z

Deserialization (read())

  • bookType: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • isOpen: [readBoolean()Z]
  • isFiltering: [readBoolean()Z]

Example read:

public void read(ByteBuf byteBuf) {
    this.bookType = byteBuf.readEnum();
    this.isOpen = byteBuf.readBoolean();
    this.isFiltering = byteBuf.readBoolean();
}

net/minecraft/network/protocol/game/ServerboundRecipeBookSeenRecipePacket

Field Name Field Type
recipe Lnet/minecraft/resources/ResourceLocation;

Deserialization (read())

  • recipe: [readResourceLocation()Lnet/minecraft/resources/ResourceLocation;]

Example read:

public void read(ByteBuf byteBuf) {
    this.recipe = byteBuf.readResourceLocation();
}

net/minecraft/network/protocol/game/ServerboundRenameItemPacket

Field Name Field Type
name Ljava/lang/String;

Deserialization (read())

  • name: [readUtf(I)Ljava/lang/String;]

Example read:

public void read(ByteBuf byteBuf) {
    this.name = byteBuf.readUtf();
}

net/minecraft/network/protocol/game/ServerboundResourcePackPacket

Field Name Field Type
action Lnet/minecraft/network/protocol/game/ServerboundResourcePackPacket$Action;

Deserialization (read())

  • action: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]

Example read:

public void read(ByteBuf byteBuf) {
    this.action = byteBuf.readEnum();
}

net/minecraft/network/protocol/game/ServerboundSeenAdvancementsPacket

Field Name Field Type
action Lnet/minecraft/network/protocol/game/ServerboundSeenAdvancementsPacket$Action;
tab Lnet/minecraft/resources/ResourceLocation;

Deserialization (read())

  • action: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • tab: [readResourceLocation()Lnet/minecraft/resources/ResourceLocation;]

Example read:

public void read(ByteBuf byteBuf) {
    this.action = byteBuf.readEnum();
    this.tab = byteBuf.readResourceLocation();
}

net/minecraft/network/protocol/game/ServerboundSelectTradePacket

Field Name Field Type
item I

Deserialization (read())

  • item: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.item = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ServerboundSetBeaconPacket

Field Name Field Type
primary I
secondary I

Deserialization (read())

  • primary: [readVarInt()I]
  • secondary: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.primary = byteBuf.readVarInt();
    this.secondary = byteBuf.readVarInt();
}

net/minecraft/network/protocol/game/ServerboundSetCarriedItemPacket

Field Name Field Type
slot I

Deserialization (read())

  • slot: [readShort()S]

Example read:

public void read(ByteBuf byteBuf) {
    this.slot = byteBuf.readShort();
}

net/minecraft/network/protocol/game/ServerboundSetCommandBlockPacket

Field Name Field Type
pos Lnet/minecraft/core/BlockPos;
command Ljava/lang/String;
trackOutput Z
conditional Z
automatic Z
mode Lnet/minecraft/world/level/block/entity/CommandBlockEntity$Mode;

Deserialization (read())

  • pos: [readBlockPos()Lnet/minecraft/core/BlockPos;]
  • command: [readUtf(I)Ljava/lang/String;]
  • mode: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • trackOutput: [readByte()B]

Example read:

public void read(ByteBuf byteBuf) {
    this.pos = byteBuf.readBlockPos();
    this.command = byteBuf.readUtf();
    this.mode = byteBuf.readEnum();
    this.trackOutput = byteBuf.readByte();
}

net/minecraft/network/protocol/game/ServerboundSetCommandMinecartPacket

Field Name Field Type
entity I
command Ljava/lang/String;
trackOutput Z

Deserialization (read())

  • entity: [readVarInt()I]
  • command: [readUtf(I)Ljava/lang/String;]
  • trackOutput: [readBoolean()Z]

Example read:

public void read(ByteBuf byteBuf) {
    this.entity = byteBuf.readVarInt();
    this.command = byteBuf.readUtf();
    this.trackOutput = byteBuf.readBoolean();
}

net/minecraft/network/protocol/game/ServerboundSetCreativeModeSlotPacket

Field Name Field Type
slotNum I
itemStack Lnet/minecraft/world/item/ItemStack;

Deserialization (read())

  • slotNum: [readShort()S]
  • itemStack: [readItem()Lnet/minecraft/world/item/ItemStack;]

Example read:

public void read(ByteBuf byteBuf) {
    this.slotNum = byteBuf.readShort();
    this.itemStack = byteBuf.readItem();
}

net/minecraft/network/protocol/game/ServerboundSetJigsawBlockPacket

Field Name Field Type
pos Lnet/minecraft/core/BlockPos;
name Lnet/minecraft/resources/ResourceLocation;
target Lnet/minecraft/resources/ResourceLocation;
pool Lnet/minecraft/resources/ResourceLocation;
finalState Ljava/lang/String;
joint Lnet/minecraft/world/level/block/entity/JigsawBlockEntity$JointType;

Deserialization (read())

  • pos: [readBlockPos()Lnet/minecraft/core/BlockPos;]
  • name: [readResourceLocation()Lnet/minecraft/resources/ResourceLocation;]
  • target: [readResourceLocation()Lnet/minecraft/resources/ResourceLocation;]
  • pool: [readResourceLocation()Lnet/minecraft/resources/ResourceLocation;]
  • finalState: [readUtf(I)Ljava/lang/String;]
  • joint: [readUtf(I)Ljava/lang/String;]

Example read:

public void read(ByteBuf byteBuf) {
    this.pos = byteBuf.readBlockPos();
    this.name = byteBuf.readResourceLocation();
    this.target = byteBuf.readResourceLocation();
    this.pool = byteBuf.readResourceLocation();
    this.finalState = byteBuf.readUtf();
    this.joint = byteBuf.readUtf();
}

net/minecraft/network/protocol/game/ServerboundSetStructureBlockPacket

Field Name Field Type
pos Lnet/minecraft/core/BlockPos;
updateType Lnet/minecraft/world/level/block/entity/StructureBlockEntity$UpdateType;
mode Lnet/minecraft/world/level/block/state/properties/StructureMode;
name Ljava/lang/String;
offset Lnet/minecraft/core/BlockPos;
size Lnet/minecraft/core/BlockPos;
mirror Lnet/minecraft/world/level/block/Mirror;
rotation Lnet/minecraft/world/level/block/Rotation;
data Ljava/lang/String;
ignoreEntities Z
showAir Z
showBoundingBox Z
integrity F
seed J

Deserialization (read())

  • pos: [readBlockPos()Lnet/minecraft/core/BlockPos;]
  • updateType: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • mode: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • name: [readUtf(I)Ljava/lang/String;]
  • offset: [readByte()B, readByte()B, readByte()B]
  • size: [readByte()B, readByte()B, readByte()B]
  • mirror: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • rotation: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • data: [readUtf(I)Ljava/lang/String;]
  • integrity: [readFloat()F]
  • ignoreEntities: [readByte()B]

Example read:

public void read(ByteBuf byteBuf) {
    this.pos = byteBuf.readBlockPos();
    this.updateType = byteBuf.readEnum();
    this.mode = byteBuf.readEnum();
    this.name = byteBuf.readUtf();
    this.offset = byteBuf.readByte();
    this.size = byteBuf.readByte();
    this.mirror = byteBuf.readEnum();
    this.rotation = byteBuf.readEnum();
    this.data = byteBuf.readUtf();
    this.integrity = byteBuf.readFloat();
    this.ignoreEntities = byteBuf.readByte();
}

net/minecraft/network/protocol/game/ServerboundSignUpdatePacket

Field Name Field Type
pos Lnet/minecraft/core/BlockPos;
lines [Ljava/lang/String;

Deserialization (read())

  • pos: [readBlockPos()Lnet/minecraft/core/BlockPos;]

Example read:

public void read(ByteBuf byteBuf) {
    this.pos = byteBuf.readBlockPos();
}

net/minecraft/network/protocol/game/ServerboundSwingPacket

Field Name Field Type
hand Lnet/minecraft/world/InteractionHand;

Deserialization (read())

  • hand: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]

Example read:

public void read(ByteBuf byteBuf) {
    this.hand = byteBuf.readEnum();
}

net/minecraft/network/protocol/game/ServerboundTeleportToEntityPacket

Field Name Field Type
uuid Ljava/util/UUID;

Deserialization (read())

  • uuid: [readUUID()Ljava/util/UUID;]

Example read:

public void read(ByteBuf byteBuf) {
    this.uuid = byteBuf.readUUID();
}

net/minecraft/network/protocol/game/ServerboundUseItemOnPacket

Field Name Field Type
blockHit Lnet/minecraft/world/phys/BlockHitResult;
hand Lnet/minecraft/world/InteractionHand;

Deserialization (read())

  • hand: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]
  • blockHit: [readBlockHitResult()Lnet/minecraft/world/phys/BlockHitResult;]

Example read:

public void read(ByteBuf byteBuf) {
    this.hand = byteBuf.readEnum();
    this.blockHit = byteBuf.readBlockHitResult();
}

net/minecraft/network/protocol/game/ServerboundUseItemPacket

Field Name Field Type
hand Lnet/minecraft/world/InteractionHand;

Deserialization (read())

  • hand: [readEnum(Ljava/lang/Class;)Ljava/lang/Enum;]

Example read:

public void read(ByteBuf byteBuf) {
    this.hand = byteBuf.readEnum();
}

net/minecraft/network/protocol/handshake/ClientIntentionPacket

Field Name Field Type
protocolVersion I
hostName Ljava/lang/String;
port I
intention Lnet/minecraft/network/ConnectionProtocol;

Deserialization (read())

  • protocolVersion: [readVarInt()I]
  • hostName: [readUtf(I)Ljava/lang/String;]
  • port: [readUnsignedShort()I]
  • intention: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.protocolVersion = byteBuf.readVarInt();
    this.hostName = byteBuf.readUtf();
    this.port = byteBuf.readUnsignedShort();
    this.intention = byteBuf.readVarInt();
}

net/minecraft/network/protocol/login/ClientboundCustomQueryPacket

Field Name Field Type
transactionId I
identifier Lnet/minecraft/resources/ResourceLocation;
data Lnet/minecraft/network/FriendlyByteBuf;

Deserialization (read())

  • transactionId: [readVarInt()I]
  • identifier: [readResourceLocation()Lnet/minecraft/resources/ResourceLocation;]
  • data: [readBytes(I)Lio/netty/buffer/ByteBuf;]

Example read:

public void read(ByteBuf byteBuf) {
    this.transactionId = byteBuf.readVarInt();
    this.identifier = byteBuf.readResourceLocation();
    this.data = byteBuf.readBytes();
}

net/minecraft/network/protocol/login/ClientboundGameProfilePacket

Field Name Field Type
gameProfile Lcom/mojang/authlib/GameProfile;

Deserialization (read())

  • gameProfile: [readInt()I, readUtf(I)Ljava/lang/String;]

Example read:

public void read(ByteBuf byteBuf) {
    this.gameProfile = byteBuf.readInt();
}

net/minecraft/network/protocol/login/ClientboundHelloPacket

Field Name Field Type
serverId Ljava/lang/String;
publicKey [B
nonce [B

Deserialization (read())

  • serverId: [readUtf(I)Ljava/lang/String;]
  • publicKey: [readByteArray()[B]
  • nonce: [readByteArray()[B]

Example read:

public void read(ByteBuf byteBuf) {
    this.serverId = byteBuf.readUtf();
    this.publicKey = byteBuf.readByteArray();
    this.nonce = byteBuf.readByteArray();
}

net/minecraft/network/protocol/login/ClientboundLoginCompressionPacket

Field Name Field Type
compressionThreshold I

Deserialization (read())

  • compressionThreshold: [readVarInt()I]

Example read:

public void read(ByteBuf byteBuf) {
    this.compressionThreshold = byteBuf.readVarInt();
}

net/minecraft/network/protocol/login/ClientboundLoginDisconnectPacket

Field Name Field Type
reason Lnet/minecraft/network/chat/Component;

Deserialization (read())

  • reason: [readUtf(I)Ljava/lang/String;]

Example read:

public void read(ByteBuf byteBuf) {
    this.reason = byteBuf.readUtf();
}

net/minecraft/network/protocol/login/ServerboundCustomQueryPacket

Field Name Field Type
transactionId I
data Lnet/minecraft/network/FriendlyByteBuf;

Deserialization (read())

  • transactionId: [readVarInt()I]
  • data: [readBoolean()Z, readBytes(I)Lio/netty/buffer/ByteBuf;]

Example read:

public void read(ByteBuf byteBuf) {
    this.transactionId = byteBuf.readVarInt();
    this.data = byteBuf.readBoolean();
}

net/minecraft/network/protocol/login/ServerboundHelloPacket

Field Name Field Type
gameProfile Lcom/mojang/authlib/GameProfile;

Deserialization (read())

  • gameProfile: [readUtf(I)Ljava/lang/String;]

Example read:

public void read(ByteBuf byteBuf) {
    this.gameProfile = byteBuf.readUtf();
}

net/minecraft/network/protocol/login/ServerboundKeyPacket

Field Name Field Type
keybytes [B
nonce [B

Deserialization (read())

  • keybytes: [readByteArray()[B]
  • nonce: [readByteArray()[B]

Example read:

public void read(ByteBuf byteBuf) {
    this.keybytes = byteBuf.readByteArray();
    this.nonce = byteBuf.readByteArray();
}

net/minecraft/network/protocol/status/ClientboundPongResponsePacket

Field Name Field Type
time J

Deserialization (read())

  • time: [readLong()J]

Example read:

public void read(ByteBuf byteBuf) {
    this.time = byteBuf.readLong();
}

net/minecraft/network/protocol/status/ClientboundStatusResponsePacket

Field Name Field Type
status Lnet/minecraft/network/protocol/status/ServerStatus;

Deserialization (read())

  • status: [readUtf(I)Ljava/lang/String;]

Example read:

public void read(ByteBuf byteBuf) {
    this.status = byteBuf.readUtf();
}

net/minecraft/network/protocol/status/ServerboundPingRequestPacket

Field Name Field Type
time J

Deserialization (read())

  • time: [readLong()J]

Example read:

public void read(ByteBuf byteBuf) {
    this.time = byteBuf.readLong();
}

net/minecraft/network/protocol/status/ServerboundStatusRequestPacket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment