Skip to content

Commit

Permalink
feat: Added tool correct check that is true when tier and type are bo…
Browse files Browse the repository at this point in the history
…th correct
  • Loading branch information
ChechuDEV committed Apr 22, 2023
1 parent 3475d7a commit ebac796
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/kotlin/de/danielmaile/mpp/item/items/Tools.kt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ enum class Tools(
}

fun isToolCorrect(block: Block): Boolean {
return isToolTierCorrect(block) && isToolTypeCorrect(block)
}
fun isToolTierCorrect(block: Block): Boolean {
val nmsBlock = block.nms

val blockType = BlockType.fromBlock(block)
Expand Down Expand Up @@ -117,5 +120,9 @@ enum class Tools(
}

val trueDamage: Int
get() = ceil(Tiers.NETHERITE.uses / toolTier.itemDurability * 1.0).toInt()
get() {
println(Tiers.NETHERITE.uses)
println(toolTier.itemDurability)
return ceil(Tiers.NETHERITE.uses / toolTier.itemDurability * 1.0).toInt()
}
}

0 comments on commit ebac796

Please sign in to comment.