diff options
Diffstat (limited to 'src/texturePacks')
| -rw-r--r-- | src/texturePacks/java/moe/nea/firmament/features/texturepack/CustomGlobalTextures.kt | 19 | ||||
| -rw-r--r-- | src/texturePacks/java/moe/nea/firmament/features/texturepack/CustomSkyBlockTextures.kt | 10 |
2 files changed, 12 insertions, 17 deletions
diff --git a/src/texturePacks/java/moe/nea/firmament/features/texturepack/CustomGlobalTextures.kt b/src/texturePacks/java/moe/nea/firmament/features/texturepack/CustomGlobalTextures.kt index 403e3bd..f3903f0 100644 --- a/src/texturePacks/java/moe/nea/firmament/features/texturepack/CustomGlobalTextures.kt +++ b/src/texturePacks/java/moe/nea/firmament/features/texturepack/CustomGlobalTextures.kt @@ -19,19 +19,13 @@ import moe.nea.firmament.events.CustomItemModelEvent import moe.nea.firmament.events.EarlyResourceReloadEvent import moe.nea.firmament.events.FinalizeResourceManagerEvent import moe.nea.firmament.events.ScreenChangeEvent -import moe.nea.firmament.events.subscription.SubscriptionOwner -import moe.nea.firmament.features.FirmamentFeature import moe.nea.firmament.util.ErrorUtil import moe.nea.firmament.util.IdentifierSerializer import moe.nea.firmament.util.MC import moe.nea.firmament.util.json.SingletonSerializableList import moe.nea.firmament.util.runNull -object CustomGlobalTextures : SinglePreparationResourceReloader<CustomGlobalTextures.CustomGuiTextureOverride>(), - SubscriptionOwner { - override val delegateFeature: FirmamentFeature - get() = CustomSkyBlockTextures - +object CustomGlobalTextures : SinglePreparationResourceReloader<CustomGlobalTextures.CustomGuiTextureOverride>() { class CustomGuiTextureOverride( val classes: List<ItemOverrideCollection> ) @@ -64,12 +58,14 @@ object CustomGlobalTextures : SinglePreparationResourceReloader<CustomGlobalText .supplyAsync( { prepare(event.resourceManager) - }, event.preparationExecutor) + }, event.preparationExecutor + ) } @Volatile var preparationFuture: CompletableFuture<CustomGuiTextureOverride> = CompletableFuture.completedFuture( - CustomGuiTextureOverride(listOf())) + CustomGuiTextureOverride(listOf()) + ) override fun prepare(manager: ResourceManager?, profiler: Profiler?): CustomGuiTextureOverride { return preparationFuture.join() @@ -104,7 +100,10 @@ object CustomGlobalTextures : SinglePreparationResourceReloader<CustomGlobalText val screenFilter = Firmament.tryDecodeJsonFromStream<ScreenFilter>(guiClassResource.inputStream) .getOrElse { ex -> - ErrorUtil.softError("Failed to load screen filter at $key used by ${it.value.map { it.first }}", ex) + ErrorUtil.softError( + "Failed to load screen filter at $key used by ${it.value.map { it.first }}", + ex + ) return@mapNotNull null } ItemOverrideCollection(screenFilter, it.value.map { it.second }) diff --git a/src/texturePacks/java/moe/nea/firmament/features/texturepack/CustomSkyBlockTextures.kt b/src/texturePacks/java/moe/nea/firmament/features/texturepack/CustomSkyBlockTextures.kt index 1f911dc..bb205e7 100644 --- a/src/texturePacks/java/moe/nea/firmament/features/texturepack/CustomSkyBlockTextures.kt +++ b/src/texturePacks/java/moe/nea/firmament/features/texturepack/CustomSkyBlockTextures.kt @@ -14,16 +14,15 @@ import moe.nea.firmament.annotations.Subscribe import moe.nea.firmament.events.CustomItemModelEvent import moe.nea.firmament.events.FinalizeResourceManagerEvent import moe.nea.firmament.events.TickEvent -import moe.nea.firmament.features.FirmamentFeature import moe.nea.firmament.features.debug.PowerUserTools -import moe.nea.firmament.util.data.ManagedConfig import moe.nea.firmament.util.collections.WeakCache import moe.nea.firmament.util.data.Config +import moe.nea.firmament.util.data.ManagedConfig import moe.nea.firmament.util.mc.decodeProfileTextureProperty import moe.nea.firmament.util.skyBlockId -object CustomSkyBlockTextures : FirmamentFeature { - override val identifier: String +object CustomSkyBlockTextures { + val identifier: String get() = "custom-skyblock-textures" @Config @@ -41,9 +40,6 @@ object CustomSkyBlockTextures : FirmamentFeature { val allowLayoutChanges by toggle("screen-layouts") { true } } - override val config: ManagedConfig - get() = TConfig - val allItemCaches by lazy { listOf( skullTextureCache.cache, |
