From 60ecfedf46e94344e6439a3a90c4c74ee65eeb2e Mon Sep 17 00:00:00 2001 From: nea Date: Thu, 4 May 2023 15:54:56 +0200 Subject: Add parents to collapisble entries --- src/main/kotlin/moe/nea/notenoughupdates/util/SkyblockId.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/main/kotlin/moe/nea/notenoughupdates/util') diff --git a/src/main/kotlin/moe/nea/notenoughupdates/util/SkyblockId.kt b/src/main/kotlin/moe/nea/notenoughupdates/util/SkyblockId.kt index 8d7ef91..cc2d813 100644 --- a/src/main/kotlin/moe/nea/notenoughupdates/util/SkyblockId.kt +++ b/src/main/kotlin/moe/nea/notenoughupdates/util/SkyblockId.kt @@ -1,14 +1,20 @@ package moe.nea.notenoughupdates.util +import io.github.moulberry.repo.data.NEUItem import io.github.moulberry.repo.data.Rarity import kotlinx.serialization.Serializable import kotlinx.serialization.decodeFromString import kotlinx.serialization.json.Json import net.minecraft.item.ItemStack import net.minecraft.nbt.NbtCompound +import net.minecraft.util.Identifier @JvmInline -value class SkyblockId(val neuItem: String) +value class SkyblockId(val neuItem: String) { + val identifier get() = Identifier("skyblockitem", neuItem.lowercase().replace(";", "__")) +} + +val NEUItem.skyblockId get() = SkyblockId(skyblockItemId) @Serializable data class HypixelPetInfo( -- cgit