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

Conversation

MicrocontrollersDev
Copy link

Description

https://discord.com/channels/822066990423605249/1297626978165461175/1297626978165461175

Unable to replicate the issue, and not about to wait for a skyblock event or whatever. this is the only thing i can think of that would cause this. cant replicate it even with insane aspect ratios, and you cant set boss health above their hardcoded values in vanilla 1.8.9. not tested at all, dont know if this fixes anything.

Related Issue(s)

Fixes # https://discord.com/channels/822066990423605249/1297626978165461175/1297626978165461175

How to test

Release Notes

Fix boss bars being longer than the intended width

Documentation

@lunaynx
Copy link

lunaynx commented Dec 30, 2024

Doesn't build.

17:57:16: Executing ':1.12.2-forge:classes :1.12.2-forge:testClasses :1.8.9-forge:classes :1.8.9-forge:testClasses :1.12.2-forge:dummyClasses :1.8.9-forge:dummyClasses'...


> Configure project :
Preprocessor 0.7.1

> Configure project :1.12.2-forge
Polyfrost Loom: 1.6.polyfrost.6

> Configure project :1.8.9-forge
Not publishing sources jar as it was not found. Use java.withSourcesJar() to fix.

> Configure project :1.12.2-forge
Not publishing sources jar as it was not found. Use java.withSourcesJar() to fix.

> Task :1.8.9-forge:compileDummyKotlin NO-SOURCE
> Task :1.8.9-forge:compileDummyJava UP-TO-DATE
> Task :1.8.9-forge:processDummyResources NO-SOURCE
> Task :1.8.9-forge:dummyClasses UP-TO-DATE
> Task :1.12.2-forge:preprocessDummyCode UP-TO-DATE
> Task :1.12.2-forge:compileDummyKotlin NO-SOURCE
> Task :1.12.2-forge:compileDummyJava UP-TO-DATE
> Task :1.12.2-forge:preprocessDummyResources NO-SOURCE
> Task :1.12.2-forge:processDummyResources NO-SOURCE
> Task :1.12.2-forge:dummyClasses UP-TO-DATE
> Task :1.8.9-forge:blossomSourceReplacementJava
> Task :1.8.9-forge:blossomSourceReplacementKotlin
> Task :1.8.9-forge:processResources
> Task :1.8.9-forge:processTestResources NO-SOURCE

> Task :1.8.9-forge:compileKotlin
w: Argument -Xopt-in is deprecated. Please use -opt-in instead

> Task :1.12.2-forge:preprocessCode
> Task :1.12.2-forge:blossomSourceReplacementJava
> Task :1.12.2-forge:blossomSourceReplacementKotlin
> Task :1.12.2-forge:preprocessResources
> Task :1.12.2-forge:processResources
> Task :1.12.2-forge:preprocessTestResources NO-SOURCE
> Task :1.12.2-forge:processTestResources NO-SOURCE

