Armor Comparator
class ArmorComparator(expectedDamage: Float, armorKitParametersForSlot: ArmorKitParameters, durabilityThreshold: Int = Int.MIN_VALUE, mode: ArmorComparatorMode = ArmorComparatorMode.SMART, considerProjectileProtection: Boolean = true) : Comparator<ArmorPiece>
Compares armor pieces by their damage reduction.
Constructors
Link copied to clipboard
constructor(expectedDamage: Float, armorKitParametersForSlot: ArmorKitParameters, durabilityThreshold: Int = Int.MIN_VALUE, mode: ArmorComparatorMode = ArmorComparatorMode.SMART, considerProjectileProtection: Boolean = true)
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Calculates the base damage factor (totalDamage = damage x damageFactor).
Link copied to clipboard
Damage reduction this piece contributes under the legacy (1.8) armor model: its own armor points on top of the rest of the kit, plus its own protection enchantments.
Link copied to clipboard
Link copied to clipboard
open fun <U : Comparable<in U?>?> thenComparing(keyExtractor: Function<in ArmorPiece?, out U?>?): Comparator<ArmorPiece?>?
open fun <U : Any?> thenComparing(keyExtractor: Function<in ArmorPiece?, out U?>?, keyComparator: Comparator<in U?>?): Comparator<ArmorPiece?>?
Link copied to clipboard
open fun thenComparingDouble(keyExtractor: ToDoubleFunction<in ArmorPiece?>?): Comparator<ArmorPiece?>?
Link copied to clipboard
Link copied to clipboard