item stack usage changes fix

NonNullList::get(index) instead of array syntax (index)
and shrink(count) instead of directly adjusting the stackSize field

fixes build errors
This commit is contained in:
payonel 2018-03-20 14:17:33 -07:00
parent aaa6b0d012
commit d3abf39e94
2 changed files with 2 additions and 2 deletions

View File

@ -87,7 +87,7 @@ abstract class GuiHandler extends IGuiHandler {
case Some(tablet: item.Tablet) if id == GuiType.Tablet.id => mainItem
case Some(tablet: item.Tablet) if id == GuiType.TabletInner.id => mainItem
case Some(terminal: item.Terminal) if id == GuiType.Terminal.id => mainItem
case _ => player.inventory.offHandInventory(0)
case _ => player.inventory.offHandInventory.get(0)
}
}
}

View File

@ -56,7 +56,7 @@ class DiskDrive extends SimpleBlock with traits.GUI {
if (hand == EnumHand.MAIN_HAND)
player.inventory.decrStackSize(player.inventory.currentItem, 1)
else
player.inventory.offHandInventory(0).stackSize -= 1
player.inventory.offHandInventory.get(0).shrink(1)
}
isDiskInDrive || isHoldingDisk
case _ => false