aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/util/item
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-04-18 20:10:16 +0200
committerLinnea Gräf <nea@nea.moe>2024-04-18 20:23:44 +0200
commitc264ca9e8f9f2b0aed457753c43bb4e25edb0ef1 (patch)
treef0eac8c4902bca00f9e44bc4d0e9b6eb73e7144d /src/main/kotlin/moe/nea/firmament/util/item
parentfbe94315a45082bdf50d0a95583725352e3f20ec (diff)
downloadfirmament-c264ca9e8f9f2b0aed457753c43bb4e25edb0ef1.tar.gz
firmament-c264ca9e8f9f2b0aed457753c43bb4e25edb0ef1.tar.bz2
firmament-c264ca9e8f9f2b0aed457753c43bb4e25edb0ef1.zip
Add pickaxe ability timer
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util/item')
-rw-r--r--src/main/kotlin/moe/nea/firmament/util/item/NbtItemData.kt7
1 files changed, 6 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 d226da0..80628ae 100644
--- a/src/main/kotlin/moe/nea/firmament/util/item/NbtItemData.kt
+++ b/src/main/kotlin/moe/nea/firmament/util/item/NbtItemData.kt
@@ -1,5 +1,6 @@
/*
* SPDX-FileCopyrightText: 2023 Linnea Gräf <nea@nea.moe>
+ * SPDX-FileCopyrightText: 2024 Linnea Gräf <nea@nea.moe>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
@@ -17,7 +18,11 @@ fun textFromNbt() {
val ItemStack.loreAccordingToNbt
get() = getOrCreateSubNbt(ItemStack.DISPLAY_KEY).getList(ItemStack.LORE_KEY, NbtElement.STRING_TYPE.toInt())
- .map { lazy(LazyThreadSafetyMode.NONE) { Text.Serialization.fromJson((it as NbtString).asString()) } }
+ .map {
+ lazy(LazyThreadSafetyMode.NONE) {
+ Text.Serialization.fromJson((it as NbtString).asString())
+ }
+ }
val ItemStack.displayNameAccordingToNbt
get() = getOrCreateSubNbt(ItemStack.DISPLAY_KEY).let {