diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-10-03 14:28:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-03 14:28:22 +0200 |
commit | 4d4fbd019a58a694c0d36ae08d25a97c9db268d8 (patch) | |
tree | 3c6181df9215f5b00720621a30ee63b0b318cca3 /src/main/java/at/hannibal2/skyhanni | |
parent | 3264d76f1d5a765da57b03a7ffcba506737cb5b0 (diff) | |
download | skyhanni-4d4fbd019a58a694c0d36ae08d25a97c9db268d8.tar.gz skyhanni-4d4fbd019a58a694c0d36ae08d25a97c9db268d8.tar.bz2 skyhanni-4d4fbd019a58a694c0d36ae08d25a97c9db268d8.zip |
Improvement: Superpair Experimentation data always visible (#2647)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Co-authored-by: CalMWolfs <cwolfson58@gmail.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
3 files changed, 13 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/experimentationtable/ExperimentationTableConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/experimentationtable/ExperimentationTableConfig.java index dfdad2482..0313498e6 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/experimentationtable/ExperimentationTableConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/experimentationtable/ExperimentationTableConfig.java @@ -21,7 +21,7 @@ public class ExperimentationTableConfig { public ExperimentsDryStreakConfig dryStreak = new ExperimentsDryStreakConfig(); @Expose - @ConfigOption(name = "Superpair Data", desc = "Shows a display with useful information while doing the Superpair experiment.") + @ConfigOption(name = "Superpair Data", desc = "Displays useful data while doing the Superpair experiment.") @ConfigEditorBoolean @FeatureToggle public boolean superpairDisplay = false; diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/experimentationtable/SuperpairDataDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/experimentationtable/SuperpairDataDisplay.kt index 627974e6b..37e12aa51 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/experimentationtable/SuperpairDataDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/experimentationtable/SuperpairDataDisplay.kt @@ -15,6 +15,7 @@ import at.hannibal2.skyhanni.utils.LorenzUtils.isAnyOf import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.RegexUtils.matches +import at.hannibal2.skyhanni.utils.RenderUtils.renderString import at.hannibal2.skyhanni.utils.RenderUtils.renderStrings import at.hannibal2.skyhanni.utils.StringUtils.removeColor import net.minecraft.item.ItemStack @@ -56,14 +57,22 @@ object SuperpairDataDisplay { @SubscribeEvent fun onChestGuiOverlayRendered(event: GuiRenderEvent.ChestGuiOverlayRenderEvent) { if (!isEnabled()) return + if (InventoryUtils.openInventoryName() == "Experimentation Table") { + // Render here so they can move it around. + config.superpairDisplayPosition.renderString("§6Superpair Experimentation Data", posLabel = "Superpair Experimentation Data") + } + if (ExperimentationTableAPI.getCurrentExperiment() == null) return + if (display.isEmpty()) display = drawDisplay() - config.superpairDisplayPosition.renderStrings(display, posLabel = "Superpair Experiment Information") + config.superpairDisplayPosition.renderStrings(display, posLabel = "Superpair Experimentation Data") } @SubscribeEvent fun onSlotClick(event: SlotClickEvent) { if (!isEnabled()) return + if (ExperimentationTableAPI.getCurrentExperiment() == null) return + val currentExperiment = ExperimentationTableAPI.getCurrentExperiment() ?: return val item = event.item ?: return @@ -286,6 +295,5 @@ object SuperpairDataDisplay { private fun SuperpairItem?.sameAs(other: SuperpairItem) = this?.reward == other.reward && this?.damage == other.damage - private fun isEnabled() = - IslandType.PRIVATE_ISLAND.isInIsland() && config.superpairDisplay && ExperimentationTableAPI.getCurrentExperiment() != null + private fun isEnabled() = IslandType.PRIVATE_ISLAND.isInIsland() && config.superpairDisplay } diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/solver/FossilSolverDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/solver/FossilSolverDisplay.kt index cb50e3c85..f9dd9b8db 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/solver/FossilSolverDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/solver/FossilSolverDisplay.kt @@ -188,7 +188,7 @@ object FossilSolverDisplay { if (inExcavatorMenu) { // Render here so they can move it around. As if you press key while doing the excavator you lose the scrap - config.position.renderString("§eExcavator solver gui", posLabel = "Fossil Excavator Solver") + config.position.renderString("§eExcavator solver GUI", posLabel = "Fossil Excavator Solver") return } |