Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bossbar #80

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading