mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-24 00:26:16 +02:00
add verbose log
This commit is contained in:
parent
27b949d1e5
commit
4b5ecf301a
7 changed files with 47 additions and 4 deletions
|
|
@ -132,13 +132,19 @@ class EnchantConflictManager {
|
|||
}
|
||||
|
||||
fun isConflicting(base: Set<Enchantment>,mat: Material, newEnchant: Enchantment): ConflictType {
|
||||
CustomAnvil.verboseLog("Testing conflict for ${newEnchant.key} on ${mat.key}")
|
||||
val conflictList = conflictMap[newEnchant] ?: return ConflictType.NO_CONFLICT
|
||||
CustomAnvil.verboseLog("Did not get skipped")
|
||||
|
||||
var result = ConflictType.NO_CONFLICT
|
||||
for (conflict in conflictList) {
|
||||
if(!conflict.allowed(base,mat)) {
|
||||
CustomAnvil.verboseLog("Is against ${conflict.name}")
|
||||
val conflicting = conflict.allowed(base,mat)
|
||||
CustomAnvil.verboseLog("Was against ${conflict.name} and conflicting: $conflicting ")
|
||||
if(!conflicting) {
|
||||
if(conflict.getEnchants().size <= 1){
|
||||
result = ConflictType.SMALL_CONFLICT
|
||||
CustomAnvil.verboseLog("Small conflict, continuing")
|
||||
}else{
|
||||
return ConflictType.BIG_CONFLICT
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue