Skip to content
This repository was archived by the owner on Jul 3, 2024. It is now read-only.

Commit d6e2b94

Browse files
committed
Fix ItemStack packet id limited by short
1 parent 52d522f commit d6e2b94

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/java/codechicken/lib/packet/PacketCustom.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,9 @@ public PacketCustom writeItemStack(ItemStack stack) {
351351

352352
public PacketCustom writeItemStack(ItemStack stack, boolean large) {
353353
if (stack == null) {
354-
writeShort(-1);
354+
writeInt(-1);
355355
} else {
356-
writeShort(Item.getIdFromItem(stack.getItem()));
356+
writeInt(Item.getIdFromItem(stack.getItem()));
357357
if (large) writeInt(stack.stackSize);
358358
else writeByte(stack.stackSize);
359359
writeShort(stack.getItemDamage());
@@ -448,7 +448,7 @@ public ItemStack readItemStack() {
448448

449449
public ItemStack readItemStack(boolean large) {
450450
ItemStack item = null;
451-
short itemID = readShort();
451+
int itemID = readInt();
452452

453453
if (itemID >= 0) {
454454
int stackSize = large ? readInt() : readByte();

0 commit comments

Comments
 (0)