diff --git a/build.gradle b/build.gradle index b1dd809..1b5c2af 100644 --- a/build.gradle +++ b/build.gradle @@ -21,7 +21,7 @@ buildscript { apply plugin: 'forge' apply plugin: 'scala' -version = "0.9.0" +version = "0.9.1" ext.bdlibver = "0.9.0.2" ext.versuffix = "mc164" diff --git a/src/net/bdew/gendustry/machines/apiary/ContainerApiary.scala b/src/net/bdew/gendustry/machines/apiary/ContainerApiary.scala index 70355d9..f66e14b 100644 --- a/src/net/bdew/gendustry/machines/apiary/ContainerApiary.scala +++ b/src/net/bdew/gendustry/machines/apiary/ContainerApiary.scala @@ -36,14 +36,14 @@ class ContainerApiary(val te: TileApiary, player: EntityPlayer) extends BaseCont bindPlayerInventory(player.inventory, 8, 84, 142) - - override def transferStackInSlot(player: EntityPlayer, slot: Int): ItemStack = { val stack = getSlot(slot).getStack if (getSlot(slot).inventory == player.inventory && te.isUpgrade(stack)) { val canAdd = Misc.min(te.getMaxAdditionalUpgrades(stack), stack.stackSize) if (canAdd > 0) { - ItemUtils.addStackToSlots(stack.splitStack(canAdd), te, te.slotsUpgrades, true) + val remains = ItemUtils.addStackToSlots(stack.splitStack(canAdd), te, te.slotsUpgrades, true) + if (remains != null) + stack.stackSize += remains.stackSize } getSlot(slot).putStack(if (stack.stackSize > 0) stack else null) return null