Skip to content

Commit 676e7c7

Browse files
committed
feat: Support Minecraft 1.20.3
1 parent 5a43988 commit 676e7c7

File tree

5 files changed

+15
-12
lines changed

5 files changed

+15
-12
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 1.1.0+1.20.3 - 2024-04-20
4+
5+
### Added
6+
7+
- Support for Minecraft 1.20.3
8+
39
## 1.1.0+1.20.2 - 2024-04-20
410

511
### Added

gradle.properties

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ org.gradle.jvmargs=-Xmx1G
33

44
# Fabric Properties
55
# check these on https://fabricmc.net/develop
6-
minecraft_version=1.20.2
7-
yarn_mappings=1.20.2+build.4
6+
minecraft_version=1.20.3
7+
yarn_mappings=1.20.3+build.1
88
loader_version=0.15.10
99

1010
# Mod Properties
1111
project_name=Mod Settings
12-
mod_version=1.1.0+1.20.2
12+
mod_version=1.1.0+1.20.3
1313
maven_group=se.icus.mag
1414
archives_base_name=modsettings
1515

1616
# Fabric api
17-
fabric_version=0.91.6+1.20.2
17+
fabric_version=0.91.1+1.20.3

src/main/java/se/icus/mag/modsettings/gui/ModListWidget.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@
77
import net.minecraft.client.gui.Selectable;
88
import net.minecraft.client.gui.widget.ButtonWidget;
99
import net.minecraft.client.gui.widget.ElementListWidget;
10-
import net.minecraft.client.util.math.MatrixStack;
1110
import net.minecraft.text.Text;
1211

1312
import java.util.List;
1413

1514
public class ModListWidget extends ElementListWidget<ModListWidget.Entry> {
1615
private static final int BUTTON_HEIGHT = 20;
1716

18-
public ModListWidget(MinecraftClient client, int width, int height, int top, int bottom, int itemHeight) {
19-
super(client, width, height, top, bottom, itemHeight);
17+
public ModListWidget(MinecraftClient client, int width, int height, int y, int itemHeight) {
18+
super(client, width, height, y, itemHeight);
2019
this.centerListVertically = false;
2120
}
2221

src/main/java/se/icus/mag/modsettings/gui/ModSettingsScreen.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
import net.minecraft.client.gui.DrawContext;
44
import net.minecraft.client.gui.screen.Screen;
5-
import net.minecraft.client.gui.widget.ButtonWidget;
6-
import net.minecraft.client.util.math.MatrixStack;
75
import net.minecraft.screen.ScreenTexts;
86
import net.minecraft.text.Text;
97
import se.icus.mag.modsettings.Main;
@@ -34,10 +32,11 @@ protected void init() {
3432
initIsProcessing = true;
3533

3634
// Put list between 32 pixels from top and bottom
37-
this.list = new ModListWidget(this.client, this.width, this.height, 32, this.height - 32, 25);
35+
this.list = new ModListWidget(this.client, this.width, this.height - 64, 32, 25);
3836
this.list.addAll(getAllModConfigOptions());
3937

4038
this.addSelectableChild(this.list);
39+
this.addDrawableChild(this.list);
4140
this.addDrawableChild(new Button(this.width / 2 - FULL_BUTTON_WIDTH / 2, this.height - 27,
4241
FULL_BUTTON_WIDTH, BUTTON_HEIGHT, ScreenTexts.DONE,
4342
button -> this.client.setScreen(this.previous)));
@@ -62,7 +61,6 @@ private ModSettingsOption[] getAllModConfigOptions() {
6261
@Override
6362
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
6463
super.render(context, mouseX, mouseY, delta);
65-
this.list.render(context, mouseX, mouseY, delta);
6664
context.drawCenteredTextWithShadow(this.textRenderer, this.title, this.width / 2, 5, TITLE_COLOR);
6765
}
6866

src/main/resources/fabric.mod.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
"fabricloader": ">=0.7.4",
3434
"fabric-screen-api-v1": ">=1.0.4",
3535
"fabric-key-binding-api-v1": ">=1.0.1",
36-
"minecraft": ">=1.20.2"
36+
"minecraft": "~1.20.3"
3737
}
3838
}

0 commit comments

Comments
 (0)