diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-08-05 16:41:39 +0200 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-08-05 16:41:39 +0200 |
| commit | 35bb6e3fffb464902d8d054fef688c0840589a4c (patch) | |
| tree | 444ca2db7117e0b7164ac866824b731cc58eccf1 /src/main/kotlin/features/debug | |
| parent | 8129a733ccbb251c00c344cededdc283850736d1 (diff) | |
| download | Firmament-35bb6e3fffb464902d8d054fef688c0840589a4c.tar.gz Firmament-35bb6e3fffb464902d8d054fef688c0840589a4c.tar.bz2 Firmament-35bb6e3fffb464902d8d054fef688c0840589a4c.zip | |
fix: item components sometimes crashing legacy item exports
Diffstat (limited to 'src/main/kotlin/features/debug')
| -rw-r--r-- | src/main/kotlin/features/debug/itemeditor/LegacyItemData.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/kotlin/features/debug/itemeditor/LegacyItemData.kt b/src/main/kotlin/features/debug/itemeditor/LegacyItemData.kt index 29a85d6..4b647c7 100644 --- a/src/main/kotlin/features/debug/itemeditor/LegacyItemData.kt +++ b/src/main/kotlin/features/debug/itemeditor/LegacyItemData.kt @@ -66,7 +66,8 @@ object LegacyItemData { putByte("Count", 1) putShort("Damage", legacyItemType.metadata) })!! - val stack = loadItemFromNbt(nbt) ?: error("Could not transform $legacyItemType") + nbt.remove("components") + val stack = loadItemFromNbt(nbt) ?: error("Could not transform $legacyItemType: $nbt") stack.item to legacyItemType } }.toMap() |
