From 3bfec3033e9d905514d5c1c6c62953c2a1646af0 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Fri, 1 Mar 2024 21:31:48 +0100 Subject: Add mob drop viewer to item list --- src/main/kotlin/moe/nea/firmament/rei/SBItemEntryDefinition.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/main/kotlin/moe/nea/firmament/rei/SBItemEntryDefinition.kt') diff --git a/src/main/kotlin/moe/nea/firmament/rei/SBItemEntryDefinition.kt b/src/main/kotlin/moe/nea/firmament/rei/SBItemEntryDefinition.kt index 77e329e..0cdb17e 100644 --- a/src/main/kotlin/moe/nea/firmament/rei/SBItemEntryDefinition.kt +++ b/src/main/kotlin/moe/nea/firmament/rei/SBItemEntryDefinition.kt @@ -1,5 +1,6 @@ /* * SPDX-FileCopyrightText: 2023 Linnea Gräf + * SPDX-FileCopyrightText: 2024 Linnea Gräf * * SPDX-License-Identifier: GPL-3.0-or-later */ @@ -30,6 +31,7 @@ import moe.nea.firmament.repo.RepoManager import moe.nea.firmament.util.FirmFormatters import moe.nea.firmament.util.HypixelPetInfo import moe.nea.firmament.util.SkyblockId +import moe.nea.firmament.util.appendLore import moe.nea.firmament.util.petData import moe.nea.firmament.util.skyBlockId @@ -54,6 +56,7 @@ data class SBItemStack( val neuItem: NEUItem?, val stackSize: Int, val petData: PetData?, + val extraLore: List = emptyList(), ) { constructor(skyblockId: SkyblockId, petData: PetData) : this( skyblockId, @@ -102,12 +105,13 @@ data class SBItemStack( } } - private val itemStack by lazy(LazyThreadSafetyMode.NONE) { + private val itemStack: ItemStack by lazy(LazyThreadSafetyMode.NONE) { if (skyblockId == SkyblockId.COINS) - return@lazy ItemCache.coinItem(stackSize) + return@lazy ItemCache.coinItem(stackSize).also { it.appendLore(extraLore) } val replacementData = mutableMapOf() injectReplacementDataForPets(replacementData) return@lazy neuItem.asItemStack(idHint = skyblockId, replacementData).copyWithCount(stackSize) + .also { it.appendLore(extraLore) } } fun asImmutableItemStack(): ItemStack { -- cgit