feat: Add license viewer /firm licenses

This commit is contained in:
Linnea Gräf
2025-05-25 22:18:33 +02:00
parent 03064dd01f
commit 8f82b1e6bf
6 changed files with 264 additions and 46 deletions

View File

@@ -21,10 +21,10 @@ import net.minecraft.registry.Registry
import net.minecraft.registry.RegistryKey
import net.minecraft.registry.RegistryKeys
import net.minecraft.registry.RegistryWrapper
import net.minecraft.registry.entry.RegistryEntry
import net.minecraft.resource.ReloadableResourceManagerImpl
import net.minecraft.text.Text
import net.minecraft.util.Identifier
import net.minecraft.util.Util
import net.minecraft.util.math.BlockPos
import net.minecraft.world.World
import moe.nea.firmament.events.TickEvent
@@ -127,6 +127,10 @@ object MC {
private set
fun openUrl(uri: String) {
Util.getOperatingSystem().open(uri)
}
fun <T> unsafeGetRegistryEntry(registry: RegistryKey<out Registry<T>>, identifier: Identifier) =
unsafeGetRegistryEntry(RegistryKey.of(registry, identifier))