aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/inventory/experimentationtable/ExperimentationTableConfig.java2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/experimentationtable/SuperpairDataDisplay.kt14
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/solver/FossilSolverDisplay.kt2
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
}