Fixed OpenComputers cable showing up in Grid as air, fixes #1590

This commit is contained in:
raoulvdberge
2017-12-31 12:30:43 +01:00
parent 86da76df14
commit 2c9485105f
2 changed files with 3 additions and 2 deletions

View File

@@ -94,12 +94,12 @@ public final class StackUtils {
public static void writeItemStack(ByteBuf buf, ItemStack stack) {
buf.writeInt(Item.getIdFromItem(stack.getItem()));
buf.writeInt(stack.getCount());
buf.writeInt(stack.getItemDamage());
buf.writeShort(stack.getItemDamage());
ByteBufUtils.writeTag(buf, stack.getItem().getNBTShareTag(stack));
}
public static ItemStack readItemStack(ByteBuf buf) {
ItemStack stack = new ItemStack(Item.getItemById(buf.readInt()), buf.readInt(), buf.readInt());
ItemStack stack = new ItemStack(Item.getItemById(buf.readInt()), buf.readInt(), buf.readShort());
stack.setTagCompound(ByteBufUtils.readTag(buf));
return stack;
}