From 67901d82c535d1d6db2f52d0ce1e5738db6d1b91 Mon Sep 17 00:00:00 2001 From: coolGi Date: Sat, 9 Dec 2023 14:09:24 +1030 Subject: [PATCH 01/13] Updated to 1.20.3/4 (cherry picked from commit 5b81ca27168550811c7c55e6c17e56284c3b970c) --- .../common/wrappers/gui/ClassicConfigGUI.java | 10 ++-- .../common/wrappers/gui/MinecraftScreen.java | 16 +++--- .../wrappers/gui/updater/ChangelogScreen.java | 16 +++--- .../wrappers/gui/updater/UpdateModScreen.java | 6 +-- .../minecraft/MinecraftClientWrapper.java | 4 ++ .../minecraft/MinecraftRenderWrapper.java | 22 ++++---- .../wrappers/modAccessor/BCLibAccessor.java | 4 +- versionProperties/1.20.4.properties | 51 +++++++++++++++++++ 8 files changed, 98 insertions(+), 31 deletions(-) create mode 100644 versionProperties/1.20.4.properties diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/ClassicConfigGUI.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/ClassicConfigGUI.java index 0df21fe0c..7639dc12c 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/ClassicConfigGUI.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/ClassicConfigGUI.java @@ -278,7 +278,7 @@ public class ClassicConfigGUI Objects.requireNonNull(minecraft).setScreen(parent); })); - this.list = new ConfigListWidget(this.minecraft, this.width * 2, this.height, 32, this.height - 32, 25); + this.list = new ConfigListWidget(this.minecraft, this.width * 2, this.height, 32, this.height - 32); if (this.minecraft != null && this.minecraft.level != null) this.list.setRenderBackground(false); @@ -537,9 +537,13 @@ public class ClassicConfigGUI { Font textRenderer; - public ConfigListWidget(Minecraft minecraftClient, int i, int j, int k, int l, int m) + public ConfigListWidget(Minecraft minecraftClient, int i, int j, int k, int l) { - super(minecraftClient, i, j, k, l, m); + #if PRE_MC_1_20_4 + super(minecraftClient, i, j, k, l, 25); + #else + super(minecraftClient, i, j, k, l); + #endif this.centerListVertically = false; textRenderer = minecraftClient.font; } diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/MinecraftScreen.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/MinecraftScreen.java index 716c98775..e90f235f5 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/MinecraftScreen.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/MinecraftScreen.java @@ -59,7 +59,7 @@ public class MinecraftScreen screen.scaledHeight = this.height; screen.init(); // Init our own config screen - this.list = new ConfigListWidget(this.minecraft, this.width, this.height, 0, this.height, 25); // Select the area to tint + this.list = new ConfigListWidget(this.minecraft, this.width, this.height, 0, this.height); // Select the area to tint if (this.minecraft != null && this.minecraft.level != null) // Check if in game this.list.setRenderBackground(false); // Disable from rendering this.addWidget(this.list); // Add the tint to the things to be rendered @@ -72,10 +72,10 @@ public class MinecraftScreen public void render(GuiGraphics matrices, int mouseX, int mouseY, float delta) #endif { - #if MC_1_20_2 - this.renderBackground(matrices, mouseX, mouseY, delta); // Render background - #else + #if PRE_MC_1_20_2 this.renderBackground(matrices); // Render background + #else + this.renderBackground(matrices, mouseX, mouseY, delta); // Render background #endif this.list.render(matrices, mouseX, mouseY, delta); // Renders the items in the render list (currently only used to tint background darker) @@ -131,9 +131,13 @@ public class MinecraftScreen public static class ConfigListWidget extends ContainerObjectSelectionList { - public ConfigListWidget(Minecraft minecraftClient, int i, int j, int k, int l, int m) + public ConfigListWidget(Minecraft minecraftClient, int i, int j, int k, int l) { - super(minecraftClient, i, j, k, l, m); + #if PRE_MC_1_20_4 + super(minecraftClient, i, j, k, l, 25); + #else + super(minecraftClient, i, j, k, l); + #endif this.centerListVertically = false; } diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/updater/ChangelogScreen.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/updater/ChangelogScreen.java index 5b1f6ba39..ccccd8cc8 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/updater/ChangelogScreen.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/updater/ChangelogScreen.java @@ -134,7 +134,7 @@ public class ChangelogScreen extends DhScreen ); - this.changelogArea = new TextArea(this.minecraft, this.width * 2, this.height, 32, this.height - 32, 10); + this.changelogArea = new TextArea(this.minecraft, this.width * 2, this.height, 32, this.height - 32); for (int i = 0; i < changelog.size(); i++) { this.changelogArea.addButton(TextOrLiteral(changelog.get(i))); @@ -150,10 +150,10 @@ public class ChangelogScreen extends DhScreen public void render(GuiGraphics matrices, int mouseX, int mouseY, float delta) #endif { - #if MC_1_20_2 - this.renderBackground(matrices, mouseX, mouseY, delta); // Render background - #else + #if PRE_MC_1_20_2 this.renderBackground(matrices); // Render background + #else + this.renderBackground(matrices, mouseX, mouseY, delta); // Render background #endif if (!usable) return; @@ -185,9 +185,13 @@ public class ChangelogScreen extends DhScreen { Font textRenderer; - public TextArea(Minecraft minecraftClient, int i, int j, int k, int l, int m) + public TextArea(Minecraft minecraftClient, int i, int j, int k, int l) { - super(minecraftClient, i, j, k, l, m); + #if PRE_MC_1_20_4 + super(minecraftClient, i, j, k, l, 10); + #else + super(minecraftClient, i, j, k, l); + #endif this.centerListVertically = false; textRenderer = minecraftClient.font; } diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/updater/UpdateModScreen.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/updater/UpdateModScreen.java index 70c8592c7..5addfc306 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/updater/UpdateModScreen.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/updater/UpdateModScreen.java @@ -152,10 +152,10 @@ public class UpdateModScreen extends DhScreen public void render(GuiGraphics matrices, int mouseX, int mouseY, float delta) #endif { - #if MC_1_20_2 - this.renderBackground(matrices, mouseX, mouseY, delta); // Render background - #else + #if PRE_MC_1_20_2 this.renderBackground(matrices); // Render background + #else + this.renderBackground(matrices, mouseX, mouseY, delta); // Render background #endif diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/minecraft/MinecraftClientWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/minecraft/MinecraftClientWrapper.java index 611172844..208387960 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/minecraft/MinecraftClientWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/minecraft/MinecraftClientWrapper.java @@ -282,7 +282,11 @@ public class MinecraftClientWrapper implements IMinecraftClientWrapper, IMinecra { LOGGER.error(ModInfo.READABLE_NAME + " had the following error: [" + errorMessage + "]. Crashing Minecraft...", exception); CrashReport report = new CrashReport(errorMessage, exception); + #if PRE_MC_1_20_4 Minecraft.crash(report); + #else + Minecraft.getInstance().delayCrash(report); + #endif } @Override diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/minecraft/MinecraftRenderWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/minecraft/MinecraftRenderWrapper.java index 5108d556d..6a05e158f 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/minecraft/MinecraftRenderWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/minecraft/MinecraftRenderWrapper.java @@ -44,7 +44,7 @@ import com.mojang.math.Vector3f; #else import org.joml.Vector3f; #endif -#if MC_1_20_2 +#if POST_MC_1_20_2 import net.minecraft.client.renderer.chunk.SectionRenderDispatcher; #endif @@ -321,16 +321,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper { try { - #if MC_1_20_2 - LevelRenderer levelRenderer = MC.levelRenderer; - Collection chunks = levelRenderer.visibleSections; - - return (chunks.stream().map((chunk) -> { - AABB chunkBoundingBox = chunk.getBoundingBox(); - return new DhChunkPos(Math.floorDiv((int) chunkBoundingBox.minX, 16), - Math.floorDiv((int) chunkBoundingBox.minZ, 16)); - }).collect(Collectors.toCollection(HashSet::new))); - #else + #if PRE_MC_1_20_2 LevelRenderer levelRenderer = MC.levelRenderer; Collection chunks = #if PRE_MC_1_18_2 levelRenderer.renderChunks; @@ -343,6 +334,15 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper return new DhChunkPos(Math.floorDiv((int) chunkBoundingBox.minX, 16), Math.floorDiv((int) chunkBoundingBox.minZ, 16)); }).collect(Collectors.toCollection(HashSet::new))); + #else + LevelRenderer levelRenderer = MC.levelRenderer; + Collection chunks = levelRenderer.visibleSections; + + return (chunks.stream().map((chunk) -> { + AABB chunkBoundingBox = chunk.getBoundingBox(); + return new DhChunkPos(Math.floorDiv((int) chunkBoundingBox.minX, 16), + Math.floorDiv((int) chunkBoundingBox.minZ, 16)); + }).collect(Collectors.toCollection(HashSet::new))); #endif } catch (LinkageError e) diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/BCLibAccessor.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/BCLibAccessor.java index 968a98086..a12f1f0a4 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/BCLibAccessor.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/BCLibAccessor.java @@ -1,7 +1,7 @@ package com.seibel.distanthorizons.fabric.wrappers.modAccessor; import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IBCLibAccessor; -#if MC_1_16_5 || MC_1_17_1 +#if MC_1_16_5 || MC_1_17_1 || MC_1_20_4 // These versions either don't have BCLib, or the implementation is different #elif MC_1_18_2 import ru.bclib.config.ClientConfig; import ru.bclib.config.Configs; @@ -17,7 +17,7 @@ public class BCLibAccessor implements IBCLibAccessor public void setRenderCustomFog(boolean newValue) { - #if !(MC_1_16_5 || MC_1_17_1) // 1.16 and 1.17 don't have "ClientConfig.CUSTOM_FOG_RENDERING" + #if !(MC_1_16_5 || MC_1_17_1 || MC_1_20_4) // These versions either don't have BCLib, or the implementation is different // Change the value of CUSTOM_FOG_RENDERING in the bclib client config // This disabled fog from rendering within bclib diff --git a/versionProperties/1.20.4.properties b/versionProperties/1.20.4.properties new file mode 100644 index 000000000..3edc33c15 --- /dev/null +++ b/versionProperties/1.20.4.properties @@ -0,0 +1,51 @@ +# 1.20.4 version +java_version=17 +minecraft_version=1.20.4 +parchment_version=1.20.1:2023.09.03 +compatible_minecraft_versions=["1.20.4", "1.20.3"] +accessWidenerVersion=1_20_2 +builds_for=fabric,forge + +# Fabric loader +fabric_loader_version=0.15.1 +fabric_api_version=0.91.2+1.20.4 + # Fabric mod versions + modmenu_version=9.0.0-pre.1 + starlight_version_fabric= + phosphor_version_fabric= + lithium_version= + sodium_version=mc1.20.3-0.5.4 + iris_version=1.6.13+1.20.4 + bclib_version= + immersive_portals_version= + canvas_version= + + fabric_incompatibility_list={ } + fabric_recommend_list={ "indium": "*" } + + # Fabric mod run + # 0 = Don't enable and don't run + # 1 = Can be referenced in code but doesn't run + # 2 = Can be referenced in code and runs in client + enable_starlight=0 + enable_phosphor=0 + enable_sodium=1 + enable_lithium=0 + enable_iris=1 + enable_bclib=0 + enable_immersive_portals=0 + enable_canvas=0 + +# Forge loader +forge_version=49.0.3 + # Forge mod versions + starlight_version_forge= + terraforged_version= + + # Forge mod run + # 0 = Don't enable and don't run + # 1 = Can be referenced in code but doesn't run + # 2 = Can be referenced in code and runs in client + enable_starlight_forge=0 + enable_terraforged=0 + enable_terrafirmacraft=0 From d3f953686a0f17e5f434f53d1afd724eba09d29e Mon Sep 17 00:00:00 2001 From: coolGi Date: Sat, 9 Dec 2023 14:41:15 +1030 Subject: [PATCH 02/13] Fixed up screens looking incorrect on 1.20.4 mc versions (cherry picked from commit 04ddd8351951228474c0e05a7cfa7e534c1342b7) --- .../common/wrappers/gui/ClassicConfigGUI.java | 8 ++++---- .../common/wrappers/gui/MinecraftScreen.java | 8 ++++---- .../common/wrappers/gui/updater/ChangelogScreen.java | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/ClassicConfigGUI.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/ClassicConfigGUI.java index 7639dc12c..ac5a98482 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/ClassicConfigGUI.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/ClassicConfigGUI.java @@ -278,7 +278,7 @@ public class ClassicConfigGUI Objects.requireNonNull(minecraft).setScreen(parent); })); - this.list = new ConfigListWidget(this.minecraft, this.width * 2, this.height, 32, this.height - 32); + this.list = new ConfigListWidget(this.minecraft, this.width * 2, this.height, 32, 32, 25); if (this.minecraft != null && this.minecraft.level != null) this.list.setRenderBackground(false); @@ -537,12 +537,12 @@ public class ClassicConfigGUI { Font textRenderer; - public ConfigListWidget(Minecraft minecraftClient, int i, int j, int k, int l) + public ConfigListWidget(Minecraft minecraftClient, int canvasWidth, int canvasHeight, int topMargin, int botMargin, int itemSpacing) { #if PRE_MC_1_20_4 - super(minecraftClient, i, j, k, l, 25); + super(minecraftClient, canvasWidth, canvasHeight, topMargin, canvasHeight - botMargin, itemSpacing); #else - super(minecraftClient, i, j, k, l); + super(minecraftClient, canvasWidth, canvasHeight - (topMargin + botMargin), topMargin, itemSpacing); #endif this.centerListVertically = false; textRenderer = minecraftClient.font; diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/MinecraftScreen.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/MinecraftScreen.java index e90f235f5..aaa804181 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/MinecraftScreen.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/MinecraftScreen.java @@ -59,7 +59,7 @@ public class MinecraftScreen screen.scaledHeight = this.height; screen.init(); // Init our own config screen - this.list = new ConfigListWidget(this.minecraft, this.width, this.height, 0, this.height); // Select the area to tint + this.list = new ConfigListWidget(this.minecraft, this.width, this.height, 0, 0, 25); // Select the area to tint if (this.minecraft != null && this.minecraft.level != null) // Check if in game this.list.setRenderBackground(false); // Disable from rendering this.addWidget(this.list); // Add the tint to the things to be rendered @@ -131,12 +131,12 @@ public class MinecraftScreen public static class ConfigListWidget extends ContainerObjectSelectionList { - public ConfigListWidget(Minecraft minecraftClient, int i, int j, int k, int l) + public ConfigListWidget(Minecraft minecraftClient, int canvasWidth, int canvasHeight, int topMargin, int botMargin, int itemSpacing) { #if PRE_MC_1_20_4 - super(minecraftClient, i, j, k, l, 25); + super(minecraftClient, canvasWidth, canvasHeight, topMargin, canvasHeight - botMargin, itemSpacing); #else - super(minecraftClient, i, j, k, l); + super(minecraftClient, canvasWidth, canvasHeight - (topMargin + botMargin), topMargin, itemSpacing); #endif this.centerListVertically = false; } diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/updater/ChangelogScreen.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/updater/ChangelogScreen.java index ccccd8cc8..0b3b493db 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/updater/ChangelogScreen.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/updater/ChangelogScreen.java @@ -134,7 +134,7 @@ public class ChangelogScreen extends DhScreen ); - this.changelogArea = new TextArea(this.minecraft, this.width * 2, this.height, 32, this.height - 32); + this.changelogArea = new TextArea(this.minecraft, this.width * 2, this.height, 32, 32, 10); for (int i = 0; i < changelog.size(); i++) { this.changelogArea.addButton(TextOrLiteral(changelog.get(i))); @@ -185,12 +185,12 @@ public class ChangelogScreen extends DhScreen { Font textRenderer; - public TextArea(Minecraft minecraftClient, int i, int j, int k, int l) + public TextArea(Minecraft minecraftClient, int canvasWidth, int canvasHeight, int topMargin, int botMargin, int itemSpacing) { #if PRE_MC_1_20_4 - super(minecraftClient, i, j, k, l, 10); + super(minecraftClient, canvasWidth, canvasHeight, topMargin, canvasHeight - botMargin, itemSpacing); #else - super(minecraftClient, i, j, k, l); + super(minecraftClient, canvasWidth, canvasHeight - (topMargin + botMargin), topMargin, itemSpacing); #endif this.centerListVertically = false; textRenderer = minecraftClient.font; From 4467af4798c5f8ff426e8d8f2b21a2569f59c6a0 Mon Sep 17 00:00:00 2001 From: coolGi Date: Sat, 9 Dec 2023 04:17:50 +0000 Subject: [PATCH 03/13] Updated ci to include 1.20.4 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2b2e0acab..8097c0218 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,7 +30,7 @@ build: stage: build parallel: matrix: - - MC_VER: ["1.16.5", "1.17.1", "1.18.2", "1.19.2", "1.19.4", "1.20.1", "1.20.2"] + - MC_VER: ["1.16.5", "1.17.1", "1.18.2", "1.19.2", "1.19.4", "1.20.1", "1.20.2", "1.20.4"] script: # this both runs the unit tests and assembles the code - ./gradlew clean -PmcVer="${MC_VER}" -PinfoGitCommit="${CI_COMMIT_SHA}" -PinfoGitBranch="${CI_COMMIT_BRANCH}" -PinfoBuildSource="GitLab CI (${CI_PIPELINE_ID})" --gradle-user-home cache/; From 4d53ec5b64110b6c07b74b97e87182ee9478f633 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Tue, 12 Dec 2023 07:47:22 -0600 Subject: [PATCH 04/13] Fix forge 1.20.4 crashing due to incorrect version number order (cherry picked from commit d597634ac6e005c6b07345848c902d836b030cd7) --- versionProperties/1.20.4.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versionProperties/1.20.4.properties b/versionProperties/1.20.4.properties index 3edc33c15..5cec6abec 100644 --- a/versionProperties/1.20.4.properties +++ b/versionProperties/1.20.4.properties @@ -2,7 +2,7 @@ java_version=17 minecraft_version=1.20.4 parchment_version=1.20.1:2023.09.03 -compatible_minecraft_versions=["1.20.4", "1.20.3"] +compatible_minecraft_versions=["1.20.3", "1.20.4"] accessWidenerVersion=1_20_2 builds_for=fabric,forge From 2c6849a0fd101250e7f646d976850514ea3b3d40 Mon Sep 17 00:00:00 2001 From: coolGi Date: Tue, 12 Dec 2023 19:28:41 +1030 Subject: [PATCH 05/13] Updated to new git url (cherry picked from commit 0d7b0f9fe429e0f1c0e3d3563202c4265cde1dca) --- .gitlab/issue_templates/Bug.md | 6 +++--- .gitlab/issue_templates/FeatureRequest.md | 2 +- .gitlab/issue_templates/ImprovementRequest.md | 2 +- Readme.md | 4 ++-- contributing.md | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.gitlab/issue_templates/Bug.md b/.gitlab/issue_templates/Bug.md index a6eb95cc2..09f88a5d9 100644 --- a/.gitlab/issue_templates/Bug.md +++ b/.gitlab/issue_templates/Bug.md @@ -6,13 +6,13 @@ Or click the checkbox once the issue has been created. --> 1. [ ] Check the FAQ to see if your issue has already been reported and has a solution: - [Problems-and-solutions](https://gitlab.com/jeseibel/minecraft-lod-mod/-/wikis/2-frequently-asked-questions/2-problems-and-solutions/Problems-and-Solutions) + [Problems-and-solutions](https://gitlab.com/jeseibel/distant-horizons/-/wikis/2-frequently-asked-questions/2-problems-and-solutions/Problems-and-Solutions) 2. [ ] Make sure you are not using any mods on the incompatible list: - [Mod support FAQ](https://gitlab.com/jeseibel/minecraft-lod-mod/-/wikis/2-frequently-asked-questions/4-mod-support/Mod-Support) + [Mod support FAQ](https://gitlab.com/jeseibel/distant-horizons/-/wikis/2-frequently-asked-questions/4-mod-support/Mod-Support) 3. [ ] Check the existing issues to verify that your bug hasn't already been submitted: - [Issues](https://gitlab.com/jeseibel/minecraft-lod-mod/-/issues/) + [Issues](https://gitlab.com/jeseibel/distant-horizons/-/issues/) 4. [ ] Upload Minecraft's crash report and/or log. \ Minecraft crash reports are located in: `.minecraft/crash-reports` \ diff --git a/.gitlab/issue_templates/FeatureRequest.md b/.gitlab/issue_templates/FeatureRequest.md index cc66352f2..0be5723bf 100644 --- a/.gitlab/issue_templates/FeatureRequest.md +++ b/.gitlab/issue_templates/FeatureRequest.md @@ -1,4 +1,4 @@ -- [ ] Check the existing [feature requests](https://gitlab.com/jeseibel/minecraft-lod-mod/-/issues/?sort=updated_desc&state=opened&label_name%5B%5D=Feature) to verify that your feature hasn't already been suggested. +- [ ] Check the existing [feature requests](https://gitlab.com/jeseibel/distant-horizons/-/issues/?sort=updated_desc&state=opened&label_name%5B%5D=Feature) to verify that your feature hasn't already been suggested. 1. **Describe the feature**: diff --git a/.gitlab/issue_templates/ImprovementRequest.md b/.gitlab/issue_templates/ImprovementRequest.md index 735cb48a7..34153c989 100644 --- a/.gitlab/issue_templates/ImprovementRequest.md +++ b/.gitlab/issue_templates/ImprovementRequest.md @@ -1,3 +1,3 @@ -1. Check the existing [improvement requests](https://gitlab.com/jeseibel/minecraft-lod-mod/-/issues/?sort=updated_desc&state=all&label_name%5B%5D=Improvement) to verify that your improvement hasn't already been suggested. +1. Check the existing [improvement requests](https://gitlab.com/jeseibel/distant-horizons/-/issues/?sort=updated_desc&state=all&label_name%5B%5D=Improvement) to verify that your improvement hasn't already been suggested. 2. **Describe the improvement**: diff --git a/Readme.md b/Readme.md index f37ac9c2a..3b4746edb 100644 --- a/Readme.md +++ b/Readme.md @@ -115,7 +115,7 @@ To switch between different Minecraft versions, change `mcVer=1.?` in the `gradl If running in an IDE, to ensure the IDE noticed the version change, run any gradle command to refresh gradle. (In IntellJ you will also need to do a gradle sync if it didn't happen automatically.) >Note: There may be a `java.nio.file.FileSystemException` thrown when running the command after switching versions. To fix it, either restart your IDE (as your IDE is probably locking a file) or use a tool like LockHunter to unlock the linked file(s). (Generally it is a lib file under `common\build\lib`, `forge\build\lib`, or `fabric\build\lib`). \ > If anyone knows how to solve this issue please let us know here: \ -> https://gitlab.com/jeseibel/minecraft-lod-mod/-/issues/233 +> https://gitlab.com/jeseibel/distant-horizons/-/issues/233
@@ -134,7 +134,7 @@ From the File Explorer: 6. The compiled jar file will be in the folder `Merged` From the command line: -1. `git clone --recurse-submodules https://gitlab.com/jeseibel/minecraft-lod-mod.git` +1. `git clone --recurse-submodules https://gitlab.com/gitlab.com/jeseibel/distant-horizons.git` 2. `cd minecraft-lod-mod` 3. `./gradlew assemble` 4. `./gradlew mergeJars` diff --git a/contributing.md b/contributing.md index 13981c4cf..45e1b6118 100644 --- a/contributing.md +++ b/contributing.md @@ -14,7 +14,7 @@ By sending a merge request, you agree to abide by the Distant Horizons [Contribu Contributions to this project are under the [lesser GPL v3 license](LICENSE.txt) Copyright James Seibel, so please include the [license header](license_header.txt) at the top of any new code files. 1. Fork, then clone the repo: \ -`git clone --recurse-submodules https://gitlab.com/jeseibel/minecraft-lod-mod.git` +`git clone --recurse-submodules https://gitlab.com/jeseibel/distant-horizons.git` 2. Set up your dev environment: \ `./gradlew build` @@ -37,13 +37,13 @@ Contributions to this project are under the [lesser GPL v3 license](LICENSE.txt) `./gradlew fabric:runClient` \ When running the game, load or generate a world to confirm Distant Horizons initializes correctly. -9. Push to your fork, make sure to include the Core submodule, and submit a [new merge request](https://gitlab.com/jeseibel/minecraft-lod-mod/-/merge_requests/new). +9. Push to your fork, make sure to include the Core submodule, and submit a [new merge request](https://gitlab.com/jeseibel/distant-horizons/-/merge_requests/new). ## General Guidelines -* Check the existing issue list to verify that a given [bug](https://gitlab.com/jeseibel/minecraft-lod-mod/-/issues/?sort=created_date&state=opened&label_name%5B%5D=Bug&first_page_size=100), [feature](https://gitlab.com/jeseibel/minecraft-lod-mod/-/issues/?sort=created_date&state=opened&label_name%5B%5D=Feature&first_page_size=100), or [improvement](https://gitlab.com/jeseibel/minecraft-lod-mod/-/issues/?sort=created_date&state=opened&label_name%5B%5D=Improvement&first_page_size=100) hasn't already been submitted. +* Check the existing issue list to verify that a given [bug](https://gitlab.com/jeseibel/distant-horizons/-/issues/?sort=created_date&state=opened&label_name%5B%5D=Bug&first_page_size=100), [feature](https://gitlab.com/jeseibel/distant-horizons/-/issues/?sort=created_date&state=opened&label_name%5B%5D=Feature&first_page_size=100), or [improvement](https://gitlab.com/jeseibel/distant-horizons/-/issues/?sort=created_date&state=opened&label_name%5B%5D=Improvement&first_page_size=100) hasn't already been submitted. * Please open an issue if things aren't working as expected. * Open a merge request to: fix bugs, fix documentations, improve an existing system, or complete a feature. * When contributing: From 0d565895e22b5219f34aa2f836a538a4e1b2b66b Mon Sep 17 00:00:00 2001 From: coolGi Date: Sat, 23 Dec 2023 04:07:44 +1030 Subject: [PATCH 06/13] Fixed 1.20.4 forge remap (cherry picked from commit 28d4cc86a9519ccbf4e5f1e81324ff14f55f76c5) --- .../forge/mixins/client/MixinDynamicTexture.java | 7 ++++++- .../forge/mixins/client/MixinLevelRenderer.java | 3 +++ .../forge/mixins/client/MixinLightTexture.java | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinDynamicTexture.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinDynamicTexture.java index 3f02eb37d..4efbcd350 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinDynamicTexture.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinDynamicTexture.java @@ -38,14 +38,19 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import javax.annotation.Nullable; + @Mixin(DynamicTexture.class) -public class MixinDynamicTexture implements ILightTextureMarker +public abstract class MixinDynamicTexture implements ILightTextureMarker { /** Used to prevent accidentally using other dynamic textures as a lightmap */ @Unique private boolean isLightTexture = false; @Shadow + #if MC_VER >= MC_1_20_4 + (remap = false) + #endif @Final private NativeImage pixels; diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLevelRenderer.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLevelRenderer.java index 2239adb4f..f11c3f6ab 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLevelRenderer.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLevelRenderer.java @@ -74,6 +74,9 @@ import org.lwjgl.opengl.GL15; public class MixinLevelRenderer { @Shadow + #if MC_VER >= MC_1_20_4 + (remap = false) + #endif private ClientLevel level; @Unique private static float previousPartialTicks = 0; diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLightTexture.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLightTexture.java index f350a1754..9bafb8a8f 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLightTexture.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLightTexture.java @@ -36,6 +36,9 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; public class MixinLightTexture { @Shadow + #if MC_VER >= MC_1_20_4 + (remap = false) + #endif @Final private DynamicTexture lightTexture; From 749921b436bcd9c9ebbfdda8439c3adaab681076 Mon Sep 17 00:00:00 2001 From: coolGi Date: Sat, 23 Dec 2023 15:39:20 +1030 Subject: [PATCH 07/13] Hopefully fixed forge stable on 1.20.4 --- .../forge/mixins/client/MixinDynamicTexture.java | 2 +- .../distanthorizons/forge/mixins/client/MixinLevelRenderer.java | 2 +- .../distanthorizons/forge/mixins/client/MixinLightTexture.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinDynamicTexture.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinDynamicTexture.java index 4efbcd350..75d0da110 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinDynamicTexture.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinDynamicTexture.java @@ -48,7 +48,7 @@ public abstract class MixinDynamicTexture implements ILightTextureMarker private boolean isLightTexture = false; @Shadow - #if MC_VER >= MC_1_20_4 + #if POST_MC_1_20_4 (remap = false) #endif @Final diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLevelRenderer.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLevelRenderer.java index f11c3f6ab..0b488b6ed 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLevelRenderer.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLevelRenderer.java @@ -74,7 +74,7 @@ import org.lwjgl.opengl.GL15; public class MixinLevelRenderer { @Shadow - #if MC_VER >= MC_1_20_4 + #if POST_MC_1_20_4 (remap = false) #endif private ClientLevel level; diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLightTexture.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLightTexture.java index 9bafb8a8f..5fea5abfb 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLightTexture.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLightTexture.java @@ -36,7 +36,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; public class MixinLightTexture { @Shadow - #if MC_VER >= MC_1_20_4 + #if POST_MC_1_20_4 (remap = false) #endif @Final From 513cecf31810f4b500db4595ed2bae039760baff Mon Sep 17 00:00:00 2001 From: coolGi Date: Sun, 24 Dec 2023 19:03:31 +1030 Subject: [PATCH 08/13] Revert "Hopefully fixed forge stable on 1.20.4" This reverts commit 749921b436bcd9c9ebbfdda8439c3adaab681076. --- .../forge/mixins/client/MixinDynamicTexture.java | 2 +- .../distanthorizons/forge/mixins/client/MixinLevelRenderer.java | 2 +- .../distanthorizons/forge/mixins/client/MixinLightTexture.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinDynamicTexture.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinDynamicTexture.java index 75d0da110..4efbcd350 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinDynamicTexture.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinDynamicTexture.java @@ -48,7 +48,7 @@ public abstract class MixinDynamicTexture implements ILightTextureMarker private boolean isLightTexture = false; @Shadow - #if POST_MC_1_20_4 + #if MC_VER >= MC_1_20_4 (remap = false) #endif @Final diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLevelRenderer.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLevelRenderer.java index 0b488b6ed..f11c3f6ab 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLevelRenderer.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLevelRenderer.java @@ -74,7 +74,7 @@ import org.lwjgl.opengl.GL15; public class MixinLevelRenderer { @Shadow - #if POST_MC_1_20_4 + #if MC_VER >= MC_1_20_4 (remap = false) #endif private ClientLevel level; diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLightTexture.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLightTexture.java index 5fea5abfb..9bafb8a8f 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLightTexture.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLightTexture.java @@ -36,7 +36,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; public class MixinLightTexture { @Shadow - #if POST_MC_1_20_4 + #if MC_VER >= MC_1_20_4 (remap = false) #endif @Final From c620086ed19eb523dfde8345683bcc651bced9b0 Mon Sep 17 00:00:00 2001 From: coolGi Date: Sun, 24 Dec 2023 19:03:38 +1030 Subject: [PATCH 09/13] Revert "Fixed 1.20.4 forge remap" This reverts commit 0d565895e22b5219f34aa2f836a538a4e1b2b66b. --- .../forge/mixins/client/MixinDynamicTexture.java | 7 +------ .../forge/mixins/client/MixinLevelRenderer.java | 3 --- .../forge/mixins/client/MixinLightTexture.java | 3 --- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinDynamicTexture.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinDynamicTexture.java index 4efbcd350..3f02eb37d 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinDynamicTexture.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinDynamicTexture.java @@ -38,19 +38,14 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import javax.annotation.Nullable; - @Mixin(DynamicTexture.class) -public abstract class MixinDynamicTexture implements ILightTextureMarker +public class MixinDynamicTexture implements ILightTextureMarker { /** Used to prevent accidentally using other dynamic textures as a lightmap */ @Unique private boolean isLightTexture = false; @Shadow - #if MC_VER >= MC_1_20_4 - (remap = false) - #endif @Final private NativeImage pixels; diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLevelRenderer.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLevelRenderer.java index f11c3f6ab..2239adb4f 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLevelRenderer.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLevelRenderer.java @@ -74,9 +74,6 @@ import org.lwjgl.opengl.GL15; public class MixinLevelRenderer { @Shadow - #if MC_VER >= MC_1_20_4 - (remap = false) - #endif private ClientLevel level; @Unique private static float previousPartialTicks = 0; diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLightTexture.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLightTexture.java index 9bafb8a8f..f350a1754 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLightTexture.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinLightTexture.java @@ -36,9 +36,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; public class MixinLightTexture { @Shadow - #if MC_VER >= MC_1_20_4 - (remap = false) - #endif @Final private DynamicTexture lightTexture; From cb4c32e0a9c00dc111ebbddf413dee62b4866b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3zsa=20P=C3=A9ter?= Date: Sun, 24 Dec 2023 13:47:11 +0000 Subject: [PATCH 10/13] Fix clone URL (cherry picked from commit 39b77c783b260fa7c0fc3e88095fe0605cb67b56) --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 3b4746edb..f51af7521 100644 --- a/Readme.md +++ b/Readme.md @@ -134,7 +134,7 @@ From the File Explorer: 6. The compiled jar file will be in the folder `Merged` From the command line: -1. `git clone --recurse-submodules https://gitlab.com/gitlab.com/jeseibel/distant-horizons.git` +1. `git clone --recurse-submodules https://gitlab.com/jeseibel/distant-horizons.git` 2. `cd minecraft-lod-mod` 3. `./gradlew assemble` 4. `./gradlew mergeJars` From 53e2c4f806c8c23d13b1ec567c02a3b69822dd13 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sun, 7 Jan 2024 21:56:54 -0600 Subject: [PATCH 11/13] update 1.20.4 forge 49.0.3 -> 49.0.14 --- versionProperties/1.20.4.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versionProperties/1.20.4.properties b/versionProperties/1.20.4.properties index 5cec6abec..31c0b6c76 100644 --- a/versionProperties/1.20.4.properties +++ b/versionProperties/1.20.4.properties @@ -37,7 +37,7 @@ fabric_api_version=0.91.2+1.20.4 enable_canvas=0 # Forge loader -forge_version=49.0.3 +forge_version=49.0.14 # Forge mod versions starlight_version_forge= terraforged_version= From 5abbff42d8217e4ea79a0d25c2b528cc836bb914 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sun, 7 Jan 2024 21:57:13 -0600 Subject: [PATCH 12/13] update manifold 2023.1.29 -> 23.1.31 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 6acf4eaba..6592d9c1d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,7 +18,7 @@ mod_issues=https://gitlab.com/jeseibel/distant-horizons/-/issues mod_discord=https://discord.gg/xAB8G4cENx # Global Plugin Versions -manifold_version=2023.1.29 +manifold_version=2023.1.31 nightconfig_version=3.6.6 lz4_version=1.8.0 sqlite_jdbc_version=3.43.0.0 From f0f864d8246764b6d2b69088780add5254878c9f Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sun, 7 Jan 2024 21:58:09 -0600 Subject: [PATCH 13/13] update architectury.loom 1.1 -> 1.3 and gradle 7.6 -> 8.1 gradle update was required by architectury --- build.gradle | 2 +- fabric/build.gradle | 1 - forge/build.gradle | 1 - gradle/wrapper/gradle-wrapper.properties | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 3d152fce7..ddef8baec 100644 --- a/build.gradle +++ b/build.gradle @@ -14,7 +14,7 @@ plugins { // id "org.spongepowered.gradle.vanilla" version '0.2.1-SNAPSHOT' apply false // Architectury is used here only as a replacement for forge's own loom - id "dev.architectury.loom" version "1.1.+" apply false + id "dev.architectury.loom" version "1.3.+" apply false } /** diff --git a/fabric/build.gradle b/fabric/build.gradle index 84c5e42ac..ccf5e7b7e 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -25,7 +25,6 @@ loom { remapJar { inputFile = shadowJar.archiveFile dependsOn shadowJar - classifier null } configurations { diff --git a/forge/build.gradle b/forge/build.gradle index 2a2753f91..ec9aca1e3 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -50,7 +50,6 @@ loom { remapJar { inputFile = shadowJar.archiveFile dependsOn shadowJar - classifier null } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9502e869d..fdb79863a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists # TODO: Wait for forge to fix gradle 8 support, once it did change gradle to a newer version -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists