Don't allow to prime primed hammer
This commit is contained in:
parent
94acd58516
commit
7eec1c7032
@ -38,7 +38,7 @@ class ExplosiveHammerPrimingRecipe(private val _id: ResourceLocation, val payloa
|
||||
override fun matches(pContainer: CraftingContainer, pLevel: Level): Boolean {
|
||||
val result = pContainer.stream().filter { it.isNotEmpty }.toList()
|
||||
if (result.size != 3) return false
|
||||
return result.any { it.item is ExplosiveHammerItem } &&
|
||||
return result.any { it.item is ExplosiveHammerItem && !(it.item as ExplosiveHammerItem).isPrimed(it) } &&
|
||||
result.any { it.`is`(Tags.Items.GUNPOWDER) } &&
|
||||
result.any { payload.test(it) }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user