aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data
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/hannibal2/skyhanni/data
parent8bd79d3e44dcaf156e4e48c2ecedadcd22a5e172 (diff)
downloadskyhanni-47887640d0e217a9d3a568f4b960a10dd5f00ce0.tar.gz
skyhanni-47887640d0e217a9d3a568f4b960a10dd5f00ce0.tar.bz2
skyhanni-47887640d0e217a9d3a568f4b960a10dd5f00ce0.zip
Code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/ItemClickData.kt3
1 files changed, 2 insertions, 1 deletions
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()
}
}