Skip to content

Commit

Permalink
Merge branch '1.20.3' of D:\Repos\Minecraft\SFM\repos\SuperFactoryMan…
Browse files Browse the repository at this point in the history
…ager 1.20.3 into 1.20.4
  • Loading branch information
TeamDman committed Jun 26, 2024
2 parents 9a968e9 + c3fc673 commit 74eb6b2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,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 74eb6b2

Please sign in to comment.