feat: Show star stat boosts in REI menus

This commit is contained in:
Linnea Gräf
2025-01-17 19:26:21 +01:00
parent 5e54ffd424
commit f0056183f0
3 changed files with 45 additions and 11 deletions

View File

@@ -119,6 +119,12 @@ var ItemStack.extraAttributes: NbtCompound
return customData.nbt
}
fun ItemStack.modifyExtraAttributes(block: (NbtCompound) -> Unit) {
val baseNbt = get(DataComponentTypes.CUSTOM_DATA)?.copyNbt() ?: NbtCompound()
block(baseNbt)
set(DataComponentTypes.CUSTOM_DATA, NbtComponent.of(baseNbt))
}
val ItemStack.skyblockUUIDString: String?
get() = extraAttributes.getString("uuid")?.takeIf { it.isNotBlank() }

View File

@@ -67,6 +67,8 @@ value class ItemType private constructor(val name: String) {
val dungeonVariant get() = ofName("DUNGEON $name")
val isDungeon get() = name.startsWith("DUNGEON ")
override fun toString(): String {
return name
}