Skip to content

Commit

Permalink
fix bossbar
Browse files Browse the repository at this point in the history
  • Loading branch information
MicrocontrollersDev committed Nov 11, 2024
1 parent 11eede6 commit bfcb129
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/mixins.patcher.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit bfcb129

Please sign in to comment.