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

Update to 1.20 #156

Merged
merged 5 commits into from
Jun 19, 2023
Merged

Update to 1.20 #156

merged 5 commits into from
Jun 19, 2023

Conversation

Lisixo
Copy link
Contributor

@Lisixo Lisixo commented Jun 10, 2023

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

Copy link

@Kichura Kichura left a 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.

@Lisixo
Copy link
Contributor Author

Lisixo commented Jun 10, 2023

fillGradient adds black shadow to settings background

Latest 1.19.4 build:
ss_1 19 4

1.20 build:
ss_1 20

Copy link

@Oliver-makes-code Oliver-makes-code left a 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.

Comment on lines 136 to 145
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);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Contributor Author

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

Repository owner deleted a comment from jhmaster2000 Jun 12, 2023
@Rubyboat1207
Copy link

This works in 1.20.1, someone needs to update the mod.json though

@joestr
Copy link
Contributor

joestr commented Jun 17, 2023

Confirmed working on 1.20.1

@mk-pmb
Copy link

mk-pmb commented Jun 17, 2023

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!

@mk-pmb mk-pmb mentioned this pull request Jun 17, 2023
@PetyXbron
Copy link

Hey @Lisixo, could this PR also support Minecraft v1.20.1?
image

@mk-pmb
Copy link

mk-pmb commented Jun 17, 2023

Thanks @KennyDevT ! I restarted my build. The new JAR for 1.20.1 should be public in about 10 minutes.
Edit: The new download has arrived.

@KennyDevT
Copy link
Contributor

KennyDevT commented Jun 17, 2023

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

@JanLukasGithub
Copy link

Now we just need @LambdAurora (or someone else with rights to do so) to merge this and update the modrinth page, right?

@mk-pmb
Copy link

mk-pmb commented Jun 19, 2023

@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.

@LambdAurora LambdAurora changed the base branch from 1.19.4 to 1.20 June 19, 2023 22:46
@LambdAurora LambdAurora merged commit 3f8a0c4 into LambdAurora:1.20 Jun 19, 2023
@TheUnknownCod3r
Copy link

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.

@LambdAurora
Copy link
Owner

Well, that's one issue I just realized I forgot.
The dependency should also be marked fabric-api now... oops...

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.

@MBCMechachu
Copy link

MBCMechachu commented Jun 20, 2023

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!

@LambdAurora
Copy link
Owner

@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.

@TheUnknownCod3r
Copy link

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!

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.

@MBCMechachu
Copy link

MBCMechachu commented Jun 21, 2023

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!

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.

@mk-pmb
Copy link

mk-pmb commented Jun 21, 2023

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.

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.