aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/mixins
diff options
context:
space:
mode:
authorWalker Selby <git@walkerselby.com>2023-09-29 11:30:27 -0700
committerGitHub <noreply@github.com>2023-09-29 20:30:27 +0200
commit343d5d9cea12beaf7a8dfabda2f61ad940be592a (patch)
treeceb0a82790eaa1a1babfe4a2e05220378037a748 /src/main/java/at/hannibal2/skyhanni/mixins
parentb364b6da62668ea44dfc23180fe70c13ec707804 (diff)
downloadskyhanni-343d5d9cea12beaf7a8dfabda2f61ad940be592a.tar.gz
skyhanni-343d5d9cea12beaf7a8dfabda2f61ad940be592a.tar.bz2
skyhanni-343d5d9cea12beaf7a8dfabda2f61ad940be592a.zip
Random Code Cleanup (#516)
Sonar Lint for the win #516
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/mixins')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiIngameHook.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/mixins/hooks/NetworkManagerHook.kt4
2 files changed, 3 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiIngameHook.kt b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiIngameHook.kt
index 5eb964f62..b7e2d86f3 100644
--- a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiIngameHook.kt
+++ b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiIngameHook.kt
@@ -13,10 +13,8 @@ fun drawString(
y: Int,
color: Int,
): Int {
- if (SkyHanniMod.feature.misc.hideScoreboardNumbers) {
- if (text.startsWith("§c") && text.length <= 4) {
- return 0
- }
+ if (SkyHanniMod.feature.misc.hideScoreboardNumbers && text.startsWith("§c") && text.length <= 4) {
+ return 0
}
if (SkyHanniMod.feature.misc.hidePiggyScoreboard) {
piggyPattern.matchMatcher(text) {
diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/NetworkManagerHook.kt b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/NetworkManagerHook.kt
index 1466ed44d..ca4c2e42b 100644
--- a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/NetworkManagerHook.kt
+++ b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/NetworkManagerHook.kt
@@ -5,7 +5,5 @@ import net.minecraft.network.Packet
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo
fun onReceivePacket(packet: Packet<*>, ci: CallbackInfo) {
- if (packet != null) {
- if (PacketEvent.ReceiveEvent(packet).postAndCatch()) ci.cancel()
- }
+ if (packet != null && PacketEvent.ReceiveEvent(packet).postAndCatch()) ci.cancel()
} \ No newline at end of file