Skip to content

Commit

Permalink
Logging changes in IndexD.
Browse files Browse the repository at this point in the history
  • Loading branch information
cao-awa committed Dec 16, 2024
1 parent c7cb358 commit 09758e7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/main/java/com/github/cao/awa/conium/bedrock/IndexD.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ abstract class IndexD {

@JvmStatic
fun tryImport(packageName: String, refs: Collection<String>, action: Consumer<String>) {
packages[packageName]?.also { indexD: IndexD ->
val indexD: IndexD? = packages[packageName]
if (indexD != null) {
refs.distinct().forEach { ref: String ->
indexD.forName(ref, action)
}
} ?: {
LOGGER.warn("The package '{}' are not found in conium IndexD", packageName)
} else {
LOGGER.warn("The package '{}' are not found in conium IndexD, ignored", packageName)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ class ServerIndexD : IndexD() {
}

override fun forName(refName: String, action: Consumer<String>) {
mappings[refName]?.also { ref: String ->
val ref: String? = mappings[refName]
if (ref != null) {
action.accept(ref)
} ?: {
LOGGER.warn("The reference name '{}' are not found in conium ServerIndexD(@minecraft/server)", refName)
} else {
LOGGER.warn("The reference name '{}' are not found in conium ServerIndexD(@minecraft/server), ignored", refName)
}
}
}

0 comments on commit 09758e7

Please sign in to comment.