diff options
author | nea <nea@nea.moe> | 2023-10-04 16:41:04 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-10-04 16:41:04 +0200 |
commit | 64523821d82d702c0bf2d62bbe45a1047aed8bda (patch) | |
tree | fe5f25316ddf1895281a932b8fe468b5bc330975 /src/main/kotlin/moe/nea/firmament/util | |
parent | d0cc95b1e9a674c41bedc50d1d7923159e2bd6a2 (diff) | |
download | Firmament-64523821d82d702c0bf2d62bbe45a1047aed8bda.tar.gz Firmament-64523821d82d702c0bf2d62bbe45a1047aed8bda.tar.bz2 Firmament-64523821d82d702c0bf2d62bbe45a1047aed8bda.zip |
Block selling to NPCs, trading and salvaging UUID locked items
[no changelog]
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/util/item/NbtItemData.kt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/util/item/NbtItemData.kt b/src/main/kotlin/moe/nea/firmament/util/item/NbtItemData.kt index ac30771..ff3e09d 100644 --- a/src/main/kotlin/moe/nea/firmament/util/item/NbtItemData.kt +++ b/src/main/kotlin/moe/nea/firmament/util/item/NbtItemData.kt @@ -11,9 +11,13 @@ import net.minecraft.nbt.NbtElement import net.minecraft.nbt.NbtString import net.minecraft.text.Text +fun textFromNbt() { + +} + val ItemStack.loreAccordingToNbt get() = getOrCreateSubNbt(ItemStack.DISPLAY_KEY).getList(ItemStack.LORE_KEY, NbtElement.STRING_TYPE.toInt()) - .map { Text.Serializer.fromJson((it as NbtString).asString()) } + .map { lazy(LazyThreadSafetyMode.NONE) { Text.Serializer.fromJson((it as NbtString).asString()) } } val ItemStack.displayNameAccordingToNbt get() = getOrCreateSubNbt(ItemStack.DISPLAY_KEY).let { |