diff options
author | Linnea Gräf <nea@nea.moe> | 2024-08-10 01:59:34 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-08-12 21:02:44 +0200 |
commit | 3c7e6b6177de6ef3cff8a46bb1726466a299cdde (patch) | |
tree | 2ebc75e705b5422a68d5d7f04d88e3d8934cf02d /src/main/kotlin/moe/nea/firmament/features | |
parent | 1606188d9ad65c66e9d873497ea3271dbdadaf77 (diff) | |
download | Firmament-3c7e6b6177de6ef3cff8a46bb1726466a299cdde.tar.gz Firmament-3c7e6b6177de6ef3cff8a46bb1726466a299cdde.tar.bz2 Firmament-3c7e6b6177de6ef3cff8a46bb1726466a299cdde.zip |
Add indigo support to custom block textures
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/features')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/features/texturepack/CustomBlockTextures.kt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/features/texturepack/CustomBlockTextures.kt b/src/main/kotlin/moe/nea/firmament/features/texturepack/CustomBlockTextures.kt index 2289be2..c869ba4 100644 --- a/src/main/kotlin/moe/nea/firmament/features/texturepack/CustomBlockTextures.kt +++ b/src/main/kotlin/moe/nea/firmament/features/texturepack/CustomBlockTextures.kt @@ -157,7 +157,10 @@ object CustomBlockTextures { currentIslandReplacements = replacements if (lastReplacements != replacements) { MC.nextTick { - MC.worldRenderer.reload() + MC.worldRenderer.chunks?.chunks?.forEach { + // false schedules rebuilds outside a 27 block radius to happen async + it.scheduleRebuild(false) + } } } } @@ -259,6 +262,10 @@ object CustomBlockTextures { return BakedReplacements(map.mapValues { LocationReplacements(it.value) }) } + @JvmStatic + fun patchIndigo(orig: BakedModel, pos: BlockPos, state: BlockState): BakedModel { + return getReplacementModel(state, pos) ?: orig + } @Subscribe fun onStart(event: FinalizeResourceManagerEvent) { |