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
}
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())
return stack
@ -277,7 +277,7 @@ interface IEnhancedContainer : IContainer, RecipeInput, Iterable<ItemStack>, Sta
*
* @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())
return false
@ -286,7 +286,7 @@ interface IEnhancedContainer : IContainer, RecipeInput, Iterable<ItemStack>, Sta
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)
return false

View File

@ -156,7 +156,7 @@ interface ISlottedContainer : IEnhancedContainer {
override fun addItem(
stack: ItemStack,
simulate: Boolean,
slots: IntSet,
slots: IntCollection,
onlyIntoExisting: Boolean,
popTime: Int?
): ItemStack {
@ -166,14 +166,14 @@ interface ISlottedContainer : IEnhancedContainer {
override fun consumeItem(
stack: ItemStack,
simulate: Boolean,
slots: IntSet,
slots: IntCollection,
onlyIntoExisting: Boolean,
popTime: Int?
): Boolean {
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)
}
}