feat: Add screen layout replacement feature for texture packs

This commit is contained in:
Linnea Gräf
2025-06-20 15:49:15 +02:00
parent 54a76553a7
commit 286691c54c
9 changed files with 338 additions and 1 deletions

View File

@@ -37,6 +37,13 @@ object ErrorUtil {
else Firmament.logger.error(message)
}
fun <T> Result<T>.intoCatch(message: String): Catch<T> {
return this.map { Catch.succeed(it) }.getOrElse {
softError(message, it)
Catch.fail(it)
}
}
class Catch<T> private constructor(val value: T?, val exc: Throwable?) {
fun orNull(): T? = value