|
41 | 41 |
|
42 | 42 | @Mixin(Gui.class) |
43 | 43 | public abstract class MixinInGameHud { |
44 | | - @WrapOperation(method = "renderCrosshair", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/CameraType;isFirstPerson()Z")) |
45 | | - private boolean animatium$crosshairInThirdPerson(CameraType instance, Operation<Boolean> original) { |
46 | | - if (Animatium.isEnabled() && AnimatiumConfig.instance().screen.crosshairInThirdPerson) { |
47 | | - return true; |
48 | | - } else { |
49 | | - return original.call(instance); |
50 | | - } |
51 | | - } |
| 44 | + @WrapOperation(method = "renderCrosshair", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/CameraType;isFirstPerson()Z")) |
| 45 | + private boolean animatium$crosshairInThirdPerson(CameraType instance, Operation<Boolean> original) { |
| 46 | + if (Animatium.isEnabled() && AnimatiumConfig.instance().screen.crosshairInThirdPerson) { |
| 47 | + return true; |
| 48 | + } else { |
| 49 | + return original.call(instance); |
| 50 | + } |
| 51 | + } |
52 | 52 |
|
53 | | - @WrapWithCondition(method = "renderCrosshair", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Lcom/mojang/blaze3d/pipeline/RenderPipeline;Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 2)) |
54 | | - private boolean animatium$fixHighAttackSpeedIndicator(GuiGraphics instance, RenderPipeline renderPipeline, ResourceLocation resourceLocation, int i, int j, int k, int l, @Local float f) { |
55 | | - if (AnimatiumConfig.instance().fixes.fixHighAttackSpeedIndicator) { |
56 | | - return (int) (f * 17.0F) != 0; |
57 | | - } else { |
58 | | - return true; |
59 | | - } |
60 | | - } |
| 53 | + @WrapWithCondition(method = "renderCrosshair", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Lcom/mojang/blaze3d/pipeline/RenderPipeline;Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 2)) |
| 54 | + private boolean animatium$fixHighAttackSpeedIndicator(GuiGraphics instance, RenderPipeline renderPipeline, ResourceLocation resourceLocation, int i, int j, int k, int l, @Local float f) { |
| 55 | + if (AnimatiumConfig.instance().fixes.fixHighAttackSpeedIndicator) { |
| 56 | + return (int) (f * 17.0F) != 0; |
| 57 | + } else { |
| 58 | + return true; |
| 59 | + } |
| 60 | + } |
61 | 61 |
|
62 | | - @WrapWithCondition(method = "renderHearts", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/Gui;renderHeart(Lnet/minecraft/client/gui/GuiGraphics;Lnet/minecraft/client/gui/Gui$HeartType;IIZZZ)V")) |
63 | | - private boolean animatium$heartFlash(Gui instance, GuiGraphics guiGraphics, Gui.HeartType type, int x, int y, boolean hardcore, boolean blinking, boolean half) { |
64 | | - return !Animatium.isEnabled() || AnimatiumConfig.instance().screen.heartFlash || !blinking || type == Gui.HeartType.CONTAINER; |
65 | | - } |
| 62 | + @WrapWithCondition(method = "renderHearts", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/Gui;renderHeart(Lnet/minecraft/client/gui/GuiGraphics;Lnet/minecraft/client/gui/Gui$HeartType;IIZZZ)V")) |
| 63 | + private boolean animatium$heartFlash(Gui instance, GuiGraphics guiGraphics, Gui.HeartType type, int x, int y, boolean hardcore, boolean blinking, boolean half) { |
| 64 | + return !Animatium.isEnabled() || !AnimatiumConfig.instance().screen.disableHeartFlash || !blinking || type == Gui.HeartType.CONTAINER; |
| 65 | + } |
66 | 66 | } |
0 commit comments