mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-16 02:39:48 -04:00
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:
parent
aaa6b0d012
commit
d3abf39e94
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user