aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/events/CustomItemModelEvent.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-11-06 16:14:10 +0100
committerLinnea Gräf <nea@nea.moe>2024-11-06 16:14:10 +0100
commitee21f2da76ea2218ef6a0c6fefa97befa654d115 (patch)
treeaeefb78518a83d37a025673f6cadaa7d89d87449 /src/main/kotlin/events/CustomItemModelEvent.kt
parented3e9f0d70a758ac1c23c6c8d67eeb7105d13817 (diff)
downloadFirmament-ee21f2da76ea2218ef6a0c6fefa97befa654d115.tar.gz
Firmament-ee21f2da76ea2218ef6a0c6fefa97befa654d115.tar.bz2
Firmament-ee21f2da76ea2218ef6a0c6fefa97befa654d115.zip
Fix model unwrapping
Diffstat (limited to 'src/main/kotlin/events/CustomItemModelEvent.kt')
-rw-r--r--src/main/kotlin/events/CustomItemModelEvent.kt2
1 files changed, 1 insertions, 1 deletions
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<ItemStack, ItemModels, Optional<BakedModel>>("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)