diff options
| author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2024-03-07 08:46:22 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-06 22:46:22 +0100 |
| commit | 6da1f6daeea8383de0f363fcb007cc9df15afd45 (patch) | |
| tree | 693a104b1dfaec685d9219bb96e4e2ab5d9fcf0e /src/main/java/at/hannibal2/skyhanni/data | |
| parent | de0f0e888a4c0767c8e8ca911113482a3b1f9d5c (diff) | |
| download | skyhanni-6da1f6daeea8383de0f363fcb007cc9df15afd45.tar.gz skyhanni-6da1f6daeea8383de0f363fcb007cc9df15afd45.tar.bz2 skyhanni-6da1f6daeea8383de0f363fcb007cc9df15afd45.zip | |
Backend: Reformat code in all files in src directory (#1109)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
3 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt index 77f334fc6..4fbebe958 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt @@ -7,7 +7,6 @@ import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzKeyPressEvent import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests import at.hannibal2.skyhanni.utils.ChatUtils -import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isRancherSign import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.ReflectionUtils.getPropertiesWithType diff --git a/src/main/java/at/hannibal2/skyhanni/data/ItemClickData.kt b/src/main/java/at/hannibal2/skyhanni/data/ItemClickData.kt index 3290c216b..bac3b6594 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ItemClickData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ItemClickData.kt @@ -29,8 +29,11 @@ class ItemClickData { } if (packet is C07PacketPlayerDigging && packet.status == C07PacketPlayerDigging.Action.START_DESTROY_BLOCK) { val position = packet.position.toLorenzVec() - val blockClickCancelled = BlockClickEvent(ClickType.LEFT_CLICK, position, InventoryUtils.getItemInHand()).postAndCatch() - event.isCanceled = ItemClickEvent(InventoryUtils.getItemInHand(), ClickType.LEFT_CLICK).also { it.isCanceled = blockClickCancelled }.postAndCatch() + val blockClickCancelled = + BlockClickEvent(ClickType.LEFT_CLICK, position, InventoryUtils.getItemInHand()).postAndCatch() + event.isCanceled = ItemClickEvent(InventoryUtils.getItemInHand(), ClickType.LEFT_CLICK).also { + it.isCanceled = blockClickCancelled + }.postAndCatch() } if (packet is C0APacketAnimation) { event.isCanceled = ItemClickEvent(InventoryUtils.getItemInHand(), ClickType.LEFT_CLICK).postAndCatch() diff --git a/src/main/java/at/hannibal2/skyhanni/data/PetAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/PetAPI.kt index 2a0f97ae2..d4aa147e8 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/PetAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/PetAPI.kt @@ -51,7 +51,7 @@ object PetAPI { } fun getPetLevel(nameWithLevel: String): Int? = petItemName.matchMatcher(nameWithLevel) { - group("level").toInt() + group("level").toInt() } fun hasPetName(name: String): Boolean = petItemName.matches(name) && !ignoredPetStrings.any { name.contains(it) } |
