Skip to content

Commit

Permalink
Add a contributor.
Browse files Browse the repository at this point in the history
  • Loading branch information
cao-awa committed Nov 14, 2024
1 parent 56da917 commit b7d0a2a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
30 changes: 15 additions & 15 deletions src/main/java/com/github/cao/awa/conium/Conium.kt
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,21 @@ class Conium : ModInitializer {

@JvmStatic
fun debug(debugger: Runnable) {
if (enableDebugs) {
if (this.enableDebugs) {
debugger.run()
}
}

@JvmStatic
fun debug(message: String?, p1: Supplier<Any?>, debugger: StrObjConsumer1) {
if (enableDebugs) {
if (this.enableDebugs) {
debugger.accept(message, p1.get())
}
}

@JvmStatic
fun debug(message: String?, p1: Supplier<Any?>, p2: Supplier<Any?>, debugger: StrObjConsumer2) {
if (enableDebugs) {
if (this.enableDebugs) {
debugger.accept(message, p1.get(), p2.get())
}
}
Expand All @@ -84,7 +84,7 @@ class Conium : ModInitializer {
p3: Supplier<Any?>,
debugger: StrObjConsumer3
) {
if (enableDebugs) {
if (this.enableDebugs) {
debugger.accept(message, p1.get(), p2.get(), p3.get())
}
}
Expand All @@ -98,7 +98,7 @@ class Conium : ModInitializer {
p4: Supplier<Any?>,
debugger: StrObjConsumer4
) {
if (enableDebugs) {
if (this.enableDebugs) {
debugger.accept(message, p1.get(), p2.get(), p3.get(), p4.get())
}
}
Expand All @@ -113,7 +113,7 @@ class Conium : ModInitializer {
p5: Supplier<Any?>,
debugger: StrObjConsumer5
) {
if (enableDebugs) {
if (this.enableDebugs) {
debugger.accept(message, p1.get(), p2.get(), p3.get(), p4.get(), p5.get())
}
}
Expand All @@ -129,10 +129,18 @@ class Conium : ModInitializer {
p6: Supplier<Any?>,
debugger: StrObjConsumer6
) {
if (enableDebugs) {
if (this.enableDebugs) {
debugger.accept(message, p1.get(), p2.get(), p3.get(), p4.get(), p5.get(), p6.get())
}
}

private fun collectTranslators(translators: Map<TranslateTarget, Map<TranslateElementData<*>, LanguageTranslator<*>>>): Map<TranslateTarget, Collection<Class<*>>> {
val result: MutableMap<TranslateTarget, Collection<Class<*>>> = CollectionFactor.hashMap()
translators.forEach { (target, targetTranslators) ->
result[target] = targetTranslators.keys.map { it.clazz() }
}
return result
}
}

override fun onInitialize() {
Expand All @@ -156,12 +164,4 @@ class Conium : ModInitializer {
collectTranslators(typescriptTranslators)
)
}

private fun collectTranslators(translators: Map<TranslateTarget, Map<TranslateElementData<*>, LanguageTranslator<*>>>): Map<TranslateTarget, Collection<Class<*>>> {
val result: MutableMap<TranslateTarget, Collection<Class<*>>> = CollectionFactor.hashMap()
translators.forEach { (target, targetTranslators) ->
result[target] = targetTranslators.keys.map { it.clazz() }
}
return result
}
}
6 changes: 4 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
"name": "Conium",
"description": "Conium is a datapack and script framework for modern Minecraft, it provides very diverse features without Java coding, Conium lets you complete your mods only using datapacks.",
"authors": [
"cao_awa"
"cao_awa",
"草二号机"
],
"contributors": [
"cao_awa",
"草二号机"
"草二号机",
"Ryan 100c"
],
"contact": {
"homepage": "https://github.com/cao-awa/Conium",
Expand Down

0 comments on commit b7d0a2a

Please sign in to comment.