diff options
author | Linnea Gräf <nea@nea.moe> | 2024-09-01 22:21:19 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-09-01 22:21:19 +0200 |
commit | 5ed74f2df49c93ed1617520a935078b59ad7e195 (patch) | |
tree | f0d52699fff7f820bd724902878988859bd43516 /src/main/kotlin/features/texturepack | |
parent | 816f80f862d2f5de6bc9b0ae84cd6df0da341228 (diff) | |
download | Firmament-5ed74f2df49c93ed1617520a935078b59ad7e195.tar.gz Firmament-5ed74f2df49c93ed1617520a935078b59ad7e195.tar.bz2 Firmament-5ed74f2df49c93ed1617520a935078b59ad7e195.zip |
Add per compat project event listeners
[no changelog]
Diffstat (limited to 'src/main/kotlin/features/texturepack')
-rw-r--r-- | src/main/kotlin/features/texturepack/CustomBlockTextures.kt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/kotlin/features/texturepack/CustomBlockTextures.kt b/src/main/kotlin/features/texturepack/CustomBlockTextures.kt index 0f2c2e6..a149928 100644 --- a/src/main/kotlin/features/texturepack/CustomBlockTextures.kt +++ b/src/main/kotlin/features/texturepack/CustomBlockTextures.kt @@ -168,7 +168,11 @@ object CustomBlockTextures { } private val sodiumReloadTask = runCatching { - Class.forName("moe.nea.firmament.compat.sodium.SodiumChunkReloader").getConstructor().newInstance() as Runnable + val r = Class.forName("moe.nea.firmament.compat.sodium.SodiumChunkReloader") + .getConstructor() + .newInstance() as Runnable + r.run() + r }.getOrElse { if (FabricLoader.getInstance().isModLoaded("sodium")) logger.error("Could not create sodium chunk reloader") @@ -192,7 +196,9 @@ object CustomBlockTextures { @JvmStatic fun getReplacement(block: BlockState, blockPos: BlockPos?): Replacement? { - if (isInFallback() && blockPos == null) return null + if (isInFallback() && blockPos == null) { + return null + } val replacements = currentIslandReplacements?.lookup?.get(block.block) ?: return null for (replacement in replacements) { if (replacement.checks == null || matchesPosition(replacement, blockPos)) |