diff --git a/src/main/java/club/sk1er/patcher/mixins/bugfixes/GuiIngameMixin_FixBossbarWidth.java b/src/main/java/club/sk1er/patcher/mixins/bugfixes/GuiIngameMixin_FixBossbarWidth.java new file mode 100644 index 00000000..ff361535 --- /dev/null +++ b/src/main/java/club/sk1er/patcher/mixins/bugfixes/GuiIngameMixin_FixBossbarWidth.java @@ -0,0 +1,15 @@ +package club.sk1er.patcher.mixins.bugfixes; + +import net.minecraft.client.gui.GuiIngame; +import net.minecraft.entity.boss.BossStatus; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Redirect; + +@Mixin(GuiIngame.class) +public class GuiIngameMixin_FixBossbarWidth { + @Redirect(method = "renderBossHealth", at = @At(value = "FIELD", target = "Lnet/minecraft/entity/boss/BossStatus;healthScale:F")) + private float patcher$clampBossBarWidth() { + return Math.min(BossStatus.healthScale, 1.0F); + } +} diff --git a/src/main/java/club/sk1er/patcher/mixins/features/EntityRendererMixin_CameraPerspective.java b/src/main/java/club/sk1er/patcher/mixins/features/EntityRendererMixin_CameraPerspective.java index 6b6c56fd..0056771f 100644 --- a/src/main/java/club/sk1er/patcher/mixins/features/EntityRendererMixin_CameraPerspective.java +++ b/src/main/java/club/sk1er/patcher/mixins/features/EntityRendererMixin_CameraPerspective.java @@ -11,7 +11,6 @@ @Mixin(EntityRenderer.class) public class EntityRendererMixin_CameraPerspective { - @Redirect(method = "orientCamera", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/multiplayer/WorldClient;rayTraceBlocks(Lnet/minecraft/util/Vec3;Lnet/minecraft/util/Vec3;)Lnet/minecraft/util/MovingObjectPosition;")) private MovingObjectPosition patcher$changeBlockingType(WorldClient instance, Vec3 from, Vec3 to) { return PatcherConfig.betterCamera diff --git a/src/main/resources/mixins.patcher.json b/src/main/resources/mixins.patcher.json index 4d0abaca..5efcf83d 100644 --- a/src/main/resources/mixins.patcher.json +++ b/src/main/resources/mixins.patcher.json @@ -53,6 +53,7 @@ "bugfixes.GuiGameOverMixin_ResolveButtonClick", "bugfixes.GuiIngameForgeMixin_FixProfilerSection", "bugfixes.GuiIngameForgeMixin_HotbarAlpha", + "bugfixes.GuiIngameMixin_FixBossbarWidth", "bugfixes.GuiIngameMixin_RemoveSpectatorPumpkinOverlay", "bugfixes.GuiIngameMixin_ScoreboardTextTransparency", "bugfixes.GuiLanguageMixin_ResetUnicodeFont",