1
0
mirror of https://github.com/shadowfacts/Forgelin.git synced 2025-01-05 00:54:18 +00:00

Add ListExtensions

This commit is contained in:
Shadowfacts 2016-08-08 15:40:15 -04:00
parent e3c2d1c18d
commit b216102bb9

View File

@ -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
}