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

@@ -5,6 +5,7 @@
- Fixed error logs when toggling the Pattern Grid from and to processing mode (raoulvdberge) - Fixed error logs when toggling the Pattern Grid from and to processing mode (raoulvdberge)
- Fixed pattern slots in Crafters not being accessible (raoulvdberge) - Fixed pattern slots in Crafters not being accessible (raoulvdberge)
- Fixed rare Grid crash (raoulvdberge) - Fixed rare Grid crash (raoulvdberge)
- Fixed OpenComputers cable showing up in Grid as air (raoulvdberge)
- Storage disk and block stored and capacity counts are formatted now in the tooltip (raoulvdberge) - Storage disk and block stored and capacity counts are formatted now in the tooltip (raoulvdberge)
- Made the Disk Manipulator unsided (inserting goes to insert slots and extracting from output slots) (raoulvdberge) - Made the Disk Manipulator unsided (inserting goes to insert slots and extracting from output slots) (raoulvdberge)

View File

@@ -94,12 +94,12 @@ public final class StackUtils {
public static void writeItemStack(ByteBuf buf, ItemStack stack) { public static void writeItemStack(ByteBuf buf, ItemStack stack) {
buf.writeInt(Item.getIdFromItem(stack.getItem())); buf.writeInt(Item.getIdFromItem(stack.getItem()));
buf.writeInt(stack.getCount()); buf.writeInt(stack.getCount());
buf.writeInt(stack.getItemDamage()); buf.writeShort(stack.getItemDamage());
ByteBufUtils.writeTag(buf, stack.getItem().getNBTShareTag(stack)); ByteBufUtils.writeTag(buf, stack.getItem().getNBTShareTag(stack));
} }
public static ItemStack readItemStack(ByteBuf buf) { 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)); stack.setTagCompound(ByteBufUtils.readTag(buf));
return stack; return stack;
} }