Skip to content

Commit fd0c01f

Browse files
committed
feat: update to 1.20.4
1 parent 1e19607 commit fd0c01f

File tree

15 files changed

+52
-49
lines changed

15 files changed

+52
-49
lines changed

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
Update to support NeoForge. 1.20.4 will come later in the week :)
2-
1+
1.20.4 support with no further API changes.

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@
1414

1515
JamLib is the platform-agnostic, Architectury based library used in all of our mods.
1616

17-
### A Note on Versions
18-
19-
As I undertake the process of updating all of my mods to support Forge, JamLib versions will be a bit confusing.
20-
21-
- Using Forge? Use the latest version.
22-
- Using Fabric and a mod that doesn't yet have a Forge version? Use `V0.6.2`.
23-
2417
## Features
2518

2619
- [x] Config using JSON5

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,5 @@ tasks.publish {
8686
dependsOn("fabric:publishUnified")
8787
dependsOn("quilt:publishUnified")
8888
dependsOn("forge:publishUnified")
89+
dependsOn("neoforge:publishUnified")
8990
}

common/src/main/java/io/github/jamalam360/jamlib/config/gui/ConfigScreen.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ protected void init() {
104104
)
105105
);
106106

107-
ConfigEntryList list = new ConfigEntryList(this.minecraft, this.width, this.height, 32, this.height - 32, 25);
107+
ConfigEntryList list = new ConfigEntryList(this.minecraft, this.width, this.height - 64, 32, 25);
108108

109109
if (this.entries.size() == 0) {
110110
for (Field field : this.manager.getConfigClass().getDeclaredFields()) {
@@ -523,8 +523,8 @@ private static Type fromField(Field field) {
523523
}
524524

525525
private class ConfigEntryList extends SelectionList {
526-
public ConfigEntryList(Minecraft minecraft, int i, int j, int k, int l, int m) {
527-
super(minecraft, i, j, k, l, m);
526+
public ConfigEntryList(Minecraft minecraft, int width, int height, int y, int itemHeight) {
527+
super(minecraft, width, height, y, itemHeight);
528528
}
529529

530530
protected void addEntry(GuiEntry entry) {

common/src/main/java/io/github/jamalam360/jamlib/config/gui/SelectConfigScreen.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected void init() {
4242

4343
this.addRenderableWidget(Button.builder(CommonComponents.GUI_DONE, button -> Objects.requireNonNull(this.minecraft).setScreen(this.parent)).pos(this.width / 2 - 75, this.height - 28).size(150, 20).build());
4444

45-
ConfigSelectionList list = new ConfigSelectionList(this.minecraft, this.width, this.height, 32, this.height - 32, 25);
45+
ConfigSelectionList list = new ConfigSelectionList(this.minecraft, this.width, this.height - 64, 32, 25);
4646
ConfigManager.MANAGERS.values().stream().filter(m -> m.getModId().equals(this.modId)).forEach(list::addEntry);
4747
this.addRenderableWidget(list);
4848
}
@@ -59,8 +59,8 @@ public void renderBackground(GuiGraphics graphics, int i, int j, float f) {
5959
}
6060

6161
private static class ConfigSelectionList extends SelectionList {
62-
public ConfigSelectionList(Minecraft minecraft, int i, int j, int k, int l, int m) {
63-
super(minecraft, i, j, k, l, m);
62+
public ConfigSelectionList(Minecraft minecraft, int width, int height, int y, int itemHeight) {
63+
super(minecraft, width, height, y, itemHeight);
6464
}
6565

6666
private void addEntry(ConfigManager<?> manager) {

common/src/main/java/io/github/jamalam360/jamlib/config/gui/SelectionList.java

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,28 @@
1010

1111
@ApiStatus.Internal
1212
public class SelectionList extends ContainerObjectSelectionList<SelectionListEntry> {
13-
public SelectionList(Minecraft minecraft, int i, int j, int k, int l, int m) {
14-
super(minecraft, i, j, k, l, m);
13+
public SelectionList(Minecraft minecraft, int width, int height, int y, int itemHeight) {
14+
super(minecraft, width, height, y, itemHeight);
1515
this.centerListVertically = false;
1616
}
17+
//
18+
// @Override
19+
// public void render(GuiGraphics graphics, int mouseX, int mouseY, float delta) {
20+
// super.render(graphics, mouseX, mouseY, delta);
21+
// SelectionListEntry hovered = this.getHoveredEntry(mouseX, mouseY);
22+
//
23+
// if (hovered != null) {
24+
// if (hovered.getTooltip() != null) {
25+
// graphics.renderTooltip(Minecraft.getInstance().font, hovered.getTooltip(), mouseX, mouseY);
26+
// }
27+
// }
28+
// }
29+
1730

1831
@Override
19-
public void render(GuiGraphics graphics, int mouseX, int mouseY, float delta) {
20-
super.render(graphics, mouseX, mouseY, delta);
32+
public void renderWidget(GuiGraphics graphics, int mouseX, int mouseY, float delta) {
33+
super.renderWidget(graphics, mouseX, mouseY, delta);
34+
2135
SelectionListEntry hovered = this.getHoveredEntry(mouseX, mouseY);
2236

2337
if (hovered != null) {

fabric/src/main/resources/fabric.mod.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@
2727
"jamlib.mixins.json"
2828
],
2929
"depends": {
30-
"fabricloader": ">=0.14",
3130
"fabric": "*",
32-
"minecraft": ">=1.20",
33-
"java": ">=17",
34-
"architectury": ">=9.1.12"
31+
"minecraft": ">=1.20.4",
32+
"architectury": ">=11.0.9"
3533
}
3634
}

forge/build.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,11 @@ if (System.getenv("CURSEFORGE_API_KEY") != null && System.getenv("MODRINTH_API_K
6565
curseforge {
6666
token = System.getenv("CURSEFORGE_API_KEY")
6767
id = "623764"
68-
gameLoaders.add("NeoForge")
6968
}
7069

7170
modrinth {
7271
token = System.getenv("MODRINTH_API_KEY")
7372
id = "IYY9Siz8"
74-
gameLoaders.add("neoforge")
7573
}
7674
}
7775
}

forge/src/main/resources/META-INF/mods.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ side = "BOTH"
2424
[[dependencies.jamlib]]
2525
modId = "minecraft"
2626
mandatory = true
27-
versionRange = "[1.20,1.21)"
27+
versionRange = "[1.20.4,)"
2828
ordering = "NONE"
2929
side = "BOTH"
3030

3131
[[dependencies.jamlib]]
3232
modId = "architectury"
3333
mandatory = true
34-
versionRange = "[9.1.12,)"
34+
versionRange = "[11.0.9,)"
3535
ordering = "AFTER"
3636
side = "BOTH"

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
org.gradle.jvmargs=-Xmx3G
22
org.gradle.daemon=false
33
org.gradle.parallel=true
4-
version=1.0.3+1.20.2
5-
minecraft_version=1.20.2
6-
branch=1.20.2
4+
version=1.0.3+1.20.4
5+
minecraft_version=1.20.4
6+
branch=main
77
group=io.github.jamalam360
88
mod_name=JamLib
99
mod_id=jamlib

0 commit comments

Comments
 (0)