Update getMaxStackSize in MatteryMenuSlot to use IEnhancedContainer
This commit is contained in:
parent
a6891362d9
commit
bf7c9277ee
@ -17,6 +17,7 @@ import ru.dbotthepony.mc.otm.capability.MatteryCapability
|
||||
import ru.dbotthepony.mc.otm.capability.UpgradeType
|
||||
import ru.dbotthepony.mc.otm.capability.energy
|
||||
import ru.dbotthepony.mc.otm.client.minecraft
|
||||
import ru.dbotthepony.mc.otm.container.IEnhancedContainer
|
||||
import ru.dbotthepony.mc.otm.container.IFilteredContainerSlot
|
||||
import ru.dbotthepony.mc.otm.container.IMatteryContainer
|
||||
import ru.dbotthepony.mc.otm.container.ItemFilter
|
||||
@ -84,7 +85,7 @@ open class MatteryMenuSlot(container: Container, index: Int, x: Int = 0, y: Int
|
||||
override fun getMaxStackSize(): Int {
|
||||
val container = container
|
||||
|
||||
if (container is IMatteryContainer) {
|
||||
if (container is IEnhancedContainer) {
|
||||
return container.getMaxStackSize(slotIndex, ItemStack.EMPTY)
|
||||
} else {
|
||||
return super.getMaxStackSize()
|
||||
@ -94,7 +95,7 @@ open class MatteryMenuSlot(container: Container, index: Int, x: Int = 0, y: Int
|
||||
override fun getMaxStackSize(itemStack: ItemStack): Int {
|
||||
val container = container
|
||||
|
||||
if (container is IMatteryContainer) {
|
||||
if (container is IEnhancedContainer) {
|
||||
return container.getMaxStackSize(slotIndex, itemStack)
|
||||
} else {
|
||||
return super.getMaxStackSize(itemStack)
|
||||
|
Loading…
Reference in New Issue
Block a user