mirror of
https://github.com/GTNewHorizons/CodeChickenCore.git
synced 2026-10-27 14:53:33 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63f36ca383 |
@@ -351,9 +351,9 @@ public final class PacketCustom implements MCDataInput, MCDataOutput {
|
||||
|
||||
public PacketCustom writeItemStack(ItemStack stack, boolean large) {
|
||||
if (stack == null) {
|
||||
writeShort(-1);
|
||||
writeInt(-1);
|
||||
} else {
|
||||
writeShort(Item.getIdFromItem(stack.getItem()));
|
||||
writeInt(Item.getIdFromItem(stack.getItem()));
|
||||
if (large) writeInt(stack.stackSize);
|
||||
else writeByte(stack.stackSize);
|
||||
writeShort(stack.getItemDamage());
|
||||
@@ -448,7 +448,7 @@ public final class PacketCustom implements MCDataInput, MCDataOutput {
|
||||
|
||||
public ItemStack readItemStack(boolean large) {
|
||||
ItemStack item = null;
|
||||
short itemID = readShort();
|
||||
int itemID = readInt();
|
||||
|
||||
if (itemID >= 0) {
|
||||
int stackSize = large ? readInt() : readByte();
|
||||
|
||||
Reference in new issue
Block a user