Skip to content

Commit 88dd0e2

Browse files
committed
Use inner buf param instead of outer buffer
1 parent 713514a commit 88dd0e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v776/serializer/ItemComponentSerializer_v776.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public void serialize(ByteBuf buffer, BedrockCodecHelper helper, ItemComponentPa
2121
packetHelper.writeString(buf, item.getIdentifier());
2222
buf.writeShortLE(item.getRuntimeId());
2323
buf.writeBoolean(item.isComponentBased());
24-
VarInts.writeInt(buffer, item.getVersion().ordinal());
24+
VarInts.writeInt(buf, item.getVersion().ordinal());
2525
if (item.getComponentData() != null) { // We should check for isComponentBased() instead, but for some reason there can be non-data driven items with component data
2626
packetHelper.writeTag(buf, item.getComponentData());
2727
} else {
@@ -36,7 +36,7 @@ public void deserialize(ByteBuf buffer, BedrockCodecHelper helper, ItemComponent
3636
String name = packetHelper.readString(buf);
3737
short itemId = buf.readShortLE();
3838
boolean componentBased = buf.readBoolean();
39-
int version = VarInts.readInt(buffer);
39+
int version = VarInts.readInt(buf);
4040
NbtMap data = packetHelper.readTag(buf, NbtMap.class);
4141
return new SimpleItemDefinition(name, itemId, ItemVersion.from(version), componentBased, data);
4242
});

0 commit comments

Comments
 (0)