Add clearSlotFilters to IMatteryContainer

This commit is contained in:
DBotThePony 2025-02-25 22:13:36 +07:00
parent cdaae2f9fa
commit dfc35f393f
Signed by: DBot
GPG Key ID: DCC23B5715498507
3 changed files with 16 additions and 1 deletions

View File

@ -90,6 +90,19 @@ class CombinedContainer(containers: Stream<Pair<Container, Iterable<Int>>>) : IM
}
}
override fun clearSlotFilters() {
for (container in fullCoverage) {
if (container is IMatteryContainer)
container.clearSlotFilters()
}
for (slots in notFullCoverage.values) {
for (slot in slots) {
slot.setFilter()
}
}
}
override fun getContainerSize(): Int {
return slots.size
}

View File

@ -19,6 +19,8 @@ interface IMatteryContainer : IContainer, RecipeInput, Iterable<ItemStack> {
return false
}
fun clearSlotFilters()
override fun isEmpty(): Boolean
fun setChanged(slot: Int)

View File

@ -81,7 +81,7 @@ open class MatteryContainer(var listener: ContainerListener, private val size: I
var changeset = 0
private set
fun clearSlotFilters() {
override fun clearSlotFilters() {
Arrays.fill(filters, null)
}