> Task :1.8.9-forge:compileJava
/Users/Luna/src/PolyPatcher/versions/1.8.9-forge/build/sources/java/club/sk1er/patcher/mixins/features/lefthand/EntityRendererMixin_LeftHandedness.java:26: warning: Cannot find target method "renderHand(FIZZZ)V" for @Inject.method="renderHand(FIZZZ)V" in net.minecraft.client.renderer.EntityRenderer
    @Inject(
    ^
/Users/Luna/src/PolyPatcher/versions/1.8.9-forge/build/sources/java/club/sk1er/patcher/mixins/features/lefthand/EntityRendererMixin_LeftHandedness.java:43: warning: Cannot find target method "renderHand(FIZZZ)V" for @Inject.method="renderHand(FIZZZ)V" in net.minecraft.client.renderer.EntityRenderer
    @Inject(
    ^
/Users/Luna/src/PolyPatcher/versions/1.8.9-forge/build/sources/java/club/sk1er/patcher/mixins/features/EntityRendererMixin_ViewBobbing.java:15: warning: Cannot find target method "renderHand(FIZZZ)V" for @Redirect.method="renderHand(FIZZZ)V" in net.minecraft.client.renderer.EntityRenderer
    @Redirect(
    ^
/Users/Luna/src/PolyPatcher/versions/1.8.9-forge/build/sources/java/club/sk1er/patcher/mixins/bugfixes/optifine/RenderGlobalMixin_FixSkyVBOs.java:17: warning: Cannot find target for @Shadow field in net.minecraft.client.renderer.RenderGlobal
    @Shadow(remap = false)
    ^
/Users/Luna/src/PolyPatcher/versions/1.8.9-forge/build/sources/java/club/sk1er/patcher/mixins/performance/optifine/MathHelperMixin_OFFastMath.java:11: warning: Cannot find target for @Shadow field in net.minecraft.util.MathHelper
    @Shadow(remap = false)
    ^
/Users/Luna/src/PolyPatcher/versions/1.8.9-forge/build/sources/java/club/sk1er/patcher/mixins/performance/optifine/MathHelperMixin_OFFastMath.java:15: warning: Cannot find target for @Shadow field in net.minecraft.util.MathHelper
    @Shadow(remap = false)
    ^
/Users/Luna/src/PolyPatcher/versions/1.8.9-forge/build/sources/java/club/sk1er/patcher/mixins/performance/optifine/MathHelperMixin_OFFastMath.java:19: warning: Cannot find target for @Shadow field in net.minecraft.util.MathHelper
    @Shadow(remap = false)
    ^

> Task :1.12.2-forge:compileKotlin
w: Argument -Xopt-in is deprecated. Please use -opt-in instead

> Task :1.12.2-forge:compileJava
/Users/Luna/src/PolyPatcher/versions/1.12.2-forge/build/sources/java/club/sk1er/patcher/mixins/features/EntityRendererMixin_ViewBobbing.java:15: warning: Cannot find target method "renderHand(FIZZZ)V" for @Redirect.method="renderHand(FIZZZ)V" in net.minecraft.client.renderer.EntityRenderer
    @Redirect(
    ^
/Users/Luna/src/PolyPatcher/versions/1.12.2-forge/build/sources/java/club/sk1er/patcher/mixins/bugfixes/GuiIngameMixin_FixBossbarWidth.java:11: warning: Unable to determine descriptor for @Redirect target method
    @Redirect(method = "renderBossHealth", at = @At(value = "FIELD", target = "Lnet/minecraft/entity/boss/BossStatus;healthScale:F"))
    ^
/Users/Luna/src/PolyPatcher/versions/1.12.2-forge/build/sources/java/club/sk1er/patcher/mixins/bugfixes/GuiIngameMixin_FixBossbarWidth.java:11: warning: Unable to locate field mapping for @At(FIELD.<target>) 'Lnet/minecraft/entity/boss/BossStatus;healthScale:F'
    @Redirect(method = "renderBossHealth", at = @At(value = "FIELD", target = "Lnet/minecraft/entity/boss/BossStatus;healthScale:F"))
    ^
/Users/Luna/src/PolyPatcher/versions/1.12.2-forge/build/sources/java/club/sk1er/patcher/mixins/bugfixes/optifine/RenderGlobalMixin_FixSkyVBOs.java:17: warning: Cannot find target for @Shadow field in net.minecraft.client.renderer.RenderGlobal
    @Shadow(remap = false)
    ^
/Users/Luna/src/PolyPatcher/versions/1.12.2-forge/build/sources/java/club/sk1er/patcher/mixins/performance/optifine/MathHelperMixin_OFFastMath.java:11: warning: Cannot find target for @Shadow field in net.minecraft.util.math.MathHelper
    @Shadow(remap = false)
    ^
/Users/Luna/src/PolyPatcher/versions/1.12.2-forge/build/sources/java/club/sk1er/patcher/mixins/performance/optifine/MathHelperMixin_OFFastMath.java:15: warning: Cannot find target for @Shadow field in net.minecraft.util.math.MathHelper
    @Shadow(remap = false)
    ^
/Users/Luna/src/PolyPatcher/versions/1.12.2-forge/build/sources/java/club/sk1er/patcher/mixins/performance/optifine/MathHelperMixin_OFFastMath.java:19: warning: Cannot find target for @Shadow field in net.minecraft.util.math.MathHelper
    @Shadow(remap = false)
    ^
cannot find symbol
  symbol:   class BossStatus
  location: package net.minecraft.entity.boss
1 error
7 warnings

> Task :1.12.2-forge:compileJava FAILED

> Task :1.8.9-forge:compileJava
Some input files use or override a deprecated API.
Recompile with -Xlint:deprecation for details.
Some input files use unchecked or unsafe operations.
Recompile with -Xlint:unchecked for details.
7 warnings

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':1.12.2-forge:compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
> Run with --info option to get more log output.
> Run with --scan to get full insights.

BUILD FAILED in 1m 3s

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.10/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
15 actionable tasks: 12 executed, 3 up-to-date
17:58:20: Execution finished ':1.12.2-forge:classes :1.12.2-forge:testClasses :1.8.9-forge:classes :1.8.9-forge:testClasses :1.12.2-forge:dummyClasses :1.8.9-forge:dummyClasses'.

@Wyvest
Copy link
Member

Wyvest commented Dec 30, 2024

Doesn't build.

17:57:16: Executing ':1.12.2-forge:classes :1.12.2-forge:testClasses :1.8.9-forge:classes :1.8.9-forge:testClasses :1.12.2-forge:dummyClasses :1.8.9-forge:dummyClasses'...


> Configure project :
Preprocessor 0.7.1

> Configure project :1.12.2-forge
Polyfrost Loom: 1.6.polyfrost.6

> Configure project :1.8.9-forge
Not publishing sources jar as it was not found. Use java.withSourcesJar() to fix.

> Configure project :1.12.2-forge
Not publishing sources jar as it was not found. Use java.withSourcesJar() to fix.

> Task :1.8.9-forge:compileDummyKotlin NO-SOURCE
> Task :1.8.9-forge:compileDummyJava UP-TO-DATE
> Task :1.8.9-forge:processDummyResources NO-SOURCE
> Task :1.8.9-forge:dummyClasses UP-TO-DATE
> Task :1.12.2-forge:preprocessDummyCode UP-TO-DATE
> Task :1.12.2-forge:compileDummyKotlin NO-SOURCE
> Task :1.12.2-forge:compileDummyJava UP-TO-DATE
> Task :1.12.2-forge:preprocessDummyResources NO-SOURCE
> Task :1.12.2-forge:processDummyResources NO-SOURCE
> Task :1.12.2-forge:dummyClasses UP-TO-DATE
> Task :1.8.9-forge:blossomSourceReplacementJava
> Task :1.8.9-forge:blossomSourceReplacementKotlin
> Task :1.8.9-forge:processResources
> Task :1.8.9-forge:processTestResources NO-SOURCE

> Task :1.8.9-forge:compileKotlin
w: Argument -Xopt-in is deprecated. Please use -opt-in instead

> Task :1.12.2-forge:preprocessCode
> Task :1.12.2-forge:blossomSourceReplacementJava
> Task :1.12.2-forge:blossomSourceReplacementKotlin
> Task :1.12.2-forge:preprocessResources
> Task :1.12.2-forge:processResources
> Task :1.12.2-forge:preprocessTestResources NO-SOURCE
> Task :1.12.2-forge:processTestResources NO-SOURCE

> Task :1.8.9-forge:compileJava
/Users/Luna/src/PolyPatcher/versions/1.8.9-forge/build/sources/java/club/sk1er/patcher/mixins/features/lefthand/EntityRendererMixin_LeftHandedness.java:26: warning: Cannot find target method "renderHand(FIZZZ)V" for @Inject.method="renderHand(FIZZZ)V" in net.minecraft.client.renderer.EntityRenderer
    @Inject(
    ^
/Users/Luna/src/PolyPatcher/versions/1.8.9-forge/build/sources/java/club/sk1er/patcher/mixins/features/lefthand/EntityRendererMixin_LeftHandedness.java:43: warning: Cannot find target method "renderHand(FIZZZ)V" for @Inject.method="renderHand(FIZZZ)V" in net.minecraft.client.renderer.EntityRenderer
    @Inject(
    ^
/Users/Luna/src/PolyPatcher/versions/1.8.9-forge/build/sources/java/club/sk1er/patcher/mixins/features/EntityRendererMixin_ViewBobbing.java:15: warning: Cannot find target method "renderHand(FIZZZ)V" for @Redirect.method="renderHand(FIZZZ)V" in net.minecraft.client.renderer.EntityRenderer
    @Redirect(
    ^
/Users/Luna/src/PolyPatcher/versions/1.8.9-forge/build/sources/java/club/sk1er/patcher/mixins/bugfixes/optifine/RenderGlobalMixin_FixSkyVBOs.java:17: warning: Cannot find target for @Shadow field in net.minecraft.client.renderer.RenderGlobal
    @Shadow(remap = false)
    ^
/Users/Luna/src/PolyPatcher/versions/1.8.9-forge/build/sources/java/club/sk1er/patcher/mixins/performance/optifine/MathHelperMixin_OFFastMath.java:11: warning: Cannot find target for @Shadow field in net.minecraft.util.MathHelper
    @Shadow(remap = false)
    ^
/Users/Luna/src/PolyPatcher/versions/1.8.9-forge/build/sources/java/club/sk1er/patcher/mixins/performance/optifine/MathHelperMixin_OFFastMath.java:15: warning: Cannot find target for @Shadow field in net.minecraft.util.MathHelper
    @Shadow(remap = false)
    ^
/Users/Luna/src/PolyPatcher/versions/1.8.9-forge/build/sources/java/club/sk1er/patcher/mixins/performance/optifine/MathHelperMixin_OFFastMath.java:19: warning: Cannot find target for @Shadow field in net.minecraft.util.MathHelper
    @Shadow(remap = false)
    ^

> Task :1.12.2-forge:compileKotlin
w: Argument -Xopt-in is deprecated. Please use -opt-in instead

> Task :1.12.2-forge:compileJava
/Users/Luna/src/PolyPatcher/versions/1.12.2-forge/build/sources/java/club/sk1er/patcher/mixins/features/EntityRendererMixin_ViewBobbing.java:15: warning: Cannot find target method "renderHand(FIZZZ)V" for @Redirect.method="renderHand(FIZZZ)V" in net.minecraft.client.renderer.EntityRenderer
    @Redirect(
    ^
/Users/Luna/src/PolyPatcher/versions/1.12.2-forge/build/sources/java/club/sk1er/patcher/mixins/bugfixes/GuiIngameMixin_FixBossbarWidth.java:11: warning: Unable to determine descriptor for @Redirect target method
    @Redirect(method = "renderBossHealth", at = @At(value = "FIELD", target = "Lnet/minecraft/entity/boss/BossStatus;healthScale:F"))
    ^
/Users/Luna/src/PolyPatcher/versions/1.12.2-forge/build/sources/java/club/sk1er/patcher/mixins/bugfixes/GuiIngameMixin_FixBossbarWidth.java:11: warning: Unable to locate field mapping for @At(FIELD.<target>) 'Lnet/minecraft/entity/boss/BossStatus;healthScale:F'
    @Redirect(method = "renderBossHealth", at = @At(value = "FIELD", target = "Lnet/minecraft/entity/boss/BossStatus;healthScale:F"))
    ^
/Users/Luna/src/PolyPatcher/versions/1.12.2-forge/build/sources/java/club/sk1er/patcher/mixins/bugfixes/optifine/RenderGlobalMixin_FixSkyVBOs.java:17: warning: Cannot find target for @Shadow field in net.minecraft.client.renderer.RenderGlobal
    @Shadow(remap = false)
    ^
/Users/Luna/src/PolyPatcher/versions/1.12.2-forge/build/sources/java/club/sk1er/patcher/mixins/performance/optifine/MathHelperMixin_OFFastMath.java:11: warning: Cannot find target for @Shadow field in net.minecraft.util.math.MathHelper
    @Shadow(remap = false)
    ^
/Users/Luna/src/PolyPatcher/versions/1.12.2-forge/build/sources/java/club/sk1er/patcher/mixins/performance/optifine/MathHelperMixin_OFFastMath.java:15: warning: Cannot find target for @Shadow field in net.minecraft.util.math.MathHelper
    @Shadow(remap = false)
    ^
/Users/Luna/src/PolyPatcher/versions/1.12.2-forge/build/sources/java/club/sk1er/patcher/mixins/performance/optifine/MathHelperMixin_OFFastMath.java:19: warning: Cannot find target for @Shadow field in net.minecraft.util.math.MathHelper
    @Shadow(remap = false)
    ^
cannot find symbol
  symbol:   class BossStatus
  location: package net.minecraft.entity.boss
1 error
7 warnings

> Task :1.12.2-forge:compileJava FAILED

> Task :1.8.9-forge:compileJava
Some input files use or override a deprecated API.
Recompile with -Xlint:deprecation for details.
Some input files use unchecked or unsafe operations.
Recompile with -Xlint:unchecked for details.
7 warnings

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':1.12.2-forge:compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
> Run with --info option to get more log output.
> Run with --scan to get full insights.

BUILD FAILED in 1m 3s

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.10/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
15 actionable tasks: 12 executed, 3 up-to-date
17:58:20: Execution finished ':1.12.2-forge:classes :1.12.2-forge:testClasses :1.8.9-forge:classes :1.8.9-forge:testClasses :1.12.2-forge:dummyClasses :1.8.9-forge:dummyClasses'.

could you try commenting out the 1.12 project in settings.gradle.kts and building just 1.8.9

@lunaynx
Copy link

lunaynx commented Dec 30, 2024

Yeah, that works. (Edit: the build)

@MicrocontrollersDev
Copy link
Author

are we deadass??

@MicrocontrollersDev
Copy link
Author

oh shit you talking about building it my fault

@MicrocontrollersDev
Copy link
Author

MicrocontrollersDev commented Dec 30, 2024

current state: proposed solution "works". no longer a glitched bossbar but instead the bossbar shows as being at max hp for a while instead which isn't a great solution. issue stems from health being greater than maxhealth (dont know why). bossstatus and the bossbar rendering are decoupled and cant store info to normalize and I don't know how I would modify maxhealth to be the max between itself and health (client-side).

(tldr this fix "works" but causes other issues, don't know how to do a proper fix)

would probably have to do some duck interface nonsense to get the entity instance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants