Update MatteryContainer to fix compilation error
This commit is contained in:
parent
9f6b9ad85b
commit
5e8ab76f49
@ -426,10 +426,7 @@ open class MatteryContainer(var listener: ContainerListener, private val size: I
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private inner class Slot(override val slot: Int) : IFilteredContainerSlot {
|
inner class Slot(val slot: Int) : IFilteredContainerSlot {
|
||||||
override val container: Container
|
|
||||||
get() = this@MatteryContainer
|
|
||||||
|
|
||||||
override var item: ItemStack
|
override var item: ItemStack
|
||||||
get() = this@MatteryContainer[slot]
|
get() = this@MatteryContainer[slot]
|
||||||
set(value) { this@MatteryContainer[slot] = value }
|
set(value) { this@MatteryContainer[slot] = value }
|
||||||
@ -460,12 +457,12 @@ open class MatteryContainer(var listener: ContainerListener, private val size: I
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final override fun slotIterator(): kotlin.collections.Iterator<IFilteredContainerSlot> {
|
final override fun slotIterator(): kotlin.collections.Iterator<Slot> {
|
||||||
indicesReferenced = true
|
indicesReferenced = true
|
||||||
return nonEmptyIndices.iterator().map { Slot(it) }
|
return nonEmptyIndices.iterator().map { Slot(it) }
|
||||||
}
|
}
|
||||||
|
|
||||||
final override fun slotIterator(nonEmpty: Boolean): kotlin.collections.Iterator<IFilteredContainerSlot> {
|
final override fun slotIterator(nonEmpty: Boolean): kotlin.collections.Iterator<Slot> {
|
||||||
if (!nonEmpty) {
|
if (!nonEmpty) {
|
||||||
return (0 until size).iterator().map { Slot(it) }
|
return (0 until size).iterator().map { Slot(it) }
|
||||||
} else if (isEmpty) {
|
} else if (isEmpty) {
|
||||||
@ -476,7 +473,7 @@ open class MatteryContainer(var listener: ContainerListener, private val size: I
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final override fun containerSlot(slot: Int): IFilteredContainerSlot {
|
final override fun containerSlot(slot: Int): Slot {
|
||||||
return Slot(slot)
|
return Slot(slot)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user