-
Notifications
You must be signed in to change notification settings - Fork 102
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
Update to 1.20 #156
Update to 1.20 #156
Conversation
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.
Tested this under a clean fabric instance and it seems to work just fine, not sure what the fillGradient
in settings screen system was for though.
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.
Mojang doesn't pass MatixStacks in gui anymore, they use a class called GuiGraphics, which contains the stuff needed.
container.setBackground((matrices, widget, vOffset, mouseX, mouseY, delta) -> { | ||
if (this.client.world != null) { | ||
this.fillGradient(matrices, widget.getX(), widget.getY(), | ||
widget.getX() + widget.getWidth(), innerWidget.getY(), | ||
0xc0101010, 0xd0101010); | ||
this.fillGradient(matrices, widget.getX(), innerWidget.getY() + innerWidget.getHeight(), | ||
widget.getX() + widget.getWidth(), widget.getY() + widget.getHeight(), | ||
0xc0101010, 0xd0101010); | ||
// Commented because i can't find a solution | ||
|
||
// this.fillGradient(matrices, widget.getX(), widget.getY(), | ||
// widget.getX() + widget.getWidth(), innerWidget.getY(), | ||
// 0xc0101010, 0xd0101010); | ||
// this.fillGradient(matrices, widget.getX(), innerWidget.getY() + innerWidget.getHeight(), | ||
// widget.getX() + widget.getWidth(), widget.getY() + widget.getHeight(), | ||
// 0xc0101010, 0xd0101010); |
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.
container.setBackground((matrices, widget, vOffset, mouseX, mouseY, delta) -> { | |
if (this.client.world != null) { | |
this.fillGradient(matrices, widget.getX(), widget.getY(), | |
widget.getX() + widget.getWidth(), innerWidget.getY(), | |
0xc0101010, 0xd0101010); | |
this.fillGradient(matrices, widget.getX(), innerWidget.getY() + innerWidget.getHeight(), | |
widget.getX() + widget.getWidth(), widget.getY() + widget.getHeight(), | |
0xc0101010, 0xd0101010); | |
// Commented because i can't find a solution | |
// this.fillGradient(matrices, widget.getX(), widget.getY(), | |
// widget.getX() + widget.getWidth(), innerWidget.getY(), | |
// 0xc0101010, 0xd0101010); | |
// this.fillGradient(matrices, widget.getX(), innerWidget.getY() + innerWidget.getHeight(), | |
// widget.getX() + widget.getWidth(), widget.getY() + widget.getHeight(), | |
// 0xc0101010, 0xd0101010); | |
container.setBackground((graphics, widget, vOffset, mouseX, mouseY, delta) -> { | |
if (this.client.world != null) { | |
graphics.fillGradient(widget.getX(), widget.getY(), | |
widget.getX() + widget.getWidth(), innerWidget.getY(), | |
0xc0101010, 0xd0101010); | |
graphics.fillGradient(widget.getX(), innerWidget.getY() + innerWidget.getHeight(), | |
widget.getX() + widget.getWidth(), widget.getY() + widget.getHeight(), | |
0xc0101010, 0xd0101010); |
This should be what you need
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.
Thank you. Now everything should be fine
This works in 1.20.1, someone needs to update the mod.json though |
Confirmed working on 1.20.1 |
Can confirm, works for me for 1.20. This is my build including a JAR download for anyone else who needs one. @Lisixo Thanks a lot! |
Hey @Lisixo, could this PR also support Minecraft v1.20.1? |
Thanks @KennyDevT ! I restarted my build. The new JAR for 1.20.1 should be public in about 10 minutes. |
Honestly I just wanted to have it in my modpack I didn't even know about this PR until I decided to PR it to Lixiso fork |
Now we just need @LambdAurora (or someone else with rights to do so) to merge this and update the modrinth page, right? |
@JanLukasGithub I think we should wait for more people to report whether it worked for them in 1.20.1. I myself only play 1.20 currently, and I haven't seen any confirmation comments for the current commit fea5d26 . Update: fea5d26 JAR download if someone needs it. React with 🚀 if it works for you in MC 1.20.1. |
I know this is closed and published now, but Fabric API should be 0.83.0 if people are still using base 1.20, as most mod launchers will still serve it as the most recent version for 1.20. |
Well, that's one issue I just realized I forgot. Welp, I'm not fixing that now, worst case scenario there's dependency overrides, and 1.20.1 is so minor everything should work there anyway so people should just update. |
That's a tad unfortunate. I was kind of hoping to use the mod in 1.20.0 but each time I loaded it in with my other mods I kept getting this message. Replace mod 'Fabric API' (fabric-api) 0.83.0+1.20 with mod 'Fabric API' (fabric-api), version 0.83.1+1.20.1 or later. Mod 'LambDynamicLights' (lambdynlights) 2.3.1+1.20.1 requires version 0.83.1+1.20.1 or later of mod 'Fabric API'(fabric-api), but only the wrong version is present: 0.83.0+1.20! |
@MBCMechachu update to 1.20.1 and update Fabric API. 1.20.1 is so minor that all mods should work and be compatible with 1.20 servers. |
You can create an overrides pack to bypass that, follow https://fabricmc.net/wiki/tutorial:dependency_overrides and just set it up for dynamic lights, or update to 1.20.1, and just copy paste everything, as it should work anyway. |
A lot of this is far too complex for me to understand in order for me to do this on my own. What's worse is that I can't seem to find any sort of step by step videos anywhere so I'm just stuck having to wait until the mods I was using update to 1.20.1; assuming that some of them do at all. Update: Turns out all I needed to do was update my Fabric API to the one for 1.20.1, everything is working fine now. |
Can we have the v2.3.1+1.20.1 release page have a big hint "You'll need to update Fabric API to at least x.x.x" also with a download link to that? Edit: Maybe it would be a good idea to have a default "System Requirements" chapter as one of the first things on every release page. |
Updated to Minecraft 1.20
I commented gui/SettingsScreen.java because i can't find solution for this code fragment but mod and game work fine without this code fragment