diff options
author | Linnea Gräf <nea@nea.moe> | 2024-12-07 13:26:03 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-12-07 13:26:03 +0100 |
commit | bf7795df22ca7892fae1238403feebb57c005562 (patch) | |
tree | 3a49db5bade38498f976321b6e9008203f2d4d3b /src/main/kotlin/events/BakeExtraModelsEvent.kt | |
parent | cdb5e60f52eea9030af9ca2d4a49913664023965 (diff) | |
download | Firmament-bf7795df22ca7892fae1238403feebb57c005562.tar.gz Firmament-bf7795df22ca7892fae1238403feebb57c005562.tar.bz2 Firmament-bf7795df22ca7892fae1238403feebb57c005562.zip |
WIP: Port to compilation on 1.21.4
Diffstat (limited to 'src/main/kotlin/events/BakeExtraModelsEvent.kt')
-rw-r--r-- | src/main/kotlin/events/BakeExtraModelsEvent.kt | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/main/kotlin/events/BakeExtraModelsEvent.kt b/src/main/kotlin/events/BakeExtraModelsEvent.kt index adaa495..35bfecb 100644 --- a/src/main/kotlin/events/BakeExtraModelsEvent.kt +++ b/src/main/kotlin/events/BakeExtraModelsEvent.kt @@ -1,11 +1,13 @@ package moe.nea.firmament.events import java.util.function.BiConsumer +import net.minecraft.client.item.ItemAssetsLoader import net.minecraft.client.render.model.ReferencedModelsCollector import net.minecraft.client.util.ModelIdentifier import net.minecraft.util.Identifier -// TODO: Rename this event, since it is not really directly baking models anymore +// TODO: This event may be removed now since ItemAssetsLoader seems to load all item models now (probably to cope with servers setting the item_model component). Check whether this also applies to blocks now. +//@Deprecated(level = DeprecationLevel.ERROR, message = "This is no longer needed, since ItemAssetsLoader loads all item models.") class BakeExtraModelsEvent( private val addAnyModel: BiConsumer<ModelIdentifier, Identifier>, ) : FirmamentEvent() { @@ -15,10 +17,13 @@ class BakeExtraModelsEvent( } fun addItemModel(modelIdentifier: ModelIdentifier) { - addNonItemModel( - modelIdentifier, - modelIdentifier.id.withPrefixedPath(ReferencedModelsCollector.ITEM_DIRECTORY)) + // TODO: If this is still needed: ItemAssetsLoader.FINDER + // addNonItemModel( +// modelIdentifier, +// modelIdentifier.id.withPrefixedPath()) } +// @Deprecated(level = DeprecationLevel.ERROR, message = "This is no longer needed, since ItemAssetsLoader loads all item models.") + @Suppress("DEPRECATION") companion object : FirmamentEventBus<BakeExtraModelsEvent>() } |