This commit is contained in:
DBotThePony 2025-03-06 22:30:42 +07:00
parent 06f8d8838a
commit 67fc8f99f6
Signed by: DBot
GPG Key ID: DCC23B5715498507
2 changed files with 6 additions and 6 deletions

View File

@ -216,7 +216,7 @@ interface IEnhancedContainer : IContainer, RecipeInput, Iterable<ItemStack>, Sta
return list return list
} }
fun addItem(stack: ItemStack, simulate: Boolean, slots: IntSet = slotRange, onlyIntoExisting: Boolean = false, popTime: Int? = null): ItemStack { fun addItem(stack: ItemStack, simulate: Boolean, slots: IntCollection = slotRange, onlyIntoExisting: Boolean = false, popTime: Int? = null): ItemStack {
if (stack.isEmpty || slots.isEmpty()) if (stack.isEmpty || slots.isEmpty())
return stack return stack
@ -277,7 +277,7 @@ interface IEnhancedContainer : IContainer, RecipeInput, Iterable<ItemStack>, Sta
* *
* @return Whenever [stack] was modified * @return Whenever [stack] was modified
*/ */
fun consumeItem(stack: ItemStack, simulate: Boolean, slots: IntSet = slotRange, onlyIntoExisting: Boolean = false, popTime: Int? = null): Boolean { fun consumeItem(stack: ItemStack, simulate: Boolean, slots: IntCollection = slotRange, onlyIntoExisting: Boolean = false, popTime: Int? = null): Boolean {
if (stack.isEmpty || slots.isEmpty()) if (stack.isEmpty || slots.isEmpty())
return false return false
@ -286,7 +286,7 @@ interface IEnhancedContainer : IContainer, RecipeInput, Iterable<ItemStack>, Sta
return result.count != stack.count return result.count != stack.count
} }
fun fullyAddItem(stack: ItemStack, slots: IntSet = slotRange, onlyIntoExisting: Boolean = false, popTime: Int? = null): Boolean { fun fullyAddItem(stack: ItemStack, slots: IntCollection = slotRange, onlyIntoExisting: Boolean = false, popTime: Int? = null): Boolean {
if (!addItem(stack, true, slots, onlyIntoExisting, popTime).isEmpty) if (!addItem(stack, true, slots, onlyIntoExisting, popTime).isEmpty)
return false return false

View File

@ -156,7 +156,7 @@ interface ISlottedContainer : IEnhancedContainer {
override fun addItem( override fun addItem(
stack: ItemStack, stack: ItemStack,
simulate: Boolean, simulate: Boolean,
slots: IntSet, slots: IntCollection,
onlyIntoExisting: Boolean, onlyIntoExisting: Boolean,
popTime: Int? popTime: Int?
): ItemStack { ): ItemStack {
@ -166,14 +166,14 @@ interface ISlottedContainer : IEnhancedContainer {
override fun consumeItem( override fun consumeItem(
stack: ItemStack, stack: ItemStack,
simulate: Boolean, simulate: Boolean,
slots: IntSet, slots: IntCollection,
onlyIntoExisting: Boolean, onlyIntoExisting: Boolean,
popTime: Int? popTime: Int?
): Boolean { ): Boolean {
return consumeItem(stack, simulate, slots, onlyIntoExisting, popTime, ignoreFilters = false) return consumeItem(stack, simulate, slots, onlyIntoExisting, popTime, ignoreFilters = false)
} }
override fun fullyAddItem(stack: ItemStack, slots: IntSet, onlyIntoExisting: Boolean, popTime: Int?): Boolean { override fun fullyAddItem(stack: ItemStack, slots: IntCollection, onlyIntoExisting: Boolean, popTime: Int?): Boolean {
return fullyAddItem(stack, slots, onlyIntoExisting, popTime, ignoreFilters = false) return fullyAddItem(stack, slots, onlyIntoExisting, popTime, ignoreFilters = false)
} }
} }