feat: Add macro editing UI
This commit is contained in:
@@ -75,4 +75,7 @@ object ErrorUtil {
|
||||
return nullable
|
||||
}
|
||||
|
||||
fun softUserError(string: String) {
|
||||
MC.sendChat(tr("frimanet.usererror", "Firmament encountered a user caused error: $string"))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package moe.nea.firmament.util
|
||||
|
||||
import io.github.moulberry.repo.data.Coordinate
|
||||
import io.github.notenoughupdates.moulconfig.gui.GuiComponentWrapper
|
||||
import java.util.concurrent.ConcurrentLinkedQueue
|
||||
import kotlin.jvm.optionals.getOrNull
|
||||
import net.minecraft.client.MinecraftClient
|
||||
@@ -126,6 +127,8 @@ object MC {
|
||||
}
|
||||
private set
|
||||
|
||||
val currentMoulConfigContext
|
||||
get() = (screen as? GuiComponentWrapper)?.context
|
||||
|
||||
fun openUrl(uri: String) {
|
||||
Util.getOperatingSystem().open(uri)
|
||||
|
||||
@@ -2,6 +2,7 @@ package moe.nea.firmament.util
|
||||
|
||||
object TestUtil {
|
||||
inline fun <T> unlessTesting(block: () -> T): T? = if (isInTest) null else block()
|
||||
@JvmField
|
||||
val isInTest =
|
||||
Thread.currentThread().stackTrace.any {
|
||||
it.className.startsWith("org.junit.") || it.className.startsWith("io.kotest.")
|
||||
|
||||
Reference in New Issue
Block a user