mirror of
https://github.com/shadowfacts/Forgelin.git
synced 2025-01-05 00:54:18 +00:00
Add ListExtensions
This commit is contained in:
parent
e3c2d1c18d
commit
b216102bb9
@ -0,0 +1,15 @@
|
||||
package net.shadowfacts.forgelin.extensions
|
||||
|
||||
import net.minecraft.item.ItemStack
|
||||
|
||||
/**
|
||||
* @author shadowfacts
|
||||
*/
|
||||
fun List<ItemStack>.containsStack(stack: ItemStack): Boolean {
|
||||
forEach {
|
||||
if (it.item == stack.item && it.itemDamage == stack.itemDamage) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user