Skip to content

Commit

Permalink
Disabled clicks on SkyHanni GUIs while inside Skytils profile viewer.
Browse files Browse the repository at this point in the history
  • Loading branch information
hannibal002 committed Oct 27, 2023
1 parent 643694f commit 2ec3d23
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,11 @@ interface Renderable {
val isConfigScreen = Minecraft.getMinecraft().currentScreen !is GuiScreenElementWrapper

val openGui = Minecraft.getMinecraft().currentScreen?.javaClass?.name ?: "none"
val isInNeuPV = openGui == "io.github.moulberry.notenoughupdates.profileviewer.GuiProfileViewer"
val isInNeuPv = openGui == "io.github.moulberry.notenoughupdates.profileviewer.GuiProfileViewer"
val isInSkyTilsPv = openGui == "gg.skytils.skytilsmod.gui.profile.ProfileGui"

val result = isGuiScreen && isGuiPositionEditor && isNotInSignAndOnSlot && isConfigScreen && !isInNeuPV
val result = isGuiScreen && isGuiPositionEditor && isNotInSignAndOnSlot && isConfigScreen &&
!isInNeuPv && !isInSkyTilsPv

if (debug) {
if (!result) {
Expand All @@ -182,7 +184,8 @@ interface Renderable {
if (!isGuiPositionEditor) logger.log("isGuiPositionEditor")
if (!isNotInSignAndOnSlot) logger.log("isNotInSignAndOnSlot")
if (!isConfigScreen) logger.log("isConfigScreen")
if (isInNeuPV) logger.log("isInNeuPV")
if (isInNeuPv) logger.log("isInNeuPv")
if (isInSkyTilsPv) logger.log("isInSkyTilsPv")
logger.log("")
} else {
logger.log("allowed click")
Expand Down

0 comments on commit 2ec3d23

Please sign in to comment.