aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-04-04 08:05:05 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-04-04 08:05:05 +0200
commit47887640d0e217a9d3a568f4b960a10dd5f00ce0 (patch)
tree64f9296b8137268e6d8aed7a1fb147d0c7ace4da /src/main/java/at
parent8bd79d3e44dcaf156e4e48c2ecedadcd22a5e172 (diff)
downloadskyhanni-47887640d0e217a9d3a568f4b960a10dd5f00ce0.tar.gz
skyhanni-47887640d0e217a9d3a568f4b960a10dd5f00ce0.tar.bz2
skyhanni-47887640d0e217a9d3a568f4b960a10dd5f00ce0.zip
Code cleanup
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Diana.java5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/GUI.java14
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/ItemClickData.kt3
3 files changed, 6 insertions, 16 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Diana.java b/src/main/java/at/hannibal2/skyhanni/config/features/Diana.java
index 8df41070c..37032d25b 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Diana.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Diana.java
@@ -34,10 +34,7 @@ public class Diana {
public boolean burrowNearestWarp = false;
@Expose
- @ConfigOption(
- name = "Warp Key",
- desc = "Press this key to warp to nearest burrow waypoint."
- )
+ @ConfigOption(name = "Warp Key", desc = "Press this key to warp to nearest burrow waypoint.")
@ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE)
public int keyBindWarp = Keyboard.KEY_NONE;
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/GUI.java b/src/main/java/at/hannibal2/skyhanni/config/features/GUI.java
index eba1feea8..957f12f8f 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/GUI.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/GUI.java
@@ -9,20 +9,12 @@ import org.lwjgl.input.Keyboard;
public class GUI {
- @ConfigOption(
- name = "Edit GUI Locations",
- desc = "Change the position of SkyHanni's overlays"
- )
- @ConfigEditorButton(
- buttonText = "Edit"
- )
+ @ConfigOption(name = "Edit GUI Locations", desc = "Change the position of SkyHanni's overlays")
+ @ConfigEditorButton(buttonText = "Edit")
public Runnable positions = GuiEditManager::openGuiEditor;
@Expose
- @ConfigOption(
- name = "Open Hotkey",
- desc = "Press this key to open the GUI Editor."
- )
+ @ConfigOption(name = "Open Hotkey", desc = "Press this key to open the GUI Editor.")
@ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE)
public int keyBindOpen = Keyboard.KEY_NONE;
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ItemClickData.kt b/src/main/java/at/hannibal2/skyhanni/data/ItemClickData.kt
index fc68e1a52..eb6e20590 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/ItemClickData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/ItemClickData.kt
@@ -23,12 +23,13 @@ class ItemClickData {
val position = packet.position.toLorenzVec()
BlockClickEvent(ClickType.RIGHT_CLICK, position, packet.stack).postAndCatch()
}
- val itemInHand = Minecraft.getMinecraft().thePlayer.heldItem
if (packet is C07PacketPlayerDigging && packet.status == C07PacketPlayerDigging.Action.START_DESTROY_BLOCK) {
+ val itemInHand = Minecraft.getMinecraft().thePlayer.heldItem
val position = packet.position.toLorenzVec()
BlockClickEvent(ClickType.LEFT_CLICK, position, itemInHand).postAndCatch()
}
if (packet is C0APacketAnimation) {
+ val itemInHand = Minecraft.getMinecraft().thePlayer.heldItem
ItemClickEvent(itemInHand).postAndCatch()
}
}