Skip to content

Commit

Permalink
Merge branch '1.20.2' of D:\Repos\Minecraft\SFM\repos\SuperFactoryMan…
Browse files Browse the repository at this point in the history
…ager 1.20.2 into 1.20.3
  • Loading branch information
TeamDman committed Jun 26, 2024
2 parents 021919b + 8148434 commit c3fc673
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ public static void encode(
) {
friendlyByteBuf.writeVarInt(msg.windowId());
friendlyByteBuf.writeVarInt(msg.logsBuf.readableBytes());
friendlyByteBuf.writeBytes(msg.logsBuf);
friendlyByteBuf.writeBytes(msg.logsBuf, 0, msg.logsBuf.readableBytes()); // !!!IMPORTANT!!!
// We use this write method specifically to NOT modify the reader index.
// The encode method may be called multiple times, so we want to ensure it is idempotent.
}

public static ClientboundManagerLogsPacket decode(FriendlyByteBuf friendlyByteBuf) {
Expand Down

0 comments on commit c3fc673

Please sign in to comment.