diff options
author | Linnea Gräf <nea@nea.moe> | 2024-04-26 18:04:45 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-04-26 18:15:54 +0200 |
commit | 7e0151569477df63601be50c82177ecfd21e5deb (patch) | |
tree | f30e5440a1855de92d2b424ef79339d3d6cf5f34 /src/main/kotlin/moe/nea/firmament/util/SkyblockId.kt | |
parent | 041da7c7d179df01c4048a81ddf40a9f13c3ce77 (diff) | |
download | firmament-7e0151569477df63601be50c82177ecfd21e5deb.tar.gz firmament-7e0151569477df63601be50c82177ecfd21e5deb.tar.bz2 firmament-7e0151569477df63601be50c82177ecfd21e5deb.zip |
Bump to 1.20.5
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util/SkyblockId.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/util/SkyblockId.kt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/util/SkyblockId.kt b/src/main/kotlin/moe/nea/firmament/util/SkyblockId.kt index fb63eba..413231d 100644 --- a/src/main/kotlin/moe/nea/firmament/util/SkyblockId.kt +++ b/src/main/kotlin/moe/nea/firmament/util/SkyblockId.kt @@ -16,6 +16,7 @@ import kotlinx.serialization.Serializable import kotlinx.serialization.UseSerializers import kotlinx.serialization.decodeFromString import kotlinx.serialization.json.Json +import net.minecraft.component.DataComponentTypes import net.minecraft.item.ItemStack import net.minecraft.nbt.NbtCompound import net.minecraft.util.Identifier @@ -76,7 +77,7 @@ data class HypixelPetInfo( private val jsonparser = Json { ignoreUnknownKeys = true } val ItemStack.extraAttributes: NbtCompound - get() = getOrCreateSubNbt("ExtraAttributes") + get() = get(DataComponentTypes.CUSTOM_DATA)?.nbt ?: NbtCompound() val ItemStack.skyblockUUIDString: String? get() = extraAttributes.getString("uuid")?.takeIf { it.isNotBlank() } @@ -121,7 +122,7 @@ val ItemStack.skyBlockId: SkyblockId? else SkyblockId("${enchantName.uppercase()};${enchantmentData.getInt(enchantName)}") } - // TODO: PARTY_HAT_CRAB{,_ANIMATED,_SLOTH} + // TODO: PARTY_HAT_CRAB{,_ANIMATED,_SLOTH},POTION else -> { SkyblockId(id) } |