mirror of
https://github.com/GTNewHorizons/Forgelin.git
synced 2026-11-22 13:10:07 +00:00
Add ListExtensions
This commit is contained in:
1 parent
e3c2d1c18d
commit
b216102bb9
1 file changed
+15
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user