diff options
author | ThatGravyBoat <thatgravyboat@gmail.com> | 2021-07-11 18:57:24 -0230 |
---|---|---|
committer | ThatGravyBoat <thatgravyboat@gmail.com> | 2021-07-11 18:57:24 -0230 |
commit | 3a1917c8a0af4157cc1e6d5f3986e89377f245d8 (patch) | |
tree | 0a25fdc3ad1fc48da3f0d06c501f772ac9cfc353 /src/main/java/com/thatgravyboat/skyblockhud/mixins | |
parent | 5a98a98dfc0009599b90280ae3a1f166de21e6e8 (diff) | |
download | SkyblockHud-Death-Defied-3a1917c8a0af4157cc1e6d5f3986e89377f245d8.tar.gz SkyblockHud-Death-Defied-3a1917c8a0af4157cc1e6d5f3986e89377f245d8.tar.bz2 SkyblockHud-Death-Defied-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')
3 files changed, 9 insertions, 27 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinEndermanRenderer.java b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinEndermanRenderer.java deleted file mode 100644 index 7363a45..0000000 --- a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinEndermanRenderer.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.thatgravyboat.skyblockhud.mixins; - -import com.thatgravyboat.skyblockhud.SpecialColour; -import com.thatgravyboat.skyblockhud.handlers.sbentities.EntityTypeHelper; -import java.awt.*; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.entity.RenderEnderman; -import net.minecraft.entity.monster.EntityEnderman; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(RenderEnderman.class) -public class MixinEndermanRenderer { - - @Inject(method = "doRender(Lnet/minecraft/entity/monster/EntityEnderman;DDDFF)V", at = @At("HEAD")) - public void onRender(EntityEnderman entity, double x, double y, double z, float entityYaw, float partialTicks, CallbackInfo ci) { - if (EntityTypeHelper.isZealot(entity)) { - Color color = new Color(SpecialColour.specialToChromaRGB("255:255:0:48:255")); - GlStateManager.color(color.getRed() / 255f, color.getGreen() / 255f, color.getBlue() / 255f, 255f); - } - } -} diff --git a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinEntityArrow.java b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinEntityArrow.java index cc1edaf..dbde075 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinEntityArrow.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinEntityArrow.java @@ -1,6 +1,6 @@ package com.thatgravyboat.skyblockhud.mixins; -import com.thatgravyboat.skyblockhud.tracker.KillTrackerHandler; +import com.thatgravyboat.skyblockhud.api.KillTracking; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.entity.projectile.EntityArrow; @@ -13,14 +13,13 @@ import org.spongepowered.asm.mixin.injection.ModifyVariable; @Mixin(EntityArrow.class) public class MixinEntityArrow { - //Disabled as kill tracker stuff not fully added yet. @Shadow public Entity shootingEntity; @ModifyVariable(method = "onUpdate", at = @At(value = "STORE", ordinal = 1)) public MovingObjectPosition onUpdate(MovingObjectPosition position) { if (position != null && position.entityHit != null && this.shootingEntity != null && this.shootingEntity.getUniqueID().equals(Minecraft.getMinecraft().thePlayer.getUniqueID())) { - KillTrackerHandler.attackedEntities.add(position.entityHit.getUniqueID()); + KillTracking.attackedEntities.add(position.entityHit.getUniqueID()); } return position; } diff --git a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java index df36b8f..e5c1aa0 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(); + } + } |