Skip to content

Commit

Permalink
tmp (modmenu still doesn't work)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattco98 committed Dec 14, 2023
1 parent ca40e45 commit 4684537
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 29 deletions.
20 changes: 7 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,16 @@ dependencies {
configurations.modApi { exclude("gg.essential", "universalcraft-1.18.1-fabric") }

include(modImplementation("gg.essential:vigilance-1.18.1-fabric:295")!!)
if (mcVersion == "1.20.4-fabric") {
include(modImplementation("gg.essential:universalcraft-1.20.3-fabric:319+feature-1.20.3-fabric")!!)
} else {
include(modImplementation("gg.essential:universalcraft-$platform:316")!!)
}
val ucArtifact = if (mcVersion == "1.19.4-fabric") mcVersion else "1.20.3-fabric"
include(modImplementation("gg.essential:universalcraft-$ucArtifact:320")!!)
include(modImplementation("gg.essential:elementa-1.18.1-fabric:610")!!)

let {
val modMenuVersion = when (mcVersion) {
// TODO: ModMenu for 1.20.4
"1.20.4-fabric" -> return@let
"1.19.4-fabric" -> "6.3.1"
else -> throw Exception("Minecraft version $mcVersion is not supported")
}
modApi("com.terraformersmc:modmenu:$modMenuVersion")
val modMenuVersion = when (mcVersion) {
"1.20.4-fabric" -> "9.0.0-pre.1"
"1.19.4-fabric" -> "6.3.1"
else -> throw Exception("Minecraft version $mcVersion is not supported")
}
modApi("com.terraformersmc:modmenu:$modMenuVersion")


modRuntimeOnly("me.djtheredstoner:DevAuth-fabric:1.1.2")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package com.chattriggers.ctjs.internal.compat

//#if MC<12004
//$$ import com.chattriggers.ctjs.api.Config
//$$ import com.terraformersmc.modmenu.api.ConfigScreenFactory
//$$ import com.terraformersmc.modmenu.api.ModMenuApi
//$$
//$$ internal class ModMenuEntry : ModMenuApi {
//$$ override fun getModConfigScreenFactory(): ConfigScreenFactory<*> {
//$$ return ConfigScreenFactory {
//$$ Config.gui()
//$$ }
//$$ }
//$$ }
//#endif
import com.chattriggers.ctjs.api.Config
import com.terraformersmc.modmenu.api.ConfigScreenFactory
import com.terraformersmc.modmenu.api.ModMenuApi

internal class ModMenuEntry : ModMenuApi {
override fun getModConfigScreenFactory(): ConfigScreenFactory<*> {
return ConfigScreenFactory {
Config.gui()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ object ClientListener : Initializer {
}

//#if MC>=12004
if (World.toMC()?.tickManager?.shouldTick() == true) {
if (World.isLoaded() && World.toMC()?.tickManager?.shouldTick() == true) {
//#else
//$$ if (World.isLoaded()) {
//#endif
TriggerType.TICK.triggerAll(ticksPassed)
ticksPassed++

Scoreboard.resetCache()
//#if MC>=12004
}
//#endif
}

ClientSendMessageEvents.ALLOW_CHAT.register { message ->
Expand Down

0 comments on commit 4684537

Please sign in to comment.