aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/features/debug/itemeditor
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-06-22 16:09:43 +0200
committerLinnea Gräf <nea@nea.moe>2025-06-22 16:09:43 +0200
commitcbc8eff63ac1fd6caebbd93348877124896f2d80 (patch)
tree258e36dfdedc16fe8b36fa6e04fc286360d6009e /src/main/kotlin/features/debug/itemeditor
parent7c45e48050e8ee792f391fc660232950a36c494b (diff)
downloadFirmament-cbc8eff63ac1fd6caebbd93348877124896f2d80.tar.gz
Firmament-cbc8eff63ac1fd6caebbd93348877124896f2d80.tar.bz2
Firmament-cbc8eff63ac1fd6caebbd93348877124896f2d80.zip
feat: Allow breaking itemstacks even further for faster repo reloads
Diffstat (limited to 'src/main/kotlin/features/debug/itemeditor')
-rw-r--r--src/main/kotlin/features/debug/itemeditor/LegacyItemData.kt2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/kotlin/features/debug/itemeditor/LegacyItemData.kt b/src/main/kotlin/features/debug/itemeditor/LegacyItemData.kt
index 2332e2d..c0f48ca 100644
--- a/src/main/kotlin/features/debug/itemeditor/LegacyItemData.kt
+++ b/src/main/kotlin/features/debug/itemeditor/LegacyItemData.kt
@@ -6,6 +6,7 @@ import net.minecraft.item.ItemStack
import net.minecraft.nbt.NbtCompound
import net.minecraft.util.Identifier
import moe.nea.firmament.Firmament
+import moe.nea.firmament.repo.ExpensiveItemCacheApi
import moe.nea.firmament.repo.ItemCache
import moe.nea.firmament.util.MC
@@ -57,6 +58,7 @@ object LegacyItemData {
val enchantmentLut = enchantmentData.associateBy { Identifier.ofVanilla(it.name) }
val itemDat = getLegacyData<List<ItemData>>("items")
+ @OptIn(ExpensiveItemCacheApi::class) // This is fine, we get loaded in a thread.
val itemLut = itemDat.flatMap { item ->
item.allVariants().map { legacyItemType ->
val nbt = ItemCache.convert189ToModern(NbtCompound().apply {