aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/repo/MiningRepoData.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-07-17 11:52:28 +0200
committerLinnea Gräf <nea@nea.moe>2025-07-17 11:52:28 +0200
commit25f0e7fd62db22036969120843165f4759530b8f (patch)
tree262ed44e0e68464ba99f7650fed8df102c982fe5 /src/main/kotlin/repo/MiningRepoData.kt
parent13d64762bbf110fbc52719fb9d93490648199dd2 (diff)
downloadFirmament-25f0e7fd62db22036969120843165f4759530b8f.tar.gz
Firmament-25f0e7fd62db22036969120843165f4759530b8f.tar.bz2
Firmament-25f0e7fd62db22036969120843165f4759530b8f.zip
feat: Launch on 1.21.7
Diffstat (limited to 'src/main/kotlin/repo/MiningRepoData.kt')
-rw-r--r--src/main/kotlin/repo/MiningRepoData.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/kotlin/repo/MiningRepoData.kt b/src/main/kotlin/repo/MiningRepoData.kt
index e96a241..055253f 100644
--- a/src/main/kotlin/repo/MiningRepoData.kt
+++ b/src/main/kotlin/repo/MiningRepoData.kt
@@ -23,6 +23,7 @@ import moe.nea.firmament.util.SkyBlockIsland
import moe.nea.firmament.util.SkyblockId
import moe.nea.firmament.util.mc.FirmamentDataComponentTypes
import moe.nea.firmament.util.mc.displayNameAccordingToNbt
+import moe.nea.firmament.util.mc.loadItemFromNbt
import moe.nea.firmament.util.skyblockId
class MiningRepoData : IReloadable {
@@ -118,7 +119,7 @@ class MiningRepoData : IReloadable {
putString("id", itemId)
putShort("Damage", damage)
}) ?: return null
- val itemStack = ItemStack.fromNbt(MC.defaultRegistries, newCompound).getOrNull() ?: return null
+ val itemStack = loadItemFromNbt(newCompound) ?: return null
val blockItem = itemStack.item as? BlockItem ?: return null
return blockItem.block
}