From 41f2ff07c87e6b47bcbec531e6a8bcff53d800dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linnea=20Gr=C3=A4f?= Date: Wed, 26 Jun 2024 08:28:26 +0200 Subject: [PATCH 01/11] Add OneConfig mods to quick mod switcher (#2155) --- .../features/misc/QuickModMenuSwitch.kt | 77 ++++++------------- 1 file changed, 22 insertions(+), 55 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/QuickModMenuSwitch.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/QuickModMenuSwitch.kt index 2741605ef222..95f18c3c3092 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/QuickModMenuSwitch.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/QuickModMenuSwitch.kt @@ -34,17 +34,10 @@ object QuickModMenuSwitch { @SubscribeEvent fun onRepoReload(event: RepositoryReloadEvent) { val modsJar = event.getConstant("ModGuiSwitcher") - mods = buildList { - out@ for ((name, mod) in modsJar.mods) { - for (path in mod.guiPath) { - try { - Class.forName(path) - add(Mod(name, mod.description, mod.command, mod.guiPath)) - continue@out - } catch (_: Exception) { - } - } - } + mods = modsJar.mods.filter { mod -> + mod.value.guiPath.any { runCatching { Class.forName(it) }.isSuccess } + }.map { (name, mod) -> + Mod(name, mod.description, mod.command, mod.guiPath) } } @@ -108,11 +101,21 @@ object QuickModMenuSwitch { return config.javaClass.name } if (openGui == "cc.polyfrost.oneconfig.gui.OneConfigGui") { - /** TODO support different oneconfig mods: - * Partly Sane Skies - * Dankers SkyBlock Mod - * Dulkir - */ + val actualGui = Minecraft.getMinecraft().currentScreen + val currentPage = actualGui.javaClass.getDeclaredField("currentPage") + .makeAccessible() + .get(actualGui) + if (currentPage.javaClass.simpleName == "ModConfigPage") { + val optionPage = currentPage.javaClass.getDeclaredField("page") + .makeAccessible() + .get(currentPage) + val mod = optionPage.javaClass.getField("mod") + .makeAccessible() + .get(optionPage) + val modName = mod.javaClass.getField("name") + .get(mod) as String + return "cc.polyfrost.oneconfig.gui.OneConfigGui:$modName" + } } return openGui @@ -132,7 +135,7 @@ object QuickModMenuSwitch { Renderable.string(nameFormat + mod.name), bypassChecks = true, onClick = { open(mod) }, - condition = { System.currentTimeMillis() > lastGuiOpen + 250 } + condition = { System.currentTimeMillis() > lastGuiOpen + 250 }, ) add(listOf(renderable, nameSuffix)) } @@ -143,44 +146,8 @@ object QuickModMenuSwitch { currentlyOpeningMod = mod.name update() try { - when (mod.command) { - "patcher" -> { - val patcher = Class.forName("club.sk1er.patcher.Patcher") - val instance = patcher.getDeclaredField("instance").get(null) - val config = instance.javaClass.getDeclaredMethod("getPatcherConfig").invoke(instance) - val gui = Class.forName("gg.essential.vigilance.Vigilant").getDeclaredMethod("gui").invoke(config) - val guiUtils = Class.forName("gg.essential.api.utils.GuiUtil") - for (method in guiUtils.declaredMethods) { - try { - method.invoke(null, gui) - return - } catch (_: Exception) { - } - } - ErrorManager.skyHanniError("Error trying to open the gui for mod " + mod.name + "!") - } - - "hytil" -> { - val hytilsReborn = Class.forName("cc.woverflow.hytils.HytilsReborn") - val instance = hytilsReborn.getDeclaredField("INSTANCE").get(null) - val config = instance.javaClass.getDeclaredMethod("getConfig").invoke(instance) - val gui = Class.forName("gg.essential.vigilance.Vigilant").getDeclaredMethod("gui").invoke(config) - val guiUtils = Class.forName("gg.essential.api.utils.GuiUtil") - for (method in guiUtils.declaredMethods) { - try { - method.invoke(null, gui) - return - } catch (_: Exception) { - } - } - ChatUtils.chat("Error trying to open the gui for mod " + mod.name + "!") - } - - else -> { - val thePlayer = Minecraft.getMinecraft().thePlayer - ClientCommandHandler.instance.executeCommand(thePlayer, "/${mod.command}") - } - } + val thePlayer = Minecraft.getMinecraft().thePlayer + ClientCommandHandler.instance.executeCommand(thePlayer, "/" + mod.command) } catch (e: Exception) { ErrorManager.logErrorWithData(e, "Error trying to open the gui for mod " + mod.name) } From 968014f07cd32b76d530348e7535739cb1ce16c2 Mon Sep 17 00:00:00 2001 From: J10a1n15 <45315647+j10a1n15@users.noreply.github.com> Date: Wed, 26 Jun 2024 08:38:25 +0200 Subject: [PATCH 02/11] Docs: Fixed Link of Last Example being broken (#2153) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- CONTRIBUTING.md | 2 +- docs/DISCORD_FAQ.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c0d399186f5d..b622b4a6db93 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -90,7 +90,7 @@ for more information and usages. - Please use Regex instead of String comparison when it is likely Hypixel will change the message in the future. - Do not use `fixedRateTimer` when possible and instead use `SecondPassedEvent` to safely execute the repeating event on the main thread. -- When updating a config option variable, use the `ConfigUpdaterMigrator.ConfigFixEvent` with event.move(), when moving a value, and event.transform() when updating a value. [For Example](https://github.com/hannibal002/SkyHanni/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt#L241). +- When updating a config option variable, use the `ConfigUpdaterMigrator.ConfigFixEvent` with event.move() when moving a value, and event.transform() when updating a value. [For Example](https://github.com/hannibal002/SkyHanni/blob/e88f416c48f9659f89b7047d7629cd9a1d1535bc/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt#L276). ## Software Used in SkyHanni diff --git a/docs/DISCORD_FAQ.md b/docs/DISCORD_FAQ.md index a2b01e519600..634bc1f03a78 100644 --- a/docs/DISCORD_FAQ.md +++ b/docs/DISCORD_FAQ.md @@ -55,10 +55,10 @@ _Frequently Asked Questions_ > **12: Why can I still see the normal Scoreboard when using Custom Scoreboard?** > Most of the time, this is a mod conflict. > If you are using [Sidebar Mod](https://github.com/Alexdoru/SidebarMod), please remove this mod. -> If you are using [VanillaHUD](https://modrinth.com/mod/vanillahud), please disable its Scoreboard by clicking on the blue bar below "Scoreboard" in the OneConfig Menu. +> If you are using [VanillaHUD](https://modrinth.com/mod/vanillahud), please update to 2.2.7 or newer to resolve this issue. > If you are using [Apec](https://github.com/BananaFructa/Apec/) and want to remove their Scoreboard, you need to remove Apec since they don't have an option to disable their Scoreboard. > If you don't use any of these mods, make sure the option to "Hide Vanilla Scoreboard" is actually enabled. -*This FAQ was last updated on May 27th, 2024. +*This FAQ was last updated on June 26th, 2024. If you believe there's something that should be added to this list, please tell us, so we can add it.* From 0e6572f5af0bc9bb677f2a64f0a700b55e060075 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 27 Jun 2024 17:12:07 +0200 Subject: [PATCH 03/11] added todo --- src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt index 82bd6d315abc..dd4a91fb97eb 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt @@ -453,6 +453,7 @@ object HypixelData { islandType = getIslandType(foundIsland, guesting) } + // TODO dont send events when one of the arguments is none, at least when not on sb anymore if (skyBlockIsland != islandType) { IslandChangeEvent(islandType, skyBlockIsland).postAndCatch() if (islandType == IslandType.UNKNOWN) { From 6535c3aa0925baf7fc7c9a24c047541fb7e199f3 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Fri, 28 Jun 2024 08:52:53 +0200 Subject: [PATCH 04/11] Improvement: rename mushroom tier (#2159) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../features/garden/cropmilestones/MushroomPetPerkConfig.java | 3 ++- .../features/garden/farming/GardenCropMilestoneDisplay.kt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/cropmilestones/MushroomPetPerkConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/cropmilestones/MushroomPetPerkConfig.java index 3a994d832373..afb5b0028b5a 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/garden/cropmilestones/MushroomPetPerkConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/cropmilestones/MushroomPetPerkConfig.java @@ -44,7 +44,8 @@ public class MushroomPetPerkConfig { public enum MushroomTextEntry implements HasLegacyId { TITLE("§6Mooshroom Cow Perk", 0), - MUSHROOM_TIER("§7Mushroom Tier 8", 1), + // TODO change to mushroom milestone + MUSHROOM_TIER("§7Mushroom Milestone 8", 1), NUMBER_OUT_OF_TOTAL("§e6,700§8/§e15,000", 2), TIME("§7In §b12m 34s", 3), PERCENTAGE("§7Percentage: §e12.34%", 4), diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt index ba7651d03ba6..4e91eadb2ed9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt @@ -319,7 +319,7 @@ object GardenCropMilestoneDisplay { lineMap[MushroomTextEntry.TITLE] = Renderable.string("§6Mooshroom Cow Perk") lineMap[MushroomTextEntry.MUSHROOM_TIER] = Renderable.horizontalContainer(buildList { addCropIconRenderable(mushroom) - addString("§7Mushroom Tier $nextTier") + addString("§7Mushroom Milestone $nextTier") }) lineMap[MushroomTextEntry.NUMBER_OUT_OF_TOTAL] = Renderable.string("§e$haveFormat§8/§e$needFormat") From 9659a44f1d2735a95b7352fedeffe7d4b181cce5 Mon Sep 17 00:00:00 2001 From: aphased <152172867+aphased@users.noreply.github.com> Date: Sat, 29 Jun 2024 22:04:41 +0200 Subject: [PATCH 05/11] Fix typo/duplicate word in cf config (#2169) --- .../chocolatefactory/ChocolateFactoryCustomReminderConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryCustomReminderConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryCustomReminderConfig.java index afade78a98ef..266216cdcc2a 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryCustomReminderConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryCustomReminderConfig.java @@ -20,7 +20,7 @@ public class ChocolateFactoryCustomReminderConfig { public boolean enabled = false; @Expose - @ConfigOption(name = "Always Custom Reminder", desc = "Always show the display always, even outside the chocolate factory.") + @ConfigOption(name = "Always Custom Reminder", desc = "Always show the display, even outside the chocolate factory.") @ConfigEditorBoolean @FeatureToggle public boolean always = false; From c0067955cdf8c4fceb0bf9564c7b0427e4b7b992 Mon Sep 17 00:00:00 2001 From: Luna Date: Sun, 30 Jun 2024 11:06:45 +0200 Subject: [PATCH 06/11] Fix: Chocolate per Time Tower charge ignoring Mu Rabbit (#2165) --- .../features/inventory/chocolatefactory/ChocolateFactoryAPI.kt | 2 +- .../inventory/chocolatefactory/ChocolateFactoryTooltip.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryAPI.kt index 7df0f5bd299b..a6f3626b6e3d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryAPI.kt @@ -163,7 +163,7 @@ object ChocolateFactoryAPI { fun timeTowerChargeDuration() = if (HoppityCollectionStats.hasFoundRabbit("Einstein")) 7.hours else 8.hours - private fun timeTowerMultiplier(): Double { + fun timeTowerMultiplier(): Double { var multiplier = (profileStorage?.timeTowerLevel ?: 0) * 0.1 if (HoppityCollectionStats.hasFoundRabbit("Mu")) multiplier += 0.7 return multiplier diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltip.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltip.kt index f73655bc5aaf..8973bc1e4fbe 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltip.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltip.kt @@ -45,7 +45,7 @@ object ChocolateFactoryTooltip { private fun chocPerTimeTower(): Int { val profileStorage = profileStorage ?: return 0 - val amountPerSecond = profileStorage.rawChocPerSecond * profileStorage.timeTowerLevel * .1 + val amountPerSecond = profileStorage.rawChocPerSecond * ChocolateFactoryAPI.timeTowerMultiplier() val amountPerHour = amountPerSecond * 60 * 60 return amountPerHour.toInt() } From 87814c6454555f48494265f41d4767dcc8483bb2 Mon Sep 17 00:00:00 2001 From: evhan3584 Date: Sun, 30 Jun 2024 05:14:12 -0400 Subject: [PATCH 07/11] Fix: Skill Progress ETA (#2163) --- .../skyhanni/features/skillprogress/SkillProgress.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt b/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt index 06bee04476bc..2e033b7e45b5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt @@ -149,7 +149,7 @@ object SkillProgress { allDisplay = formatAllDisplay(drawAllDisplay()) etaDisplay = drawETADisplay() - if (event.repeatSeconds(2)) { + if (event.repeatSeconds(1)) { update() updateSkillInfo() } @@ -503,8 +503,7 @@ object SkillProgress { xpInfo.xpGainQueue.removeLast() } - var totalGain = 0f - for (f in xpInfo.xpGainQueue) totalGain += f + val totalGain = xpInfo.xpGainQueue.sum() xpInfo.xpGainHour = totalGain * (60 * 60) / xpInfo.xpGainQueue.size xpInfo.isActive = true From 7c2f45cc229b8767f83fdf74f6a0aea870f114c3 Mon Sep 17 00:00:00 2001 From: Luna Date: Sun, 30 Jun 2024 11:14:55 +0200 Subject: [PATCH 08/11] Fix: Overflow level up message on Milestone 46 (#2161) --- .../features/garden/farming/GardenCropMilestoneDisplay.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt index 4e91eadb2ed9..69e12796e75b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt @@ -237,7 +237,7 @@ object GardenCropMilestoneDisplay { } if (overflowConfig.chat) { - if (currentTier >= 46 && currentTier == previousNext && + if (currentTier > 46 && currentTier == previousNext && nextRealTier == currentTier + 1 && lastWarnedLevel != currentTier ) { GardenCropMilestones.onOverflowLevelUp(crop, currentTier - 1, nextRealTier - 1) @@ -246,7 +246,7 @@ object GardenCropMilestoneDisplay { } if (overflowConfig.chat) { - if (currentTier >= 46 && currentTier == previousNext && + if (currentTier > 46 && currentTier == previousNext && nextRealTier == currentTier + 1 && lastWarnedLevel != currentTier ) { GardenCropMilestones.onOverflowLevelUp(crop, currentTier - 1, nextRealTier - 1) @@ -338,7 +338,7 @@ object GardenCropMilestoneDisplay { val percentageFormat = LorenzUtils.formatPercentage(have.toDouble() / need.toDouble()) lineMap[MushroomTextEntry.PERCENTAGE] = Renderable.string("§7Percentage: §e$percentageFormat") - if (currentTier >= 46 && currentTier == previousMushNext && nextTier == currentTier + 1 && lastMushWarnedLevel != currentTier) { + if (currentTier > 46 && currentTier == previousMushNext && nextTier == currentTier + 1 && lastMushWarnedLevel != currentTier) { GardenCropMilestones.onOverflowLevelUp(mushroom, currentTier - 1, nextTier - 1) lastMushWarnedLevel = currentTier } From aaee44528385506884774c35d73017cf6e0b2935 Mon Sep 17 00:00:00 2001 From: evhan3584 Date: Sun, 30 Jun 2024 05:15:45 -0400 Subject: [PATCH 09/11] Fix: Farming Weight Overtake ETA (#2158) --- .../skyhanni/features/garden/farming/FarmingWeightDisplay.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt index 535163f81cc7..a2ca09f15a32 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt @@ -310,7 +310,7 @@ object FarmingWeightDisplay { val timeFormat = if (weightPerSecond != -1.0) { val timeTillOvertake = try { - (weightUntilOvertake / weightPerSecond).minutes + (weightUntilOvertake / weightPerSecond).seconds } catch (e: Exception) { ErrorManager.logErrorWithData( e, From 3afdf0150f3af04f7cfb72718baddf8458b1115f Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 30 Jun 2024 11:26:40 +0200 Subject: [PATCH 10/11] using nextAfter instead --- .../mining/powdertracker/PowderTracker.kt | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt index 8c9217140417..940eb9b4b066 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt @@ -14,6 +14,7 @@ import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.CollectionUtils.addAsSingletonList +import at.hannibal2.skyhanni.utils.CollectionUtils.nextAfter import at.hannibal2.skyhanni.utils.ConditionalUtils.afterChange import at.hannibal2.skyhanni.utils.ConfigUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland @@ -105,16 +106,14 @@ object PowderTracker { calculateResourceHour(chestInfo) calculateResourceHour(hardStoneInfo) - for ((index, line) in TabWidget.EVENT.lines.withIndex()) { - if (line.contains("2x Powder")) { - if (eventEnded) return - doublePowder = true - val durationLine = TabWidget.EVENT.lines.getOrNull(index + 1) ?: return - tablistEventDuration.matchMatcher(durationLine) { - val duration = group("duration") - powderTimer = TimeUtils.getDuration(duration) - tracker.update() - } + + TabWidget.EVENT.lines.nextAfter({ it.contains("2x Powder") })?.let { durationLine -> + if (eventEnded) return + doublePowder = true + tablistEventDuration.matchMatcher(durationLine) { + val duration = group("duration") + powderTimer = TimeUtils.getDuration(duration) + tracker.update() } } From 2f353a043f7013c2e549219aa8f7981ebccbe565 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 30 Jun 2024 11:27:31 +0200 Subject: [PATCH 11/11] fix lint --- .../skyhanni/features/mining/powdertracker/PowderTracker.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt index 940eb9b4b066..483617b9a8c5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt @@ -339,7 +339,7 @@ object PowderTracker { } private fun MutableList>.addPerHour( - map: MutableMap, + map: Map, reward: PowderChestReward, info: ResourceInfo, ) {