diff options
author | TymanWasTaken <tyman@tyman.tech> | 2021-07-06 17:20:49 -0400 |
---|---|---|
committer | TymanWasTaken <tyman@tyman.tech> | 2021-07-06 17:20:49 -0400 |
commit | c04ca523f9fb9f7adefa74587db61f76deeae9f0 (patch) | |
tree | f148e7bcd9105813d3fe781badcb2cf3892712fd /src/main/java/com/thatgravyboat/skyblockhud/mixins | |
parent | a8e475fa0a7977f64f072548459d592274169d66 (diff) | |
download | SkyblockHud-Death-Defied-c04ca523f9fb9f7adefa74587db61f76deeae9f0.tar.gz SkyblockHud-Death-Defied-c04ca523f9fb9f7adefa74587db61f76deeae9f0.tar.bz2 SkyblockHud-Death-Defied-c04ca523f9fb9f7adefa74587db61f76deeae9f0.zip |
Increase line width
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/mixins')
4 files changed, 23 insertions, 103 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinEndermanRenderer.java b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinEndermanRenderer.java index d29b6f5..330b915 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinEndermanRenderer.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinEndermanRenderer.java @@ -14,10 +14,7 @@ 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") - ) + @Inject(method = "doRender(Lnet/minecraft/entity/monster/EntityEnderman;DDDFF)V", at = @At("HEAD")) public void onRender( EntityEnderman entity, double x, @@ -28,15 +25,8 @@ public class MixinEndermanRenderer { 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 - ); + 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 3641876..2204995 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinEntityArrow.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinEntityArrow.java @@ -23,12 +23,9 @@ public class MixinEntityArrow { position != null && position.entityHit != null && this.shootingEntity != null && - this.shootingEntity.getUniqueID() - .equals(Minecraft.getMinecraft().thePlayer.getUniqueID()) + this.shootingEntity.getUniqueID().equals(Minecraft.getMinecraft().thePlayer.getUniqueID()) ) { - KillTrackerHandler.attackedEntities.add( - position.entityHit.getUniqueID() - ); + KillTrackerHandler.attackedEntities.add(position.entityHit.getUniqueID()); } return position; } diff --git a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinGuiIngameForge.java b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinGuiIngameForge.java index d6e0ac6..9886ba0 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinGuiIngameForge.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinGuiIngameForge.java @@ -18,119 +18,63 @@ public class MixinGuiIngameForge { @Shadow(remap = false) private RenderGameOverlayEvent eventParent; - @Inject( - method = "renderArmor", - at = @At("HEAD"), - cancellable = true, - remap = false - ) + @Inject(method = "renderArmor", at = @At("HEAD"), cancellable = true, remap = false) public void onRenderArmor(int width, int height, CallbackInfo ci) { - if ( - SkyblockHud.config.renderer.hideArmor && - SkyblockHud.hasSkyblockScoreboard() - ) { + if (SkyblockHud.config.renderer.hideArmor && SkyblockHud.hasSkyblockScoreboard()) { ci.cancel(); if (pre(ARMOR)) return; post(ARMOR); } } - @Inject( - method = "renderHealth", - at = @At("HEAD"), - cancellable = true, - remap = false - ) + @Inject(method = "renderHealth", at = @At("HEAD"), cancellable = true, remap = false) public void onRenderHealth(int width, int height, CallbackInfo ci) { - if ( - SkyblockHud.config.renderer.hideHearts && - SkyblockHud.hasSkyblockScoreboard() - ) { + if (SkyblockHud.config.renderer.hideHearts && SkyblockHud.hasSkyblockScoreboard()) { ci.cancel(); if (pre(HEALTH)) return; post(HEALTH); } } - @Inject( - method = "renderAir", - at = @At("HEAD"), - cancellable = true, - remap = false - ) + @Inject(method = "renderAir", at = @At("HEAD"), cancellable = true, remap = false) public void onRenderAir(int width, int height, CallbackInfo ci) { - if ( - SkyblockHud.config.renderer.hideAir && - SkyblockHud.hasSkyblockScoreboard() - ) { + if (SkyblockHud.config.renderer.hideAir && SkyblockHud.hasSkyblockScoreboard()) { ci.cancel(); if (pre(AIR)) return; post(AIR); } } - @Inject( - method = "renderHealthMount", - at = @At("HEAD"), - cancellable = true, - remap = false - ) + @Inject(method = "renderHealthMount", at = @At("HEAD"), cancellable = true, remap = false) public void onRenderHealthMount(int width, int height, CallbackInfo ci) { - if ( - SkyblockHud.config.renderer.hideAnimalHearts && - SkyblockHud.hasSkyblockScoreboard() - ) { + if (SkyblockHud.config.renderer.hideAnimalHearts && SkyblockHud.hasSkyblockScoreboard()) { ci.cancel(); if (pre(HEALTHMOUNT)) return; post(HEALTHMOUNT); } } - @Inject( - method = "renderExperience", - at = @At("HEAD"), - cancellable = true, - remap = false - ) + @Inject(method = "renderExperience", at = @At("HEAD"), cancellable = true, remap = false) public void onRenderExperience(int width, int height, CallbackInfo ci) { - if ( - SkyblockHud.config.renderer.hideXpBar && - SkyblockHud.hasSkyblockScoreboard() - ) { + if (SkyblockHud.config.renderer.hideXpBar && SkyblockHud.hasSkyblockScoreboard()) { ci.cancel(); if (pre(EXPERIENCE)) return; post(EXPERIENCE); } } - @Inject( - method = "renderJumpBar", - at = @At("HEAD"), - cancellable = true, - remap = false - ) + @Inject(method = "renderJumpBar", at = @At("HEAD"), cancellable = true, remap = false) public void onRenderJumpBar(int width, int height, CallbackInfo ci) { - if ( - SkyblockHud.config.renderer.hideXpBar && - SkyblockHud.hasSkyblockScoreboard() - ) { + if (SkyblockHud.config.renderer.hideXpBar && SkyblockHud.hasSkyblockScoreboard()) { ci.cancel(); if (pre(JUMPBAR)) return; post(JUMPBAR); } } - @Inject( - method = "renderFood", - at = @At("HEAD"), - cancellable = true, - remap = false - ) + @Inject(method = "renderFood", at = @At("HEAD"), cancellable = true, remap = false) public void onRenderFood(int width, int height, CallbackInfo ci) { - if ( - SkyblockHud.config.renderer.hideFood && - SkyblockHud.hasSkyblockScoreboard() - ) { + if (SkyblockHud.config.renderer.hideFood && SkyblockHud.hasSkyblockScoreboard()) { ci.cancel(); if (pre(FOOD)) return; post(FOOD); @@ -138,14 +82,10 @@ public class MixinGuiIngameForge { } private boolean pre(RenderGameOverlayEvent.ElementType type) { - return MinecraftForge.EVENT_BUS.post( - new RenderGameOverlayEvent.Pre(eventParent, type) - ); + return MinecraftForge.EVENT_BUS.post(new RenderGameOverlayEvent.Pre(eventParent, type)); } private void post(RenderGameOverlayEvent.ElementType type) { - MinecraftForge.EVENT_BUS.post( - new RenderGameOverlayEvent.Post(eventParent, type) - ); + MinecraftForge.EVENT_BUS.post(new RenderGameOverlayEvent.Post(eventParent, type)); } } diff --git a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java index 5cb4036..c97a1f9 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java @@ -55,15 +55,8 @@ public class MixinNetHandlerPlayClient { ), cancellable = true ) - public void handleTeams( - S3EPacketTeams packetIn, - CallbackInfo ci, - Scoreboard scoreboard - ) { + public void handleTeams(S3EPacketTeams packetIn, CallbackInfo ci, Scoreboard scoreboard) { //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(); + if (scoreboard.getTeam(packetIn.getName()) != null && packetIn.getAction() == 0) ci.cancel(); } } |