-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
Backend: Add multi version preprocessor #2283
Conversation
This pull request has conflicts with the base branch "beta". Please resolve those so we can test out your changes. |
I am going to assume that the conflict here is the version number only and am not going to fix the conflict therefore. Unless you wanna make bigger changes you should probably just discard the changes and edit the version number directly in the new branch |
# Conflicts: # build.gradle.kts
Conflicts have been resolved! 🎉 |
i didnt mean for you to fix it i just meant that i didnt feel like fixing it for every version update lol |
I intend to merge this pr before the next beta version |
Hi, |
For the event library there is already a replacement system existing that is planned to be used in 1.8.9 as well. For the other forge functions we'll need to write custom functions as well using preprocessor directives like for other missing minecraft functions. |
ah I see. great. I'm looking forward to the porting process. |
this reminds me, we need to readdress the event bus system and finally move over to the new system globally (after fixed all remaining problems with it) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After running this in dev env, ive found two bugs:
They happened when running the 1.8.9 runClient script. I am not sure if this is related, though.
shaders are broken in custom scoreboard
SkyHanni 0.26.Beta.21: Caught an ExceptionInInitializerError in CustomScoreboard at GuiOverlayRenderEvent: null
Caused by java.lang.ExceptionInInitializerError: null
at SH.utils.RenderUtils.drawRoundRect(RenderUtils.kt:1785)
at SH.utils.RenderUtils.drawRoundRect$default(RenderUtils.kt:1778)
at SH.features.gui.customscoreboard.RenderBackground.renderBackground(RenderBackground.kt:60)
at SH.features.gui.customscoreboard.CustomScoreboard.onRenderOverlay(CustomScoreboard.kt:61)
at SH.data.RenderData.onRenderOverlay(RenderData.kt:31)
at FML.common.eventhandler.EventBus.post(EventBus.java:140)
Caused by java.io.FileNotFoundException: skyhanni:shaders/rounded_rect.vsh
at MC.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:68)
at SH.utils.shader.ShaderManager.loadShader(ShaderManager.kt:67)
at SH.utils.shader.Shader.recompile(Shader.kt:59)
at SH.utils.shader.Shader.<init>(Shader.kt:31)
at SH.features.misc.RoundedShader.<init>(RoundedShader.kt:7)
at SH.features.misc.RoundedRectangleShader.<init>(RoundedShader.kt:27)
at SH.features.misc.RoundedRectangleShader.<clinit>(RoundedShader.kt)
at SH.utils.RenderUtils.drawRoundRect(RenderUtils.kt:1785)
at SH.utils.RenderUtils.drawRoundRect$default(RenderUtils.kt:1778)
at SH.features.gui.customscoreboard.RenderBackground.renderBackground(RenderBackground.kt:60)
at SH.features.gui.customscoreboard.CustomScoreboard.onRenderOverlay(CustomScoreboard.kt:61)
at SH.data.RenderData.onRenderOverlay(RenderData.kt:31)
at FML.common.eventhandler.EventBus.post(EventBus.java:140)
the skull being rendered wrong is because of the same shaders bug |
Looks like it's just forge not finding the resources because they are not in the kotlin classes directory. Forgot it is like that on 1.8.9. As for the runClient: the runClient gradle task should work but I'll also make it generate a regular intellij config again (Although it should be noted that the intellij task does not seem manual set up to work with the right java version, unlike the gradle task) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks gay to me!!!!!! :3 /pos
This pull request has conflicts with the base branch "beta". Please resolve those so we can test out your changes. |
# Conflicts: # src/main/java/at/hannibal2/skyhanni/config/core/config/gui/GuiPositionEditor.kt
Conflicts have been resolved! 🎉 |
PR Reviews
When your PR is marked as ready for review, some of our maintainers will look through your code to make sure everything is good to go. In order to do this, they may request some changes you will need to do, or fix smaller stuff (like merge conflicts) for you. If a maintainer has reviewed your PR, make sure to pull any of their changes into your local project before doing more work on your code. Having maintainers fix small stuff for you helps us speed up the process of merging your PR, so if some of your systems warrant further care, be sure to let us know (preferably with a code comment).
Make sure to only mark your PR as "Ready to review" when it is. If you still want to do major changes, you can keep a draft PR open until then.
What
This PR adds a preprocessor to automatically remap all skyhanni code to 1.21. This does not work, of course. The remapped sources are full of problems: Some methods have different names whose conversion gets lost between versions. Some methods simply get called with different arguments and need to manually handled. Some methods get fully removed and new workarounds need to be written.
The goal of this PR is to have a way for contributors to slowly make features they write work on 1.21 over time to ease the burden when making the final jump. It should run in the background and not halt normal development.
Check out the CONTRIBUTING.md changes for more info.
Changelog Technical Details