Add ListExtensions

This commit is contained in:
Shadowfacts 2016-08-08 15:40:15 -04:00
parent e3c2d1c18d
commit b216102bb9
1 changed files with 15 additions and 0 deletions

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
}