Skip to content

Commit

Permalink
fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
hannibal002 committed Sep 20, 2024
1 parent 4f80965 commit 293b3ae
Showing 1 changed file with 0 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import at.hannibal2.skyhanni.utils.RegexUtils.firstMatcher
import at.hannibal2.skyhanni.utils.RegexUtils.matches
import at.hannibal2.skyhanni.utils.RenderUtils.highlight
import at.hannibal2.skyhanni.utils.RenderUtils.renderRenderables
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getMinecraftId
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import at.hannibal2.skyhanni.utils.renderables.Renderable
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
Expand Down Expand Up @@ -201,31 +200,6 @@ object HoppityCollectionStats {
replacementCache[event.originalItem.displayName]?.let { event.replace(it) }
}

@SubscribeEvent
fun replaceItem(event: ReplaceItemEvent) {
if (!config.rarityDyeRecolor || !pagePattern.matches(event.inventory.name)) return
val item = event.originalItem
// The "base" missing rabbits are Gray Dye (minecraft:dye with metadata 8)
if (item.getMinecraftId().toString() != "minecraft:dye" || item.metadata != 8) return

val rarity = HoppityAPI.rarityByRabbit(item.displayName)
// Add NBT for the dye color itself
val newItemStack = ItemStack(Items.dye, 1, when (rarity) {
LorenzRarity.COMMON -> 7 // Light gray dye
LorenzRarity.UNCOMMON -> 10 // Lime dye
LorenzRarity.RARE -> 4 // Lapis lazuli
LorenzRarity.EPIC -> 5 // Purple dye
LorenzRarity.LEGENDARY -> 14 // Orange dye
LorenzRarity.MYTHIC -> 13 // Magenta dye
LorenzRarity.DIVINE -> 12 // Light blue dye
LorenzRarity.SPECIAL -> 1 // Rose Red - Covering bases for future (?)
else -> return
})
newItemStack.setLore(item.getLore())
newItemStack.setStackDisplayName(item.displayName)
event.replace(newItemStack)
}

@SubscribeEvent
fun onInventoryOpen(event: InventoryFullyOpenedEvent) {
if (!(LorenzUtils.inSkyBlock)) return
Expand Down

0 comments on commit 293b3ae

Please sign in to comment.