aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java
diff options
context:
space:
mode:
authorThatGravyBoat <thatgravyboat@gmail.com>2021-07-11 18:57:24 -0230
committerThatGravyBoat <thatgravyboat@gmail.com>2021-07-11 18:57:24 -0230
commit3a1917c8a0af4157cc1e6d5f3986e89377f245d8 (patch)
tree0a25fdc3ad1fc48da3f0d06c501f772ac9cfc353 /src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java
parent5a98a98dfc0009599b90280ae3a1f166de21e6e8 (diff)
downloadSkyHanni-3a1917c8a0af4157cc1e6d5f3986e89377f245d8.tar.gz
SkyHanni-3a1917c8a0af4157cc1e6d5f3986e89377f245d8.tar.bz2
SkyHanni-3a1917c8a0af4157cc1e6d5f3986e89377f245d8.zip
Added Mining Overlay including drill bar and heat bar
Added mana cost display Update Location Stuff Added new mining events stopped scoreboard logging spam removed missing location logging as hypixel dumb and sends the wrong thing once and a while causing it to log useless stuff. Added DEV Commands
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java
index df36b8ff3..e5c1aa05a 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java
@@ -2,6 +2,7 @@ package com.thatgravyboat.skyblockhud.mixins;
import net.minecraft.client.network.NetHandlerPlayClient;
import net.minecraft.network.play.server.S3EPacketTeams;
+import net.minecraft.scoreboard.ScorePlayerTeam;
import net.minecraft.scoreboard.Scoreboard;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@@ -49,4 +50,10 @@ public class MixinNetHandlerPlayClient {
//This stops Hypixel from being stupid and spamming our logs because they dont have different ids for things.
if (scoreboard.getTeam(packetIn.getName()) != null && packetIn.getAction() == 0) ci.cancel();
}
+
+ @Inject(method = "handleTeams", locals = LocalCapture.CAPTURE_FAILHARD, at = @At(value = "INVOKE", target = "Lnet/minecraft/network/play/server/S3EPacketTeams;getAction()I", ordinal = 6, shift = At.Shift.BEFORE), cancellable = true)
+ public void handleTeamRemove(S3EPacketTeams packetIn, CallbackInfo ci, Scoreboard scoreboard, ScorePlayerTeam scoreplayerteam){
+ if (scoreplayerteam == null) ci.cancel();
+ }
+
}