aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-24 19:47:28 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-24 19:47:28 +0200
commit55d444d2e9105a15fceb99b553c3754f2e247716 (patch)
treeab625919422547b21d76e7b873ddabb3ae541e89 /src/main/java/at/hannibal2/skyhanni
parentf77519e200eaaba1fee7f06d9e5665f1c45b2032 (diff)
downloadskyhanni-55d444d2e9105a15fceb99b553c3754f2e247716.tar.gz
skyhanni-55d444d2e9105a15fceb99b553c3754f2e247716.tar.bz2
skyhanni-55d444d2e9105a15fceb99b553c3754f2e247716.zip
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/mixins/transformers/gui/inventory/GuiEditSignMixin.java14
-rw-r--r--src/main/java/at/hannibal2/skyhanni/sign/SkyBlockEventHandler.java8
2 files changed, 8 insertions, 14 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/gui/inventory/GuiEditSignMixin.java b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/gui/inventory/GuiEditSignMixin.java
index d89f92da8..25e553c63 100644
--- a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/gui/inventory/GuiEditSignMixin.java
+++ b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/gui/inventory/GuiEditSignMixin.java
@@ -1,8 +1,7 @@
package at.hannibal2.skyhanni.mixins.transformers.gui.inventory;
import at.hannibal2.skyhanni.sign.*;
-import java.io.IOException;
-import java.util.List;
+import at.hannibal2.skyhanni.utils.LorenzUtils;
import net.minecraft.block.Block;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
@@ -20,6 +19,9 @@ import org.spongepowered.asm.mixin.injection.At.Shift;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+import java.io.IOException;
+import java.util.List;
+
@Mixin(GuiEditSign.class)
public class GuiEditSignMixin extends GuiScreen implements IEditSign {
@@ -42,7 +44,7 @@ public class GuiEditSignMixin extends GuiScreen implements IEditSign {
// this.textInputUtil = new TextInputUtil(this.fontRendererObj, () -> ((IModifiedSign) this.that.tileSign).getText(this.editLine).getUnformattedText(), text -> ((IModifiedSign) this.that.tileSign).setText(this.editLine, new ChatComponentText(text)), 90);
this.textInputUtil = new TextInputUtil(this.fontRendererObj, () -> ((IModifiedSign) getTileSign(this.that)).getText(this.editLine).getUnformattedText(), text -> ((IModifiedSign) getTileSign(this.that)).setText(this.editLine, new ChatComponentText(text)), 90);
- if (SkyBlockEventHandler.isSkyBlock && SkyBlockcatiaConfig.enableSignSelectionList) {
+ if (LorenzUtils.INSTANCE.getInSkyblock() && SkyBlockcatiaConfig.enableSignSelectionList) {
List<SignSelectionList.Entry> list = null;
String title = null;
@@ -85,7 +87,7 @@ public class GuiEditSignMixin extends GuiScreen implements IEditSign {
if (SkyBlockcatiaConfig.enableSignSelectionList) {
Keyboard.enableRepeatEvents(false);
- if (SkyBlockEventHandler.isSkyBlock) {
+ if (LorenzUtils.INSTANCE.getInSkyblock()) {
// String text = this.that.tileSign.signText[0].getUnformattedText();
String text = getTileSign(this.that).signText[0].getUnformattedText();
// if (!StringUtils.isNullOrEmpty(text))
@@ -194,7 +196,7 @@ public class GuiEditSignMixin extends GuiScreen implements IEditSign {
GlStateManager.popMatrix();
super.drawScreen(mouseX, mouseY, partialTicks);
- if (SkyBlockEventHandler.isSkyBlock && SkyBlockcatiaConfig.enableSignSelectionList && this.globalSelector != null) {
+ if (LorenzUtils.INSTANCE.getInSkyblock() && SkyBlockcatiaConfig.enableSignSelectionList && this.globalSelector != null) {
this.globalSelector.drawScreen(mouseX, mouseY, partialTicks);
}
info.cancel();
@@ -203,7 +205,7 @@ public class GuiEditSignMixin extends GuiScreen implements IEditSign {
@Inject(method = "drawScreen(IIF)V", cancellable = true, at = @At("RETURN"))
private void drawScreenPost(int mouseX, int mouseY, float partialTicks, CallbackInfo info) {
- if (!SkyBlockcatiaConfig.enableOverwriteSignEditing && SkyBlockEventHandler.isSkyBlock && SkyBlockcatiaConfig.enableSignSelectionList && this.globalSelector != null) {
+ if (!SkyBlockcatiaConfig.enableOverwriteSignEditing && LorenzUtils.INSTANCE.getInSkyblock() && SkyBlockcatiaConfig.enableSignSelectionList && this.globalSelector != null) {
this.globalSelector.drawScreen(mouseX, mouseY, partialTicks);
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/sign/SkyBlockEventHandler.java b/src/main/java/at/hannibal2/skyhanni/sign/SkyBlockEventHandler.java
deleted file mode 100644
index f54043a8a..000000000
--- a/src/main/java/at/hannibal2/skyhanni/sign/SkyBlockEventHandler.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package at.hannibal2.skyhanni.sign;
-
-import at.hannibal2.skyhanni.utils.LorenzUtils;
-
-public class SkyBlockEventHandler {
-
- public static boolean isSkyBlock = LorenzUtils.INSTANCE.getInSkyblock();
-}