Automation-forbidden slots are now prohibited to be extracted from
This commit is contained in:
parent
bbf4e752e7
commit
d88da8f244
@ -1,9 +1,14 @@
|
|||||||
package ru.dbotthepony.mc.otm.container
|
package ru.dbotthepony.mc.otm.container
|
||||||
|
|
||||||
import net.minecraft.world.item.ItemStack
|
import net.minecraft.world.item.ItemStack
|
||||||
|
import net.minecraft.world.item.Items
|
||||||
|
|
||||||
interface IFilteredAutomatedContainerSlot : IFilteredContainerSlot, IAutomatedContainerSlot {
|
interface IFilteredAutomatedContainerSlot : IFilteredContainerSlot, IAutomatedContainerSlot {
|
||||||
override fun canAutomationPlaceItem(itemStack: ItemStack): Boolean {
|
override fun canAutomationPlaceItem(itemStack: ItemStack): Boolean {
|
||||||
return super.canAutomationPlaceItem(itemStack) && testSlotFilter(itemStack)
|
return super.canAutomationPlaceItem(itemStack) && testSlotFilter(itemStack)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun canAutomationTakeItem(desired: Int): Boolean {
|
||||||
|
return super.canAutomationTakeItem(desired) && (filter == null || filter !== Items.AIR)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user