Skip to content

Commit

Permalink
Fix chunk (de)serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
basaigh committed Sep 8, 2023
1 parent e156e81 commit 5cbc12f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class ClientboundLevelChunkWithLightPacket implements MinecraftPacket {
public ClientboundLevelChunkWithLightPacket(ByteBuf in, MinecraftCodecHelper helper) throws IOException {
this.x = in.readInt();
this.z = in.readInt();
this.heightMaps = helper.readTag(in);
this.heightMaps = helper.readAnyTag(in);
this.chunkData = helper.readByteArray(in);

this.blockEntities = new BlockEntityInfo[helper.readVarInt(in)];
Expand All @@ -49,7 +49,7 @@ public ClientboundLevelChunkWithLightPacket(ByteBuf in, MinecraftCodecHelper hel
public void serialize(ByteBuf out, MinecraftCodecHelper helper) throws IOException {
out.writeInt(this.x);
out.writeInt(this.z);
helper.writeTag(out, this.heightMaps);
helper.writeAnyTag(out, this.heightMaps);
helper.writeVarInt(out, this.chunkData.length);
out.writeBytes(this.chunkData);

Expand Down

0 comments on commit 5cbc12f

Please sign in to comment.