From ee21f2da76ea2218ef6a0c6fefa97befa654d115 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Wed, 6 Nov 2024 16:14:10 +0100 Subject: Fix model unwrapping --- src/main/kotlin/events/CustomItemModelEvent.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/kotlin/events') diff --git a/src/main/kotlin/events/CustomItemModelEvent.kt b/src/main/kotlin/events/CustomItemModelEvent.kt index d5c08f4..4328d77 100644 --- a/src/main/kotlin/events/CustomItemModelEvent.kt +++ b/src/main/kotlin/events/CustomItemModelEvent.kt @@ -17,7 +17,7 @@ data class CustomItemModelEvent( val cache = WeakCache.memoize>("CustomItemModels") { stack, models -> val modelId = getModelIdentifier(stack) ?: return@memoize Optional.empty() - ErrorUtil.softCheck("Model Id needs to have an inventory variant") { modelId.variant() == "inventory" } + ErrorUtil.softCheck("Model Id needs to have an inventory variant", modelId.variant() == "inventory") val bakedModel = models.getModel(modelId.id) if (bakedModel == null || bakedModel === models.missingModelSupplier.get()) return@memoize Optional.empty() Optional.of(bakedModel) -- cgit