aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/util/SkyblockId.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/util/SkyblockId.kt')
-rw-r--r--src/main/kotlin/util/SkyblockId.kt5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/kotlin/util/SkyblockId.kt b/src/main/kotlin/util/SkyblockId.kt
index 497a2d2..631b444 100644
--- a/src/main/kotlin/util/SkyblockId.kt
+++ b/src/main/kotlin/util/SkyblockId.kt
@@ -106,7 +106,10 @@ data class HypixelPetInfo(
private val jsonparser = Json { ignoreUnknownKeys = true }
-val ItemStack.extraAttributes: NbtCompound
+var ItemStack.extraAttributes: NbtCompound
+ set(value) {
+ set(DataComponentTypes.CUSTOM_DATA, NbtComponent.of(value))
+ }
get() {
val customData = get(DataComponentTypes.CUSTOM_DATA) ?: run {
val component = NbtComponent.of(NbtCompound())