From 3e1f75e32253bca3312f478a60d315bec37bc112 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Sun, 21 Jan 2024 14:06:34 +0100 Subject: Bump to 1.20.4 --- src/main/kotlin/moe/nea/firmament/util/ItemUtil.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/kotlin/moe/nea/firmament/util/ItemUtil.kt') diff --git a/src/main/kotlin/moe/nea/firmament/util/ItemUtil.kt b/src/main/kotlin/moe/nea/firmament/util/ItemUtil.kt index cccff64..4f8c90c 100644 --- a/src/main/kotlin/moe/nea/firmament/util/ItemUtil.kt +++ b/src/main/kotlin/moe/nea/firmament/util/ItemUtil.kt @@ -17,17 +17,17 @@ fun ItemStack.appendLore(args: List) { val compoundTag = getOrCreateSubNbt("display") val loreList = compoundTag.getOrCreateList("Lore", NbtString.STRING_TYPE) for (arg in args) { - loreList.add(NbtString.of(Text.Serializer.toJson(arg))) + loreList.add(NbtString.of(Text.Serialization.toJsonString(arg))) } } fun ItemStack.modifyLore(update: (List) -> List) { val compoundTag = getOrCreateSubNbt("display") val loreList = compoundTag.getOrCreateList("Lore", NbtString.STRING_TYPE) - val parsed = loreList.map { Text.Serializer.fromJson(it.asString())!! } + val parsed = loreList.map { Text.Serialization.fromJson(it.asString())!! } val updated = update(parsed) loreList.clear() - loreList.addAll(updated.map { NbtString.of(Text.Serializer.toJson(it)) }) + loreList.addAll(updated.map { NbtString.of(Text.Serialization.toJsonString(it)) }) } -- cgit