From 6f8c7e8249f3b953fa18561e5b4456436bdce363 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Thu, 7 Dec 2023 07:13:43 -0600 Subject: [PATCH 01/21] Add Config API methods getApiValue() and clearValue() --- coreSubProjects | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreSubProjects b/coreSubProjects index 070b52da5..2c154613a 160000 --- a/coreSubProjects +++ b/coreSubProjects @@ -1 +1 @@ -Subproject commit 070b52da5ebfdca7b603122d5c87f24776af3761 +Subproject commit 2c154613a0ca0ff017ce833189eb6ae7d528ce51 From 5b81ca27168550811c7c55e6c17e56284c3b970c Mon Sep 17 00:00:00 2001 From: coolGi Date: Sat, 9 Dec 2023 14:09:24 +1030 Subject: [PATCH 02/21] Updated to 1.20.3/4 --- .../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 04ddd8351951228474c0e05a7cfa7e534c1342b7 Mon Sep 17 00:00:00 2001 From: coolGi Date: Sat, 9 Dec 2023 14:41:15 +1030 Subject: [PATCH 03/21] Fixed up screens looking incorrect on 1.20.4 mc versions --- .../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 8714be1dc704e40e8cbc283c4f18f2a0de407af2 Mon Sep 17 00:00:00 2001 From: coolGi Date: Sat, 9 Dec 2023 14:47:19 +1030 Subject: [PATCH 04/21] Updated ci to include 1.20.4 --- .gitlab-ci.yml | 2 +- gradle.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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/; diff --git a/gradle.properties b/gradle.properties index bdcfe672d..b57fed3ee 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 963d22b2f5121e36e39ac425283ff72046f51003 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sat, 9 Dec 2023 09:42:18 -0600 Subject: [PATCH 05/21] Add a potential fix to unconfigured C2ME crashing/log spam --- .../RegionFileStorageExternalCache.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/RegionFileStorageExternalCache.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/RegionFileStorageExternalCache.java index d5c346c70..94fc0a2c3 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/RegionFileStorageExternalCache.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/RegionFileStorageExternalCache.java @@ -1,11 +1,13 @@ package com.seibel.distanthorizons.common.wrappers.worldGeneration.mimicObject; import com.seibel.distanthorizons.common.wrappers.worldGeneration.BatchGenerationEnvironment; +import com.seibel.distanthorizons.core.logging.DhLoggerBuilder; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.NbtIo; import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.chunk.storage.RegionFile; import net.minecraft.world.level.chunk.storage.RegionFileStorage; +import org.apache.logging.log4j.Logger; import javax.annotation.Nullable; import java.io.DataInputStream; @@ -17,9 +19,13 @@ import java.util.concurrent.locks.ReentrantLock; public class RegionFileStorageExternalCache implements AutoCloseable { + private static final Logger LOGGER = DhLoggerBuilder.getLogger(); + public final RegionFileStorage storage; public static final int MAX_CACHE_SIZE = 16; + public static boolean regionCacheNullPointerWarningSent = false; + /** * Present to reduce the chance that we accidentally break underlying MC code that isn't thread safe, * specifically: "it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap.getAndMoveToFirst()" @@ -98,6 +104,19 @@ public class RegionFileStorageExternalCache implements AutoCloseable } #endif } + catch (NullPointerException e) + { + // Can sometimes happen when other mods modify the region cache system (IE C2ME) + // instead of blowing up, just use DH's cache instead + + if (!regionCacheNullPointerWarningSent) + { + regionCacheNullPointerWarningSent = true; + LOGGER.warn("Unable to access Minecraft's chunk cache. This may be due to another mod changing said cache. Falling back to DH's internal cache."); + } + + break; + } finally { this.getRegionFileLock.unlock(); From ed52efa72b2ed8a335c018a53851fac0391a3566 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sat, 9 Dec 2023 10:05:17 -0600 Subject: [PATCH 06/21] Fix SSAO and Fog not applying when Optifine shaders are enabled --- coreSubProjects | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreSubProjects b/coreSubProjects index 2c154613a..0c30c72d2 160000 --- a/coreSubProjects +++ b/coreSubProjects @@ -1 +1 @@ -Subproject commit 2c154613a0ca0ff017ce833189eb6ae7d528ce51 +Subproject commit 0c30c72d267b3704719d92f008280e2f5443fc8d From e787d7d31766b60b515ee8f1da0e00b8c4b88172 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sat, 9 Dec 2023 16:18:17 -0600 Subject: [PATCH 07/21] Attempt to fix a rare concurrent lighting engine issue with ChunkWrapper.getBlockLightPosList() --- .../distanthorizons/common/wrappers/chunk/ChunkWrapper.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java index 7f6a203b1..0bbb83552 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java @@ -374,8 +374,12 @@ public class ChunkWrapper implements IChunkWrapper } } + /** + * FIXME synchronized is necessary for a rare issue where this method is called from two separate threads at the same time + * before the list has finished populating. + */ @Override - public ArrayList getBlockLightPosList() + public synchronized ArrayList getBlockLightPosList() { // only populate the list once if (this.blockLightPosList == null) From fee1c98a341bf62919349a462040c8699a7abce2 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sat, 9 Dec 2023 16:19:05 -0600 Subject: [PATCH 08/21] Fix 595 (crash on save and exit) --- coreSubProjects | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreSubProjects b/coreSubProjects index 0c30c72d2..88d78c53f 160000 --- a/coreSubProjects +++ b/coreSubProjects @@ -1 +1 @@ -Subproject commit 0c30c72d267b3704719d92f008280e2f5443fc8d +Subproject commit 88d78c53fd3a5071366f329d4187912ba169900d From 2bb2f5a2339cc768b63f951c8efefd49d923ee5c Mon Sep 17 00:00:00 2001 From: James Seibel Date: Mon, 11 Dec 2023 07:45:54 -0600 Subject: [PATCH 09/21] Remove PRE and POST preprocessor MC versions --- build.gradle | 48 ++++++--------- .../common/forge/LodForgeMethodCaller.java | 4 +- .../common/rendering/SeamlessOverdraw.java | 4 +- .../common/wrappers/McObjectConverter.java | 6 +- .../common/wrappers/VersionConstants.java | 2 +- .../common/wrappers/WrapperFactory.java | 6 +- .../common/wrappers/block/BiomeWrapper.java | 28 ++++----- .../wrappers/block/BlockStateWrapper.java | 20 +++---- .../block/TextureAtlasSpriteWrapper.java | 4 +- .../block/TintGetterOverrideFast.java | 4 +- .../block/TintGetterOverrideSmooth.java | 4 +- .../block/TintWithoutLevelOverrider.java | 8 +-- .../TintWithoutLevelSmoothOverrider.java | 8 +-- .../block/cache/ClientBlockDetailMap.java | 2 +- .../block/cache/ClientBlockStateCache.java | 10 ++-- .../block/cache/ServerBlockDetailMap.java | 2 +- .../common/wrappers/chunk/ChunkWrapper.java | 34 +++++------ .../common/wrappers/gui/ClassicConfigGUI.java | 18 +++--- .../common/wrappers/gui/DhScreen.java | 6 +- .../common/wrappers/gui/GuiHelper.java | 14 ++--- .../common/wrappers/gui/MinecraftScreen.java | 10 ++-- .../wrappers/gui/TexturedButtonWidget.java | 23 ++++---- .../wrappers/gui/updater/ChangelogScreen.java | 16 ++--- .../wrappers/gui/updater/UpdateModScreen.java | 6 +- .../minecraft/MinecraftClientWrapper.java | 8 +-- .../minecraft/MinecraftRenderWrapper.java | 26 ++++----- .../wrappers/misc/ServerPlayerWrapper.java | 2 +- .../wrappers/world/ClientLevelWrapper.java | 2 +- .../wrappers/world/ServerLevelWrapper.java | 2 +- .../BatchGenerationEnvironment.java | 18 +++--- .../worldGeneration/GlobalParameters.java | 18 +++--- .../worldGeneration/ThreadedParameters.java | 14 ++--- .../mimicObject/ChunkLoader.java | 58 +++++++++---------- .../mimicObject/DhLitWorldGenRegion.java | 20 +++---- .../mimicObject/DummyLightEngine.java | 6 +- .../mimicObject/LightGetterAdaptor.java | 8 +-- .../RegionFileStorageExternalCache.java | 8 +-- .../WorldGenStructFeatManager.java | 28 ++++----- .../worldGeneration/step/StepBiomes.java | 10 ++-- .../worldGeneration/step/StepFeatures.java | 4 +- .../worldGeneration/step/StepNoise.java | 12 ++-- .../step/StepStructureReference.java | 2 +- .../step/StepStructureStart.java | 10 ++-- .../worldGeneration/step/StepSurface.java | 4 +- .../fabric/FabricClientProxy.java | 2 +- .../distanthorizons/fabric/FabricMain.java | 4 +- .../mixins/client/MixinClientLevel.java | 8 +-- .../client/MixinClientPacketListener.java | 6 +- .../mixins/client/MixinFogRenderer.java | 8 +-- .../mixins/client/MixinGameRenderer.java | 2 +- .../mixins/client/MixinLevelRenderer.java | 14 ++--- .../fabric/mixins/client/MixinMinecraft.java | 4 +- .../mixins/client/MixinOptionsScreen.java | 6 +- .../mixins/events/MixinServerLevel.java | 2 +- .../mods/sodium/MixinSodiumRenderer.java | 4 +- .../mixins/server/MixinChunkGenerator.java | 2 +- .../fabric/mixins/server/MixinChunkMap.java | 4 +- .../server/MixinUtilBackgroundThread.java | 4 +- .../server/unsafe/MixinThreadingDetector.java | 2 +- .../wrappers/modAccessor/BCLibAccessor.java | 6 +- .../wrappers/modAccessor/IrisAccessor.java | 2 +- .../wrappers/modAccessor/SodiumAccessor.java | 10 ++-- .../forge/ForgeClientProxy.java | 26 ++++----- .../distanthorizons/forge/ForgeMain.java | 22 +++---- .../forge/ForgeServerProxy.java | 14 ++--- .../client/MixinClientPacketListener.java | 2 +- .../forge/mixins/client/MixinFogRenderer.java | 8 +-- .../mixins/client/MixinGameRenderer.java | 2 +- .../mixins/client/MixinLevelRenderer.java | 18 +++--- .../forge/mixins/client/MixinMinecraft.java | 4 +- .../mixins/client/MixinOptionsScreen.java | 6 +- .../mixins/server/MixinChunkGenerator.java | 2 +- .../mixins/server/MixinTFChunkGenerator.java | 2 +- .../server/MixinUtilBackgroundThread.java | 4 +- .../server/unsafe/MixinThreadingDetector.java | 2 +- 75 files changed, 368 insertions(+), 381 deletions(-) diff --git a/build.gradle b/build.gradle index 3d152fce7..ca35855bc 100644 --- a/build.gradle +++ b/build.gradle @@ -23,48 +23,35 @@ plugins { * @param mcVers array of all MC versions * @param mcIndex array index of the currently active MC version */ -def writeBuildGradlePredefine(List mcVers, int mcIndex) { +def writeBuildGradlePredefine(List mcVers, int mcIndex) +{ ArrayList redefineList = new ArrayList() - - for (int i = 0; i < mcVers.size(); i++) { - String mcStr = mcVers[i].replace(".", "_") + + for (int i = 0; i < mcVers.size(); i++) + { + String fullVerStr = mcVers[i].replace(".", "_"); + String majorVerStr = fullVerStr.substring(0, fullVerStr.lastIndexOf("_")); - if (mcIndex < i) { - // exclusive before - // FIXME doesn't function correctly for 1.16.5 (IE the first item in the list) - redefineList.add("PRE_MC_" + mcStr) - } - if (mcIndex <= i) { - // inclusive before - redefineList.add("PRE_AND_MC_" + mcStr) - } - - if (mcIndex == i) { + if (mcIndex == i) + { // exact - redefineList.add("MC_" + mcStr) - } - - if (mcIndex > i) { - // inclusive after - redefineList.add("POST_AND_MC_" + mcStr) - } - if (mcIndex >= i) { - // exclusive after - redefineList.add("POST_MC_" + mcStr) + redefineList.add("MC_" + fullVerStr); + redefineList.add("MC_" + majorVerStr); } } // Build the list of preprocessors to use - StringBuilder sb = new StringBuilder() + StringBuilder sb = new StringBuilder(); - sb.append("# DON'T TOUCH THIS FILE, This is handled by the build script\n") + sb.append("# DON'T TOUCH THIS FILE, This is handled by the build script\n"); // Check if this is a development build - if (mod_version.toLowerCase().contains("dev")) { + if (mod_version.toLowerCase().contains("dev")) + { // WARNING: only use this for logging, we don't want to have confusion // when a method doesn't work correctly in the release build. - sb.append("DEV_BUILD") - sb.append("=\n") + sb.append("DEV_BUILD"); + sb.append("=\n"); } // Build the MC version preprocessors @@ -500,6 +487,7 @@ allprojects { p -> maven { url "https://maven.architectury.dev" } // For Git repositories + // navigating to the URL in a web browser allows for testing and viewing possible downloads maven { url "https://jitpack.io" } // For Manifold Preprocessor diff --git a/common/src/main/java/com/seibel/distanthorizons/common/forge/LodForgeMethodCaller.java b/common/src/main/java/com/seibel/distanthorizons/common/forge/LodForgeMethodCaller.java index 0d9b8da4a..66883973a 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/forge/LodForgeMethodCaller.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/forge/LodForgeMethodCaller.java @@ -22,7 +22,7 @@ package com.seibel.distanthorizons.common.forge; import com.seibel.distanthorizons.common.wrappers.minecraft.MinecraftClientWrapper; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.core.Direction; -#if POST_MC_1_19_2 +#if MC_1_19 || MC_1_20 import net.minecraft.util.RandomSource; #endif import net.minecraft.world.level.ColorResolver; @@ -41,7 +41,7 @@ import java.util.Random; */ public interface LodForgeMethodCaller { - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 List getQuads(MinecraftClientWrapper mc, Block block, BlockState blockState, Direction direction, Random random); // FIXME: For 1.19 #else List getQuads(MinecraftClientWrapper mc, Block block, BlockState blockState, Direction direction, RandomSource random); // FIXME: For 1.19 diff --git a/common/src/main/java/com/seibel/distanthorizons/common/rendering/SeamlessOverdraw.java b/common/src/main/java/com/seibel/distanthorizons/common/rendering/SeamlessOverdraw.java index 264dc636a..e3d3f142c 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/rendering/SeamlessOverdraw.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/rendering/SeamlessOverdraw.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.common.rendering; -#if PRE_MC_1_19_4 +#if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 import com.mojang.math.Matrix4f; #else @@ -43,7 +43,7 @@ public class SeamlessOverdraw { float[] matrixFloatArray; - #if PRE_MC_1_19_4 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 FloatBuffer matrixFloatBuffer = FloatBuffer.allocate(16); minecraftProjectionMatrix.store(matrixFloatBuffer); matrixFloatArray = matrixFloatBuffer.array(); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/McObjectConverter.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/McObjectConverter.java index c11e57c77..9d81c9264 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/McObjectConverter.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/McObjectConverter.java @@ -23,7 +23,7 @@ import java.nio.FloatBuffer; import java.util.function.BiConsumer; import java.util.function.Consumer; -#if PRE_MC_1_19_4 +#if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 import com.mojang.math.Matrix4f; #else import org.joml.Matrix4f; @@ -54,7 +54,7 @@ public class McObjectConverter /** Taken from Minecraft's com.mojang.math.Matrix4f class from 1.18.2 */ private static void storeMatrix(Matrix4f matrix, FloatBuffer buffer) { - #if PRE_MC_1_19_4 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 matrix.store(buffer); #else // Mojang starts to use joml's Matrix4f libary in 1.19.3 so we copy their store method and use it here if its newer than 1.19.3 @@ -83,7 +83,7 @@ public class McObjectConverter FloatBuffer buffer = FloatBuffer.allocate(16); storeMatrix(mcMatrix, buffer); Mat4f matrix = new Mat4f(buffer); - #if PRE_MC_1_19_4 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 matrix.transpose(); // In 1.19.3 and later, we no longer need to transpose it #endif return matrix; diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/VersionConstants.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/VersionConstants.java index 643a23f25..2853bb0c2 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/VersionConstants.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/VersionConstants.java @@ -59,7 +59,7 @@ public class VersionConstants implements IVersionConstants @Override public String getMinecraftVersion() { - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 return Minecraft.getInstance().getGame().getVersion().getId(); #else return SharedConstants.getCurrentVersion().getId(); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/WrapperFactory.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/WrapperFactory.java index 6bc8d7907..5992f67a6 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/WrapperFactory.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/WrapperFactory.java @@ -106,8 +106,7 @@ public class WrapperFactory implements IWrapperFactory } } - // MC 1.16, 1.18, 1.19, 1.20 - #if POST_MC_1_17_1 || MC_1_16_5 + #if MC_1_16 || MC_1_18 || MC_1_19 || MC_1_20 else if (objectArray.length == 2) { // correct number of parameters from the API @@ -174,8 +173,7 @@ public class WrapperFactory implements IWrapperFactory "Chunk wrapper creation failed. \n" + "Expected parameters: \n"); - // MC 1.16, 1.18, 1.19, 1.20 - #if POST_MC_1_17_1 || MC_1_16_5 + #if MC_1_16 || MC_1_18 || MC_1_19 || MC_1_20 message.append("[" + ChunkAccess.class.getName() + "], \n"); message.append("[" + ServerLevel.class.getName() + "] or [" + ClientLevel.class.getName() + "]. \n"); #else diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BiomeWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BiomeWrapper.java index 1ea448094..3440b5b4d 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BiomeWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BiomeWrapper.java @@ -38,13 +38,13 @@ import net.minecraft.core.Holder; import net.minecraft.resources.RegistryOps; #endif -#if POST_MC_1_19_2 +#if MC_1_19_4 || MC_1_20 #endif -#if MC_1_16_5 || MC_1_17_1 +#if MC_1_16_5 || MC_1_17 import net.minecraft.core.Registry; -#elif MC_1_18_2 || MC_1_19_2 +#elif MC_1_18 || MC_1_19_2 import net.minecraft.core.Holder; import net.minecraft.core.Registry; import net.minecraft.core.RegistryAccess; @@ -56,7 +56,7 @@ import net.minecraft.core.registries.Registries; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.biome.Biome; -#if !PRE_MC_1_18_2 +#if !MC_1_16 || MC_1_17 import net.minecraft.world.level.biome.Biomes; #endif @@ -66,7 +66,7 @@ public class BiomeWrapper implements IBiomeWrapper { private static final Logger LOGGER = LogManager.getLogger(); - #if PRE_MC_1_18_2 + #if MC_1_16 || MC_1_17 public static final ConcurrentMap WRAPPER_BY_BIOME = new ConcurrentHashMap<>(); #else public static final ConcurrentMap, BiomeWrapper> WRAPPER_BY_BIOME = new ConcurrentHashMap<>(); @@ -89,7 +89,7 @@ public class BiomeWrapper implements IBiomeWrapper // properties // - #if PRE_MC_1_18_2 + #if MC_1_16 || MC_1_17 public final Biome biome; #else public final Holder biome; @@ -104,7 +104,7 @@ public class BiomeWrapper implements IBiomeWrapper // constructors // //==============// - static public IBiomeWrapper getBiomeWrapper(#if PRE_MC_1_18_2 Biome #else Holder #endif biome, ILevelWrapper levelWrapper) + static public IBiomeWrapper getBiomeWrapper(#if MC_1_16 || MC_1_17 Biome #else Holder #endif biome, ILevelWrapper levelWrapper) { if (biome == null) { @@ -124,7 +124,7 @@ public class BiomeWrapper implements IBiomeWrapper } } - private BiomeWrapper(#if PRE_MC_1_18_2 Biome #else Holder #endif biome, ILevelWrapper levelWrapper) + private BiomeWrapper(#if MC_1_16 || MC_1_17 Biome #else Holder #endif biome, ILevelWrapper levelWrapper) { this.biome = biome; this.serialString = this.serialize(levelWrapper); @@ -145,7 +145,7 @@ public class BiomeWrapper implements IBiomeWrapper return EMPTY_STRING; } - #if PRE_MC_1_18_2 + #if MC_1_16 || MC_1_17 return biome.toString(); #else return this.biome.unwrapKey().orElse(Biomes.THE_VOID).registry().toString(); @@ -214,9 +214,9 @@ public class BiomeWrapper implements IBiomeWrapper net.minecraft.core.RegistryAccess registryAccess = Minecraft.getInstance().level.registryAccess(); ResourceLocation resourceLocation; - #if MC_1_16_5 || MC_1_17_1 + #if MC_1_16_5 || MC_1_17 resourceLocation = registryAccess.registryOrThrow(Registry.BIOME_REGISTRY).getKey(this.biome); - #elif MC_1_18_2 || MC_1_19_2 + #elif MC_1_18 || MC_1_19_2 resourceLocation = registryAccess.registryOrThrow(Registry.BIOME_REGISTRY).getKey(this.biome.value()); #else resourceLocation = registryAccess.registryOrThrow(Registries.BIOME).getKey(this.biome.value()); @@ -225,7 +225,7 @@ public class BiomeWrapper implements IBiomeWrapper if (resourceLocation == null) { String biomeName; - #if MC_1_16_5 || MC_1_17_1 + #if MC_1_16_5 || MC_1_17 biomeName = this.biome.toString(); #else biomeName = this.biome.value().toString(); @@ -277,10 +277,10 @@ public class BiomeWrapper implements IBiomeWrapper net.minecraft.core.RegistryAccess registryAccess = level.registryAccess(); boolean success; - #if MC_1_16_5 || MC_1_17_1 + #if MC_1_16_5 || MC_1_17 Biome biome = registryAccess.registryOrThrow(Registry.BIOME_REGISTRY).get(resourceLocation); success = (biome != null); - #elif MC_1_18_2 || MC_1_19_2 + #elif MC_1_18 || MC_1_19_2 Biome unwrappedBiome = registryAccess.registryOrThrow(Registry.BIOME_REGISTRY).get(resourceLocation); success = (unwrappedBiome != null); Holder biome = new Holder.Direct<>(unwrappedBiome); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BlockStateWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BlockStateWrapper.java index 25aa8dd9b..6c6c12999 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BlockStateWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BlockStateWrapper.java @@ -32,11 +32,11 @@ import java.io.IOException; import java.util.*; import java.util.concurrent.ConcurrentHashMap; -#if MC_1_16_5 || MC_1_17_1 +#if MC_1_16_5 || MC_1_17 import net.minecraft.core.Registry; import net.minecraft.core.BlockPos; import net.minecraft.world.level.EmptyBlockGetter; -#elif MC_1_18_2 || MC_1_19_2 +#elif MC_1_18 || MC_1_19_2 import net.minecraft.client.Minecraft; import net.minecraft.world.level.Level; import net.minecraft.core.BlockPos; @@ -252,7 +252,7 @@ public class BlockStateWrapper implements IBlockStateWrapper @Override public boolean isSolid() { - #if PRE_MC_1_20_1 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 return this.blockState.getMaterial().isSolid(); #else return !this.blockState.getCollisionShape(EmptyBlockGetter.INSTANCE, BlockPos.ZERO).isEmpty(); @@ -267,7 +267,7 @@ public class BlockStateWrapper implements IBlockStateWrapper return false; } - #if PRE_MC_1_20_1 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 return this.blockState.getMaterial().isLiquid() || !this.blockState.getFluidState().isEmpty(); #else return !this.blockState.getFluidState().isEmpty(); @@ -293,15 +293,15 @@ public class BlockStateWrapper implements IBlockStateWrapper // older versions of MC have a static registry - #if !(MC_1_16_5 || MC_1_17_1) + #if !(MC_1_16_5 || MC_1_17) Level level = (Level)levelWrapper.getWrappedMcObject(); net.minecraft.core.RegistryAccess registryAccess = level.registryAccess(); #endif ResourceLocation resourceLocation; - #if MC_1_16_5 || MC_1_17_1 + #if MC_1_16_5 || MC_1_17 resourceLocation = Registry.BLOCK.getKey(this.blockState.getBlock()); - #elif MC_1_18_2 || MC_1_19_2 + #elif MC_1_18 || MC_1_19_2 resourceLocation = registryAccess.registryOrThrow(Registry.BLOCK_REGISTRY).getKey(this.blockState.getBlock()); #else resourceLocation = registryAccess.registryOrThrow(Registries.BLOCK).getKey(this.blockState.getBlock()); @@ -356,16 +356,16 @@ public class BlockStateWrapper implements IBlockStateWrapper try { - #if !(MC_1_16_5 || MC_1_17_1) + #if !(MC_1_16_5 || MC_1_17) // use the given level if possible, otherwise try using the currently loaded one Level level = (levelWrapper != null ? (Level)levelWrapper.getWrappedMcObject() : null); level = (level == null ? Minecraft.getInstance().level : level); #endif Block block; - #if MC_1_16_5 || MC_1_17_1 + #if MC_1_16_5 || MC_1_17 block = Registry.BLOCK.get(resourceLocation); - #elif MC_1_18_2 || MC_1_19_2 + #elif MC_1_18 || MC_1_19_2 net.minecraft.core.RegistryAccess registryAccess = level.registryAccess(); block = registryAccess.registryOrThrow(Registry.BLOCK_REGISTRY).get(resourceLocation); #else diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TextureAtlasSpriteWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TextureAtlasSpriteWrapper.java index b5334f956..da309c851 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TextureAtlasSpriteWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TextureAtlasSpriteWrapper.java @@ -40,11 +40,11 @@ public class TextureAtlasSpriteWrapper */ public static int getPixelRGBA(TextureAtlasSprite sprite, int frameIndex, int x, int y) { - #if PRE_MC_1_17_1 + #if MC_1_16 return sprite.mainImage[0].getPixelRGBA( x + sprite.framesX[frameIndex] * sprite.getWidth(), y + sprite.framesY[frameIndex] * sprite.getHeight()); - #elif PRE_MC_1_19_4 + #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 if (sprite.animatedTexture != null) { x += sprite.animatedTexture.getFrameX(frameIndex) * sprite.width; diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideFast.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideFast.java index 7a8a92e6e..ed4cad81a 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideFast.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideFast.java @@ -50,7 +50,7 @@ public class TintGetterOverrideFast implements BlockAndTintGetter private Biome _getBiome(BlockPos pos) { - #if POST_MC_1_18_2 + #if MC_1_18 || MC_1_19 || MC_1_20 return parent.getBiome(pos).value(); #else return parent.getBiome(pos); @@ -167,7 +167,7 @@ public class TintGetterOverrideFast implements BlockAndTintGetter return parent.getMaxBuildHeight(); } - #if POST_MC_1_17_1 + #if MC_1_18 || MC_1_19 || MC_1_20 @Override public Optional getBlockEntity(BlockPos blockPos, BlockEntityType blockEntityType) { diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideSmooth.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideSmooth.java index 94015d4de..6ff85ee1c 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideSmooth.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideSmooth.java @@ -53,7 +53,7 @@ public class TintGetterOverrideSmooth implements BlockAndTintGetter private Biome _getBiome(BlockPos pos) { - #if POST_MC_1_18_2 + #if MC_1_18 || MC_1_19 || MC_1_20 return parent.getBiome(pos).value(); #else return parent.getBiome(pos); @@ -193,7 +193,7 @@ public class TintGetterOverrideSmooth implements BlockAndTintGetter return parent.getMaxBuildHeight(); } - #if POST_MC_1_17_1 + #if MC_1_18 || MC_1_19 || MC_1_20 @Override public Optional getBlockEntity(BlockPos blockPos, BlockEntityType blockEntityType) { diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelOverrider.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelOverrider.java index 4f35469ea..c4728dfee 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelOverrider.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelOverrider.java @@ -29,7 +29,7 @@ import net.minecraft.world.level.lighting.LevelLightEngine; import net.minecraft.world.level.material.FluidState; import org.jetbrains.annotations.Nullable; -#if POST_MC_1_18_2 +#if MC_1_18 || MC_1_19 || MC_1_20 import net.minecraft.core.Holder; #endif @@ -46,9 +46,9 @@ public class TintWithoutLevelOverrider implements BlockAndTintGetter { return colorResolver.getColor(_unwrap(biome.biome), blockPos.getX(), blockPos.getZ()); } - private Biome _unwrap(#if POST_MC_1_18_2 Holder #else Biome #endif biome) + private Biome _unwrap(#if MC_1_18 || MC_1_19 || MC_1_20 Holder #else Biome #endif biome) { - #if POST_MC_1_18_2 + #if MC_1_18 || MC_1_19 || MC_1_20 return biome.value(); #else return biome; @@ -84,7 +84,7 @@ public class TintWithoutLevelOverrider implements BlockAndTintGetter } - #if MC_1_17_1 || POST_MC_1_18_2 + #if MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20 @Override public int getHeight() { diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelSmoothOverrider.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelSmoothOverrider.java index c4f4d4438..5aacf7efb 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelSmoothOverrider.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelSmoothOverrider.java @@ -30,7 +30,7 @@ import net.minecraft.world.level.lighting.LevelLightEngine; import net.minecraft.world.level.material.FluidState; import org.jetbrains.annotations.Nullable; -#if POST_MC_1_18_2 +#if MC_1_18 || MC_1_19 || MC_1_20 import net.minecraft.core.Holder; #endif @@ -49,9 +49,9 @@ public class TintWithoutLevelSmoothOverrider implements BlockAndTintGetter { return colorResolver.getColor(_unwrap(biome.biome), blockPos.getX(), blockPos.getZ()); } - private Biome _unwrap(#if POST_MC_1_18_2 Holder #else Biome #endif biome) + private Biome _unwrap(#if MC_1_18 || MC_1_19 || MC_1_20 Holder #else Biome #endif biome) { - #if POST_MC_1_18_2 + #if MC_1_18 || MC_1_19 || MC_1_20 return biome.value(); #else return biome; @@ -116,7 +116,7 @@ public class TintWithoutLevelSmoothOverrider implements BlockAndTintGetter } - #if MC_1_17_1 || POST_MC_1_18_2 + #if MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20 @Override public int getHeight() { diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockDetailMap.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockDetailMap.java index e078d6685..864be6cd5 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockDetailMap.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockDetailMap.java @@ -29,7 +29,7 @@ import java.util.concurrent.ConcurrentHashMap; public class ClientBlockDetailMap { private final ConcurrentHashMap blockCache = new ConcurrentHashMap<>(); - //private final ConcurrentHashMap<#if PRE_MC_1_18_2 Biome #else Holder #endif, Biome> biomeMap = new ConcurrentHashMap<>(); + //private final ConcurrentHashMap<#if MC_1_16 || MC_1_17 Biome #else Holder #endif, Biome> biomeMap = new ConcurrentHashMap<>(); private final ClientLevelWrapper level; public ClientBlockDetailMap(ClientLevelWrapper level) { this.level = level; } diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockStateCache.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockStateCache.java index a14db741f..9f8de4c95 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockStateCache.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockStateCache.java @@ -38,7 +38,7 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.FlowerBlock; import net.minecraft.world.level.block.LeavesBlock; import net.minecraft.world.level.block.RotatedPillarBlock; -#if POST_MC_1_19_2 +#if MC_1_19 || MC_1_20 import net.minecraft.util.RandomSource; #else import java.util.Random; @@ -60,7 +60,7 @@ public class ClientBlockStateCache private static final HashSet BLOCK_STATES_THAT_NEED_LEVEL = new HashSet<>(); private static final HashSet BROKEN_BLOCK_STATES = new HashSet<>(); - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 public static final Random random = new Random(0); #else public static final RandomSource random = RandomSource.create(); @@ -102,7 +102,7 @@ public class ClientBlockStateCache private static int getWidth(TextureAtlasSprite texture) { - #if PRE_MC_1_19_4 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 return texture.getWidth(); #else return texture.contents().width(); @@ -111,7 +111,7 @@ public class ClientBlockStateCache private static int getHeight(TextureAtlasSprite texture) { - #if PRE_MC_1_19_4 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 return texture.getHeight(); #else return texture.contents().height(); @@ -211,7 +211,7 @@ public class ClientBlockStateCache needShade = quads.get(0).isShade(); tintIndex = quads.get(0).getTintIndex(); baseColor = calculateColorFromTexture( - #if PRE_MC_1_17_1 quads.get(0).sprite, + #if MC_1_16 quads.get(0).sprite, #else quads.get(0).getSprite(), #endif ColorMode.getColorMode(blockState.getBlock())); } diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ServerBlockDetailMap.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ServerBlockDetailMap.java index 453761f53..28b69397f 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ServerBlockDetailMap.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ServerBlockDetailMap.java @@ -29,7 +29,7 @@ import net.minecraft.world.level.block.state.BlockState; public class ServerBlockDetailMap { private final ConcurrentHashMap blockCache = new ConcurrentHashMap<>(); - //private final ConcurrentHashMap<#if PRE_MC_1_18_2 Biome #else Holder #endif, Biome> biomeMap = new ConcurrentHashMap<>(); + //private final ConcurrentHashMap<#if MC_1_16 || MC_1_17 Biome #else Holder #endif, Biome> biomeMap = new ConcurrentHashMap<>(); private final ServerLevelWrapper level; public ServerBlockDetailMap(ServerLevelWrapper level) { this.level = level; } diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java index 0bbb83552..3c5b2a2d4 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java @@ -47,7 +47,7 @@ import org.apache.logging.log4j.Logger; import java.util.*; import java.util.concurrent.ConcurrentLinkedQueue; -#if POST_MC_1_17_1 +#if MC_1_18 || MC_1_19 || MC_1_20 import net.minecraft.core.QuartPos; #endif @@ -55,19 +55,19 @@ import net.minecraft.core.QuartPos; import net.minecraft.world.level.chunk.LevelChunkSection; #endif -#if MC_1_17_1 +#if MC_1_17 import net.minecraft.world.level.chunk.LevelChunkSection; #endif -#if MC_1_18_2 +#if MC_1_18 import net.minecraft.world.level.chunk.LevelChunkSection; #endif -#if MC_1_19_2 || MC_1_19_4 +#if MC_1_19 import net.minecraft.world.level.chunk.LevelChunkSection; #endif -#if POST_MC_1_20_1 +#if MC_1_20_2 || MC_1_20_4 import net.minecraft.world.level.chunk.LevelChunkSection; import net.minecraft.world.level.lighting.LevelLightEngine; import net.minecraft.core.SectionPos; @@ -145,7 +145,7 @@ public class ChunkWrapper implements IChunkWrapper @Override public int getHeight() { - #if PRE_MC_1_17_1 + #if MC_1_16 return 255; #else return this.chunk.getHeight(); @@ -155,7 +155,7 @@ public class ChunkWrapper implements IChunkWrapper @Override public int getMinBuildHeight() { - #if PRE_MC_1_17_1 + #if MC_1_16 return 0; #else return this.chunk.getMinBuildHeight(); @@ -181,7 +181,7 @@ public class ChunkWrapper implements IChunkWrapper // convert from an index to a block coordinate return this.chunk.getSections()[index].bottomBlockY() * 16; } - #elif MC_1_17_1 + #elif MC_1_17 if (!sections[index].isEmpty()) { // convert from an index to a block coordinate @@ -210,15 +210,15 @@ public class ChunkWrapper implements IChunkWrapper @Override public IBiomeWrapper getBiome(int relX, int relY, int relZ) { - #if PRE_MC_1_17_1 + #if MC_1_16 return BiomeWrapper.getBiomeWrapper(this.chunk.getBiomes().getNoiseBiome( relX >> 2, relY >> 2, relZ >> 2), this.wrappedLevel); - #elif PRE_MC_1_18_2 + #elif MC_1_16 || MC_1_17 return BiomeWrapper.getBiomeWrapper(this.chunk.getBiomes().getNoiseBiome( QuartPos.fromBlock(relX), QuartPos.fromBlock(relY), QuartPos.fromBlock(relZ)), this.wrappedLevel); - #elif PRE_MC_1_18_2 + #elif MC_1_16 || MC_1_17 return BiomeWrapper.getBiomeWrapper(this.chunk.getNoiseBiome( QuartPos.fromBlock(relX), QuartPos.fromBlock(relY), QuartPos.fromBlock(relZ)), this.wrappedLevel); @@ -264,7 +264,7 @@ public class ChunkWrapper implements IChunkWrapper } - #if MC_1_16_5 || MC_1_17_1 + #if MC_1_16_5 || MC_1_17 return false; // MC's lighting engine doesn't work consistently enough to trust for 1.16 or 1.17 #else if (this.chunk instanceof LevelChunk) @@ -387,7 +387,7 @@ public class ChunkWrapper implements IChunkWrapper this.blockLightPosList = new ArrayList<>(); - #if PRE_MC_1_20_1 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 this.chunk.getLights().forEach((blockPos) -> { this.blockLightPosList.add(new DhBlockPos(blockPos.getX(), blockPos.getY(), blockPos.getZ())); @@ -454,7 +454,7 @@ public class ChunkWrapper implements IChunkWrapper public static void syncedUpdateClientLightStatus() { - #if PRE_MC_1_18_2 + #if MC_1_16 || MC_1_17 // TODO: Check what to do in 1.18.1 and older // since we don't currently handle this list, @@ -481,16 +481,16 @@ public class ChunkWrapper implements IChunkWrapper LevelChunk levelChunk = (LevelChunk) this.chunk; ClientChunkCache clientChunkCache = ((ClientLevel) levelChunk.getLevel()).getChunkSource(); this.isMcClientLightingCorrect = clientChunkCache.getChunkForLighting(this.chunk.getPos().x, this.chunk.getPos().z) != null && - #if MC_1_16_5 || MC_1_17_1 + #if MC_1_16_5 || MC_1_17 levelChunk.isLightCorrect(); - #elif PRE_MC_1_20_1 + #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 levelChunk.isClientLightReady(); #else checkLightSectionsOnChunk(levelChunk, levelChunk.getLevel().getLightEngine()); #endif } } - #if POST_MC_1_20_1 + #if MC_1_20_2 || MC_1_20_4 private static boolean checkLightSectionsOnChunk(LevelChunk chunk, LevelLightEngine engine) { LevelChunkSection[] sections = chunk.getSections(); 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 ac5a98482..1b041665f 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 @@ -35,7 +35,7 @@ import com.seibel.distanthorizons.coreapi.ModInfo; import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; -#if PRE_MC_1_20_1 +#if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.gui.GuiComponent; #else @@ -49,7 +49,7 @@ import net.minecraft.client.gui.components.events.GuiEventListener; import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.Component; import net.minecraft.client.resources.language.I18n; // translation -#if POST_MC_1_17_1 +#if MC_1_18 || MC_1_19 || MC_1_20 import net.minecraft.client.gui.narration.NarratableEntry; #endif import net.minecraft.resources.ResourceLocation; @@ -379,13 +379,13 @@ public class ClassicConfigGUI } @Override - #if PRE_MC_1_20_1 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 public void render(PoseStack matrices, int mouseX, int mouseY, float delta) #else public void render(GuiGraphics matrices, int mouseX, int mouseY, float delta) #endif { - #if PRE_MC_1_20_2 // 1.20.2 now enables this by default in the `this.list.render` function + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 // 1.20.2 now enables this by default in the `this.list.render` function this.renderBackground(matrices); // Renders background #else super.render(matrices, mouseX, mouseY, delta); @@ -441,7 +441,7 @@ public class ClassicConfigGUI } } } - #if PRE_MC_1_20_2 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 super.render(matrices, mouseX, mouseY, delta); #endif } @@ -539,7 +539,7 @@ public class ClassicConfigGUI public ConfigListWidget(Minecraft minecraftClient, int canvasWidth, int canvasHeight, int topMargin, int botMargin, int itemSpacing) { - #if PRE_MC_1_20_4 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 || MC_1_20_2 super(minecraftClient, canvasWidth, canvasHeight, topMargin, canvasHeight - botMargin, itemSpacing); #else super(minecraftClient, canvasWidth, canvasHeight - (topMargin + botMargin), topMargin, itemSpacing); @@ -605,7 +605,7 @@ public class ClassicConfigGUI } @Override - #if PRE_MC_1_20_1 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 public void render(PoseStack matrices, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) #else public void render(GuiGraphics matrices, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) @@ -627,7 +627,7 @@ public class ClassicConfigGUI indexButton.render(matrices, mouseX, mouseY, tickDelta); } if (text != null && (!text.getString().contains("spacer") || button != null)) - #if PRE_MC_1_20_1 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 GuiComponent.drawString(matrices, textRenderer, text, 12, y + 5, 0xFFFFFF); #else matrices.drawString(textRenderer, text, 12, y + 5, 0xFFFFFF); @@ -642,7 +642,7 @@ public class ClassicConfigGUI // Only for 1.17 and over // Remove in 1.16 and below - #if POST_MC_1_17_1 + #if MC_1_18 || MC_1_19 || MC_1_20 @Override public List narratables() { diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/DhScreen.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/DhScreen.java index fbeb7f4c3..37e1cc0d9 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/DhScreen.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/DhScreen.java @@ -1,7 +1,7 @@ package com.seibel.distanthorizons.common.wrappers.gui; import net.minecraft.client.gui.Font; -#if PRE_MC_1_20_1 +#if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 import com.mojang.blaze3d.vertex.PoseStack; #else import net.minecraft.client.gui.GuiGraphics; @@ -24,14 +24,14 @@ public class DhScreen extends Screen // addButton in 1.16 and below protected Button addBtn(Button button) { - #if PRE_MC_1_17_1 + #if MC_1_16 return this.addButton(button); #else return this.addRenderableWidget(button); #endif } - #if PRE_MC_1_20_1 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 protected void DhDrawCenteredString(PoseStack guiStack, Font font, Component text, int x, int y, int color) { drawCenteredString(guiStack, font, text, x, y, color); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/GuiHelper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/GuiHelper.java index 1bd0655a1..86183b3b2 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/GuiHelper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/GuiHelper.java @@ -5,7 +5,7 @@ import net.minecraft.client.gui.components.Button; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; -#if PRE_MC_1_19_2 +#if MC_1_16 || MC_1_17 || MC_1_18 import net.minecraft.network.chat.TextComponent; import net.minecraft.network.chat.TranslatableComponent; #endif @@ -17,7 +17,7 @@ public class GuiHelper */ public static Button MakeBtn(Component base, int a, int b, int c, int d, Button.OnPress action) { - #if PRE_MC_1_19_4 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 return new Button(a, b, c, d, base, action); #else return Button.builder(base, action).bounds(a, b, c, d).build(); @@ -26,7 +26,7 @@ public class GuiHelper public static MutableComponent TextOrLiteral(String text) { - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 return new TextComponent(text); #else return Component.literal(text); @@ -35,7 +35,7 @@ public class GuiHelper public static MutableComponent TextOrTranslatable(String text) { - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 return new TextComponent(text); #else return Component.translatable(text); @@ -44,7 +44,7 @@ public class GuiHelper public static MutableComponent Translatable(String text, Object... args) { - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 return new TranslatableComponent(text, args); #else return Component.translatable(text, args); @@ -53,7 +53,7 @@ public class GuiHelper public static void SetX(AbstractWidget w, int x) { - #if PRE_MC_1_19_4 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 w.x = x; #else w.setX(x); @@ -62,7 +62,7 @@ public class GuiHelper public static void SetY(AbstractWidget w, int y) { - #if PRE_MC_1_19_4 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 w.y = y; #else w.setY(y); 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 aaa804181..572d4ef1d 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 @@ -4,7 +4,7 @@ import com.mojang.blaze3d.platform.Window; import com.mojang.blaze3d.vertex.PoseStack; import com.seibel.distanthorizons.core.config.gui.AbstractScreen; import net.minecraft.client.Minecraft; -#if POST_MC_1_20_1 +#if MC_1_20_2 || MC_1_20_4 import net.minecraft.client.gui.GuiGraphics; #endif import net.minecraft.client.gui.components.ContainerObjectSelectionList; @@ -28,7 +28,7 @@ public class MinecraftScreen private AbstractScreen screen; - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 public static net.minecraft.network.chat.TranslatableComponent translate(String str, Object... args) { return new net.minecraft.network.chat.TranslatableComponent(str, args); @@ -66,13 +66,13 @@ public class MinecraftScreen } @Override - #if PRE_MC_1_20_1 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 public void render(PoseStack matrices, int mouseX, int mouseY, float delta) #else public void render(GuiGraphics matrices, int mouseX, int mouseY, float delta) #endif { - #if PRE_MC_1_20_2 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 this.renderBackground(matrices); // Render background #else this.renderBackground(matrices, mouseX, mouseY, delta); // Render background @@ -133,7 +133,7 @@ public class MinecraftScreen { public ConfigListWidget(Minecraft minecraftClient, int canvasWidth, int canvasHeight, int topMargin, int botMargin, int itemSpacing) { - #if PRE_MC_1_20_4 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 || MC_1_20_2 super(minecraftClient, canvasWidth, canvasHeight, topMargin, canvasHeight - botMargin, itemSpacing); #else super(minecraftClient, canvasWidth, canvasHeight - (topMargin + botMargin), topMargin, itemSpacing); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/TexturedButtonWidget.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/TexturedButtonWidget.java index 866ef61c7..037034280 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/TexturedButtonWidget.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/TexturedButtonWidget.java @@ -34,17 +34,18 @@ import net.minecraft.client.gui.components.ImageButton; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; -#if POST_MC_1_17_1 +#if MC_1_18 || MC_1_19 || MC_1_20 import net.minecraft.client.renderer.GameRenderer; #endif -#if PRE_MC_1_20_1 + +#if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.Minecraft; #else import net.minecraft.client.gui.GuiGraphics; #endif -#if PRE_MC_1_20_2 +#if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 public class TexturedButtonWidget extends ImageButton #else public class TexturedButtonWidget extends Button @@ -52,7 +53,7 @@ public class TexturedButtonWidget extends Button { public final boolean renderBackground; - #if POST_MC_1_20_2 + #if MC_1_20_2 || MC_1_20_4 private final int u; private final int v; private final int hoveredVOffset; @@ -69,7 +70,7 @@ public class TexturedButtonWidget extends Button } public TexturedButtonWidget(int x, int y, int width, int height, int u, int v, int hoveredVOffset, ResourceLocation texture, int textureWidth, int textureHeight, OnPress pressAction, Component text, boolean renderBackground) { - #if PRE_MC_1_20_2 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 super(x, y, width, height, u, v, hoveredVOffset, texture, textureWidth, textureHeight, pressAction, text); #else // We don't pass on the text option as otherwise it will render (we normally pass it for narration) @@ -89,13 +90,13 @@ public class TexturedButtonWidget extends Button this.renderBackground = renderBackground; } - #if PRE_MC_1_20_2 - #if PRE_MC_1_19_4 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 @Override public void renderButton(PoseStack matrices, int mouseX, int mouseY, float delta) { if (this.renderBackground) // Renders the background of the button { - #if PRE_MC_1_17_1 + #if MC_1_16 Minecraft.getInstance().getTextureManager().bind(WIDGETS_LOCATION); RenderSystem.color4f(1.0F, 1.0F, 1.0F, this.alpha); #else @@ -108,7 +109,7 @@ public class TexturedButtonWidget extends Button RenderSystem.enableBlend(); RenderSystem.defaultBlendFunc(); RenderSystem.enableDepthTest(); - #if PRE_MC_1_19_4 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 this.blit(matrices, this.x, this.y, 0, 46 + i * 20, this.width / 2, this.height); this.blit(matrices, this.x + this.width / 2, this.y, 200 - this.width / 2, 46 + i * 20, this.width / 2, this.height); #else @@ -120,7 +121,7 @@ public class TexturedButtonWidget extends Button super.renderButton(matrices, mouseX, mouseY, delta); } #else - #if PRE_MC_1_20_1 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 @Override public void renderWidget(PoseStack matrices, int mouseX, int mouseY, float delta) { @@ -138,7 +139,7 @@ public class TexturedButtonWidget extends Button if (!this.active) i = 0; else if (this.isHovered) i = 2; - #if PRE_MC_1_20_1 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 RenderSystem.enableBlend(); RenderSystem.defaultBlendFunc(); RenderSystem.enableDepthTest(); 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 0b3b493db..be2c549a9 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 @@ -15,11 +15,11 @@ import net.minecraft.client.gui.components.events.GuiEventListener; import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.Component; -#if POST_MC_1_17_1 +#if MC_1_18 || MC_1_19 || MC_1_20 import net.minecraft.client.gui.narration.NarratableEntry; #endif -#if PRE_MC_1_20_1 +#if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 import net.minecraft.client.gui.GuiComponent; #else import net.minecraft.client.gui.GuiGraphics; @@ -144,13 +144,13 @@ public class ChangelogScreen extends DhScreen } @Override - #if PRE_MC_1_20_1 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 public void render(PoseStack matrices, int mouseX, int mouseY, float delta) #else public void render(GuiGraphics matrices, int mouseX, int mouseY, float delta) #endif { - #if PRE_MC_1_20_2 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 this.renderBackground(matrices); // Render background #else this.renderBackground(matrices, mouseX, mouseY, delta); // Render background @@ -161,7 +161,7 @@ public class ChangelogScreen extends DhScreen // Set the scroll position to the mouse height relative to the screen // This is a bit of a hack as we cannot scroll on this area double scrollAmount = ((double) mouseY) / ((double) this.height) * 1.1 * this.changelogArea.getMaxScroll(); - #if MC_1_16_5 || MC_1_17_1 + #if MC_1_16_5 || MC_1_17 this.changelogArea.setScrollAmount(scrollAmount); #else this.changelogArea.scrollAmount = scrollAmount; @@ -187,7 +187,7 @@ public class ChangelogScreen extends DhScreen public TextArea(Minecraft minecraftClient, int canvasWidth, int canvasHeight, int topMargin, int botMargin, int itemSpacing) { - #if PRE_MC_1_20_4 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 || MC_1_20_2 super(minecraftClient, canvasWidth, canvasHeight, topMargin, canvasHeight - botMargin, itemSpacing); #else super(minecraftClient, canvasWidth, canvasHeight - (topMargin + botMargin), topMargin, itemSpacing); @@ -225,7 +225,7 @@ public class ChangelogScreen extends DhScreen return new ButtonEntry(text); } - #if PRE_MC_1_20_1 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 @Override public void render(PoseStack matrices, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) { @@ -244,7 +244,7 @@ public class ChangelogScreen extends DhScreen { return children; } - #if POST_MC_1_17_1 + #if MC_1_18 || MC_1_19 || MC_1_20 @Override public List narratables() { 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 5addfc306..a03323457 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 @@ -11,7 +11,7 @@ import com.seibel.distanthorizons.core.jar.JarUtils; import com.seibel.distanthorizons.core.jar.installer.ModrinthGetter; import com.seibel.distanthorizons.core.jar.updater.SelfUpdater; import net.minecraft.client.Minecraft; -#if POST_MC_1_20_1 +#if MC_1_20_2 || MC_1_20_4 import net.minecraft.client.gui.GuiGraphics; #else import com.mojang.blaze3d.vertex.PoseStack; @@ -146,13 +146,13 @@ public class UpdateModScreen extends DhScreen } @Override - #if PRE_MC_1_20_1 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 public void render(PoseStack matrices, int mouseX, int mouseY, float delta) #else public void render(GuiGraphics matrices, int mouseX, int mouseY, float delta) #endif { - #if PRE_MC_1_20_2 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 this.renderBackground(matrices); // Render background #else this.renderBackground(matrices, mouseX, mouseY, delta); // Render background 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 208387960..4fc7d68e8 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 @@ -47,7 +47,7 @@ import net.minecraft.client.player.LocalPlayer; import net.minecraft.client.resources.model.ModelManager; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -#if PRE_MC_1_19_2 +#if MC_1_16 || MC_1_17 || MC_1_18 import net.minecraft.network.chat.TextComponent; #endif import net.minecraft.server.level.ServerLevel; @@ -197,7 +197,7 @@ public class MinecraftClientWrapper implements IMinecraftClientWrapper, IMinecra @Override public DhChunkPos getPlayerChunkPos() { - #if PRE_MC_1_17_1 + #if MC_1_16 ChunkPos playerPos = new ChunkPos(getPlayer().blockPosition()); #else ChunkPos playerPos = getPlayer().chunkPosition(); @@ -262,7 +262,7 @@ public class MinecraftClientWrapper implements IMinecraftClientWrapper, IMinecra { LocalPlayer p = getPlayer(); if (p == null) return; - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 p.sendMessage(new TextComponent(string), getPlayer().getUUID()); #else p.sendSystemMessage(net.minecraft.network.chat.Component.translatable(string)); @@ -282,7 +282,7 @@ 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 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 || MC_1_20_2 Minecraft.crash(report); #else Minecraft.getInstance().delayCrash(report); 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 6a05e158f..0131998fc 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 @@ -39,12 +39,12 @@ import com.seibel.distanthorizons.core.logging.DhLoggerBuilder; import com.seibel.distanthorizons.core.render.DhApiRenderProxy; import com.seibel.distanthorizons.core.wrapperInterfaces.misc.ILightMapWrapper; -#if PRE_MC_1_19_4 +#if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 import com.mojang.math.Vector3f; #else import org.joml.Vector3f; #endif -#if POST_MC_1_20_2 +#if MC_1_20_2 || MC_1_20_4 import net.minecraft.client.renderer.chunk.SectionRenderDispatcher; #endif @@ -67,7 +67,7 @@ import net.minecraft.client.renderer.FogRenderer; import net.minecraft.client.renderer.LevelRenderer; import net.minecraft.core.BlockPos; import net.minecraft.world.effect.MobEffects; -#if PRE_MC_1_17_1 +#if MC_1_16 import net.minecraft.tags.FluidTags; import net.minecraft.world.entity.Entity; import net.minecraft.world.level.material.FluidState; @@ -133,7 +133,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper public boolean playerHasBlindingEffect() { return MC.player.getActiveEffectsMap().get(MobEffects.BLINDNESS) != null - #if POST_AND_MC_1_19_2 + #if MC_1_19 || MC_1_20 || MC.player.getActiveEffectsMap().get(MobEffects.DARKNESS) != null // Deep dark effect #endif ; @@ -151,7 +151,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper @Override public Mat4f getDefaultProjectionMatrix(float partialTicks) { - #if PRE_MC_1_17_1 + #if MC_1_16 return McObjectConverter.Convert(Minecraft.getInstance().gameRenderer.getProjectionMatrix(Minecraft.getInstance().gameRenderer.getMainCamera(), partialTicks, true)); #else return McObjectConverter.Convert(MC.gameRenderer.getProjectionMatrix(MC.gameRenderer.getFov(MC.gameRenderer.getMainCamera(), partialTicks, true))); @@ -161,7 +161,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper @Override public double getGamma() { - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 return MC.options.gamma; #else return MC.options.gamma().get(); @@ -171,7 +171,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper @Override public Color getFogColor(float partialTicks) { - #if PRE_MC_1_17_1 + #if MC_1_16 float[] colorValues = new float[4]; GL15.glGetFloatv(GL15.GL_FOG_COLOR, colorValues); #else @@ -192,7 +192,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper { if (MC.level.dimensionType().hasSkyLight()) { - #if PRE_MC_1_17_1 + #if MC_1_16 Vec3 colorValues = MC.level.getSkyColor(MC.gameRenderer.getMainCamera().getBlockPosition(), MC.getFrameTime()); #else Vec3 colorValues = MC.level.getSkyColor(MC.gameRenderer.getMainCamera().getPosition(), MC.getFrameTime()); @@ -213,7 +213,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper @Override public int getRenderDistance() { - #if PRE_MC_1_18_2 + #if MC_1_16 || MC_1_17 //FIXME: How to resolve this? return MC.options.renderDistance; #else @@ -321,15 +321,15 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper { try { - #if PRE_MC_1_20_2 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 LevelRenderer levelRenderer = MC.levelRenderer; Collection chunks = - #if PRE_MC_1_18_2 levelRenderer.renderChunks; + #if MC_1_16 || MC_1_17 levelRenderer.renderChunks; #else levelRenderer.renderChunkStorage.get().renderChunks; #endif return (chunks.stream().map((chunk) -> { AABB chunkBoundingBox = - #if PRE_MC_1_18_2 chunk.chunk.bb; + #if MC_1_16 || MC_1_17 chunk.chunk.bb; #else chunk.chunk.getBoundingBox(); #endif return new DhChunkPos(Math.floorDiv((int) chunkBoundingBox.minX, 16), Math.floorDiv((int) chunkBoundingBox.minZ, 16)); @@ -371,7 +371,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper @Override public boolean isFogStateSpecial() { - #if PRE_MC_1_17_1 + #if MC_1_16 Camera camera = Minecraft.getInstance().gameRenderer.getMainCamera(); FluidState fluidState = camera.getFluidInCamera(); Entity entity = camera.getEntity(); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/misc/ServerPlayerWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/misc/ServerPlayerWrapper.java index b327c32a4..eb70a535b 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/misc/ServerPlayerWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/misc/ServerPlayerWrapper.java @@ -33,7 +33,7 @@ public class ServerPlayerWrapper implements IServerPlayerWrapper public IServerLevelWrapper getLevel() { - #if PRE_MC_1_20_1 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 return ServerLevelWrapper.getWrapper(this.serverPlayer.getLevel()); #else return ServerLevelWrapper.getWrapper(this.serverPlayer.serverLevel()); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/world/ClientLevelWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/world/ClientLevelWrapper.java index 08ffe1656..78138d85b 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/world/ClientLevelWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/world/ClientLevelWrapper.java @@ -136,7 +136,7 @@ public class ClientLevelWrapper implements IClientLevelWrapper @Override public int getMinHeight() { - #if PRE_MC_1_17_1 + #if MC_1_16 return 0; #else return this.level.getMinBuildHeight(); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/world/ServerLevelWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/world/ServerLevelWrapper.java index b6fea22b8..28d7c6281 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/world/ServerLevelWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/world/ServerLevelWrapper.java @@ -130,7 +130,7 @@ public class ServerLevelWrapper implements IServerLevelWrapper @Override public int getMinHeight() { - #if PRE_MC_1_17_1 + #if MC_1_16 return 0; #else return level.getMinBuildHeight(); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/BatchGenerationEnvironment.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/BatchGenerationEnvironment.java index 8d238f508..b0549a495 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/BatchGenerationEnvironment.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/BatchGenerationEnvironment.java @@ -56,7 +56,7 @@ import com.seibel.distanthorizons.common.wrappers.worldGeneration.step.StepStruc import com.seibel.distanthorizons.common.wrappers.worldGeneration.step.StepStructureStart; import com.seibel.distanthorizons.common.wrappers.worldGeneration.step.StepSurface; -#if POST_MC_1_19_4 +#if MC_1_19_4 || MC_1_20 import net.minecraft.core.registries.Registries; #else import net.minecraft.core.Registry; @@ -365,9 +365,9 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv private static ProtoChunk EmptyChunk(ServerLevel level, ChunkPos chunkPos) { return new ProtoChunk(chunkPos, UpgradeData.EMPTY - #if POST_MC_1_17_1 , level #endif - #if POST_MC_1_18_2 , level.registryAccess().registryOrThrow( - #if PRE_MC_1_19_4 + #if MC_1_18 || MC_1_19 || MC_1_20 , level #endif + #if MC_1_18 || MC_1_19 || MC_1_20 , level.registryAccess().registryOrThrow( + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 Registry.BIOME_REGISTRY #else Registries.BIOME @@ -463,8 +463,8 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv if (target == null) { target = new ProtoChunk(chunkPos, UpgradeData.EMPTY - #if POST_MC_1_17_1 , params.level #endif - #if POST_MC_1_18_2 , params.biomes, null #endif + #if MC_1_18 || MC_1_19 || MC_1_20 , params.level #endif + #if MC_1_18 || MC_1_19 || MC_1_20 , params.biomes, null #endif ); } return target; @@ -507,7 +507,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv ChunkAccess target = wrappedChunk.getChunk(); if (target instanceof LevelChunk) { - #if MC_1_16_5 || MC_1_17_1 + #if MC_1_16_5 || MC_1_17 ((LevelChunk) target).setLoaded(true); #else ((LevelChunk) target).loaded = true; @@ -520,7 +520,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv } boolean isFull = target.getStatus() == ChunkStatus.FULL || target instanceof LevelChunk; - #if POST_MC_1_18_2 + #if MC_1_19 || MC_1_20 boolean isPartial = target.isOldNoiseGeneration(); #endif if (isFull) @@ -528,7 +528,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv LOAD_LOGGER.info("Detected full existing chunk at {}", target.getPos()); genEvent.resultConsumer.accept(wrappedChunk); } - #if POST_MC_1_18_2 + #if MC_1_19 || MC_1_20 else if (isPartial) { LOAD_LOGGER.info("Detected old existing chunk at {}", target.getPos()); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/GlobalParameters.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/GlobalParameters.java index aafc01bb3..d3240b09a 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/GlobalParameters.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/GlobalParameters.java @@ -31,16 +31,16 @@ import net.minecraft.server.level.ThreadedLevelLightEngine; import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.biome.BiomeManager; import net.minecraft.world.level.chunk.ChunkGenerator; -#if POST_MC_1_18_2 +#if MC_1_18 || MC_1_19 || MC_1_20 import net.minecraft.world.level.chunk.storage.ChunkScanAccess; #endif import net.minecraft.world.level.levelgen.WorldGenSettings; -#if PRE_MC_1_19_2 +#if MC_1_16 || MC_1_17 || MC_1_18 import net.minecraft.world.level.levelgen.structure.templatesystem.StructureManager; #else import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager; import net.minecraft.world.level.levelgen.RandomState; -#if POST_MC_1_19_4 +#if MC_1_19_4 || MC_1_20 import net.minecraft.world.level.levelgen.WorldOptions; import net.minecraft.core.registries.Registries; #endif @@ -50,13 +50,13 @@ import net.minecraft.world.level.storage.WorldData; public final class GlobalParameters { public final ChunkGenerator generator; - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 public final StructureManager structures; #else public final StructureTemplateManager structures; public final RandomState randomState; #endif - #if PRE_MC_1_19_4 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 public final WorldGenSettings worldGenSettings; #else public final WorldOptions worldOptions; @@ -67,7 +67,7 @@ public final class GlobalParameters public final RegistryAccess registry; public final long worldSeed; public final DataFixer fixerUpper; - #if POST_MC_1_18_2 + #if MC_1_18 || MC_1_19 || MC_1_20 public final BiomeManager biomeManager; public final ChunkScanAccess chunkScanner; // FIXME: Figure out if this is actually needed #endif @@ -81,7 +81,7 @@ public final class GlobalParameters WorldData worldData = server.getWorldData(); registry = server.registryAccess(); - #if PRE_MC_1_19_4 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 worldGenSettings = worldData.worldGenSettings(); biomes = registry.registryOrThrow(Registry.BIOME_REGISTRY); worldSeed = worldGenSettings.seed(); @@ -90,14 +90,14 @@ public final class GlobalParameters biomes = registry.registryOrThrow(Registries.BIOME); worldSeed = worldOptions.seed(); #endif - #if POST_MC_1_18_2 + #if MC_1_18 || MC_1_19 || MC_1_20 biomeManager = new BiomeManager(level, BiomeManager.obfuscateSeed(worldSeed)); chunkScanner = level.getChunkSource().chunkScanner(); #endif structures = server.getStructureManager(); generator = level.getChunkSource().getGenerator(); fixerUpper = server.getFixerUpper(); - #if POST_MC_1_19_2 + #if MC_1_19 || MC_1_20 randomState = level.getChunkSource().randomState(); #endif } diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/ThreadedParameters.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/ThreadedParameters.java index d5e391be5..3b6bb23d5 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/ThreadedParameters.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/ThreadedParameters.java @@ -25,7 +25,7 @@ import com.seibel.distanthorizons.common.wrappers.worldGeneration.mimicObject.Wo import net.minecraft.server.level.ServerLevel; import net.minecraft.world.level.WorldGenLevel; -#if POST_MC_1_18_2 +#if MC_1_18 || MC_1_19 || MC_1_20 import net.minecraft.world.level.levelgen.structure.StructureCheck; #endif @@ -35,7 +35,7 @@ public final class ThreadedParameters final ServerLevel level; public WorldGenStructFeatManager structFeat = null; - #if POST_MC_1_18_2 + #if MC_1_18 || MC_1_19 || MC_1_20 public StructureCheck structCheck; #endif boolean isValid = true; @@ -63,9 +63,9 @@ public final class ThreadedParameters previousGlobalParameters = param; this.level = param.level; - #if PRE_MC_1_18_2 + #if MC_1_16 || MC_1_17 this.structFeat = new WorldGenStructFeatManager(param.worldGenSettings, level); - #elif PRE_MC_1_19_2 + #elif MC_1_16 || MC_1_17 || MC_1_18 this.structCheck = this.createStructureCheck(param); #else this.structCheck = new StructureCheck(param.chunkScanner, param.registry, param.structures, @@ -80,15 +80,15 @@ public final class ThreadedParameters public void makeStructFeat(WorldGenLevel genLevel, GlobalParameters param) { - #if PRE_MC_1_19_4 - structFeat = new WorldGenStructFeatManager(param.worldGenSettings, genLevel #if POST_MC_1_18_2 , structCheck #endif ); + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + structFeat = new WorldGenStructFeatManager(param.worldGenSettings, genLevel #if MC_1_18 || MC_1_19 || MC_1_20 , structCheck #endif ); #else structFeat = new WorldGenStructFeatManager(param.worldOptions, genLevel, structCheck); #endif } - #if POST_MC_1_18_2 && PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 public void recreateStructureCheck() { if (previousGlobalParameters != null) diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java index dda02fa40..9986c402c 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java @@ -37,7 +37,7 @@ import java.util.Objects; import net.minecraft.core.Registry; import net.minecraft.core.SectionPos; -#if POST_MC_1_19_4 +#if MC_1_19_4 || MC_1_20 import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.core.registries.Registries; #endif @@ -55,24 +55,24 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.chunk.*; import net.minecraft.world.level.chunk.storage.ChunkSerializer; import net.minecraft.world.level.levelgen.Heightmap; -#if POST_MC_1_18_2 +#if MC_1_18 || MC_1_19 || MC_1_20 import net.minecraft.world.level.levelgen.blending.BlendingData; -#if PRE_MC_1_19_2 +#if MC_1_16 || MC_1_17 || MC_1_18 import net.minecraft.world.level.levelgen.feature.StructureFeature; #endif import net.minecraft.world.level.levelgen.structure.StructureStart; import net.minecraft.world.level.levelgen.structure.pieces.StructurePieceSerializationContext; import net.minecraft.world.ticks.LevelChunkTicks; #endif -#if POST_MC_1_18_2 +#if MC_1_18 || MC_1_19 || MC_1_20 import net.minecraft.core.Holder; import net.minecraft.core.RegistryAccess; -#if PRE_MC_1_19_2 +#if MC_1_16 || MC_1_17 || MC_1_18 import net.minecraft.world.level.levelgen.feature.ConfiguredStructureFeature; #endif #endif -#if MC_1_16_5 || MC_1_17_1 +#if MC_1_16_5 || MC_1_17 import net.minecraft.world.level.material.Fluids; #endif @@ -81,9 +81,9 @@ import net.minecraft.world.level.material.Fluid; public class ChunkLoader { - #if POST_MC_1_19_2 + #if MC_1_19 || MC_1_20 private static final Codec> BLOCK_STATE_CODEC = PalettedContainer.codecRW(Block.BLOCK_STATE_REGISTRY, BlockState.CODEC, PalettedContainer.Strategy.SECTION_STATES, Blocks.AIR.defaultBlockState()); - #elif POST_MC_1_18_2 + #elif MC_1_18 || MC_1_19 || MC_1_20 private static final Codec> BLOCK_STATE_CODEC = PalettedContainer.codec(Block.BLOCK_STATE_REGISTRY, BlockState.CODEC, PalettedContainer.Strategy.SECTION_STATES, Blocks.AIR.defaultBlockState()); #endif private static final String TAG_UPGRADE_DATA = "UpgradeData"; @@ -93,7 +93,7 @@ public class ChunkLoader private static final String FLUID_TICKS_TAG_PRE18 = "LiquidTicks"; private static final ConfigBasedLogger LOGGER = BatchGenerationEnvironment.LOAD_LOGGER; - #if POST_MC_1_18_2 + #if MC_1_18 || MC_1_19 || MC_1_20 private static BlendingData readBlendingData(CompoundTag chunkData) { BlendingData blendingData = null; @@ -109,16 +109,16 @@ public class ChunkLoader private static LevelChunkSection[] readSections(LevelAccessor level, ChunkPos chunkPos, CompoundTag chunkData) { - #if POST_MC_1_18_2 - #if PRE_MC_1_19_4 + #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 Registry biomes = level.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY); #else Registry biomes = level.registryAccess().registryOrThrow(Registries.BIOME); #endif - #if PRE_MC_1_18_2 + #if MC_1_16 || MC_1_17 Codec> biomeCodec = PalettedContainer.codec( biomes, biomes.byNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, biomes.getOrThrow(Biomes.PLAINS)); - #elif PRE_MC_1_19_2 + #elif MC_1_16 || MC_1_17 || MC_1_18 Codec>> biomeCodec = PalettedContainer.codec( biomes.asHolderIdMap(), biomes.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, biomes.getHolderOrThrow(Biomes.PLAINS)); #else @@ -126,7 +126,7 @@ public class ChunkLoader biomes.asHolderIdMap(), biomes.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, biomes.getHolderOrThrow(Biomes.PLAINS)); #endif #endif - int i = #if PRE_MC_1_17_1 16; #else level.getSectionsCount(); #endif + int i = #if MC_1_16 16; #else level.getSectionsCount(); #endif LevelChunkSection[] chunkSections = new LevelChunkSection[i]; boolean isLightOn = chunkData.getBoolean("isLightOn"); @@ -139,7 +139,7 @@ public class ChunkLoader CompoundTag tagSection = tagSections.getCompound(j); int sectionYPos = tagSection.getByte("Y"); - #if PRE_MC_1_18_2 + #if MC_1_16 || MC_1_17 if (tagSection.contains("Palette", 9) && tagSection.contains("BlockStates", 12)) { LevelChunkSection levelChunkSection = new LevelChunkSection(sectionYPos << 4); @@ -147,7 +147,7 @@ public class ChunkLoader tagSection.getLongArray("BlockStates")); levelChunkSection.recalcBlockCounts(); if (!levelChunkSection.isEmpty()) - chunkSections[#if PRE_MC_1_17_1 sectionYPos #else level.getSectionIndexFromSectionY(sectionYPos) #endif ] + chunkSections[#if MC_1_16 sectionYPos #else level.getSectionIndexFromSectionY(sectionYPos) #endif ] = levelChunkSection; } #else @@ -155,7 +155,7 @@ public class ChunkLoader if (sectionId >= 0 && sectionId < chunkSections.length) { PalettedContainer blockStateContainer; - #if PRE_MC_1_18_2 + #if MC_1_16 || MC_1_17 PalettedContainer biomeContainer; #else PalettedContainer> biomeContainer; @@ -165,7 +165,7 @@ public class ChunkLoader ? BLOCK_STATE_CODEC.parse(NbtOps.INSTANCE, tagSection.getCompound("block_states")).promotePartial(string -> logErrors(chunkPos, sectionYPos, string)).getOrThrow(false, LOGGER::error) : new PalettedContainer(Block.BLOCK_STATE_REGISTRY, Blocks.AIR.defaultBlockState(), PalettedContainer.Strategy.SECTION_STATES); - #if PRE_MC_1_18_2 + #if MC_1_16 || MC_1_17 biomeContainer = tagSection.contains("biomes", 10) ? biomeCodec.parse(NbtOps.INSTANCE, tagSection.getCompound("biomes")).promotePartial(string -> logErrors(chunkPos, sectionYPos, string)).getOrThrow(false, LOGGER::error) : new PalettedContainer(biomes, biomes.getOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES); @@ -174,7 +174,7 @@ public class ChunkLoader ? biomeCodec.parse(NbtOps.INSTANCE, tagSection.getCompound("biomes")).promotePartial(string -> logErrors(chunkPos, i, (String) string)).getOrThrow(false, LOGGER::error) : new PalettedContainer>(biomes.asHolderIdMap(), biomes.getHolderOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES); #endif - #if PRE_MC_1_20_1 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 chunkSections[sectionId] = new LevelChunkSection(sectionYPos, blockStateContainer, biomeContainer); #else chunkSections[sectionId] = new LevelChunkSection(blockStateContainer, biomeContainer); @@ -223,7 +223,7 @@ public class ChunkLoader public static LevelChunk read(WorldGenLevel level, ChunkPos chunkPos, CompoundTag chunkData) { - #if PRE_MC_1_18_2 + #if MC_1_16 || MC_1_17 CompoundTag tagLevel = chunkData.getCompound("Level"); #else CompoundTag tagLevel = chunkData; @@ -237,12 +237,12 @@ public class ChunkLoader } ChunkStatus.ChunkType chunkType = readChunkType(tagLevel); - #if PRE_MC_1_18_2 + #if MC_1_16 || MC_1_17 if (chunkType != ChunkStatus.ChunkType.LEVELCHUNK) return null; #else BlendingData blendingData = readBlendingData(tagLevel); - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 if (chunkType == ChunkStatus.ChunkType.PROTOCHUNK && (blendingData == null || !blendingData.oldNoise())) return null; #else @@ -255,27 +255,27 @@ public class ChunkLoader //================== Read params for making the LevelChunk ================== UpgradeData upgradeData = tagLevel.contains(TAG_UPGRADE_DATA, 10) - ? new UpgradeData(tagLevel.getCompound(TAG_UPGRADE_DATA)#if POST_MC_1_17_1 , level #endif ) + ? new UpgradeData(tagLevel.getCompound(TAG_UPGRADE_DATA)#if MC_1_18 || MC_1_19 || MC_1_20 , level #endif ) : UpgradeData.EMPTY; boolean isLightOn = tagLevel.getBoolean("isLightOn"); - #if PRE_MC_1_18_2 + #if MC_1_16 || MC_1_17 ChunkBiomeContainer chunkBiomeContainer = new ChunkBiomeContainer( - level.getLevel().registryAccess().registryOrThrow(Registry.BIOME_REGISTRY)#if POST_MC_1_17_1 , level #endif , + level.getLevel().registryAccess().registryOrThrow(Registry.BIOME_REGISTRY)#if MC_1_18 || MC_1_19 || MC_1_20 , level #endif , chunkPos, level.getLevel().getChunkSource().getGenerator().getBiomeSource(), tagLevel.contains("Biomes", 11) ? tagLevel.getIntArray("Biomes") : null); TickList blockTicks = tagLevel.contains(BLOCK_TICKS_TAG_PRE18, 9) ? ChunkTickList.create(tagLevel.getList(BLOCK_TICKS_TAG_PRE18, 10), Registry.BLOCK::getKey, Registry.BLOCK::get) : new ProtoTickList(block -> (block == null || block.defaultBlockState().isAir()), chunkPos, - tagLevel.getList("ToBeTicked", 9)#if POST_MC_1_17_1 , level #endif ); + tagLevel.getList("ToBeTicked", 9)#if MC_1_18 || MC_1_19 || MC_1_20 , level #endif ); TickList fluidTicks = tagLevel.contains(FLUID_TICKS_TAG_PRE18, 9) ? ChunkTickList.create(tagLevel.getList(FLUID_TICKS_TAG_PRE18, 10), Registry.FLUID::getKey, Registry.FLUID::get) : new ProtoTickList(fluid -> (fluid == null || fluid == Fluids.EMPTY), chunkPos, - tagLevel.getList("LiquidsToBeTicked", 9)#if POST_MC_1_17_1 , level #endif ); + tagLevel.getList("LiquidsToBeTicked", 9)#if MC_1_18 || MC_1_19 || MC_1_20 , level #endif ); #else - #if PRE_MC_1_19_4 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 LevelChunkTicks blockTicks = LevelChunkTicks.load(tagLevel.getList(BLOCK_TICKS_TAG_18, 10), string -> Registry.BLOCK.getOptional(ResourceLocation.tryParse(string)), chunkPos); LevelChunkTicks fluidTicks = LevelChunkTicks.load(tagLevel.getList(FLUID_TICKS_TAG_18, 10), @@ -291,7 +291,7 @@ public class ChunkLoader LevelChunkSection[] levelChunkSections = readSections(level, chunkPos, tagLevel); // ====================== Make the chunk ========================= - #if PRE_MC_1_18_2 + #if MC_1_16 || MC_1_17 LevelChunk chunk = new LevelChunk((Level) level.getLevel(), chunkPos, chunkBiomeContainer, upgradeData, blockTicks, fluidTicks, inhabitedTime, levelChunkSections, null); #else diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DhLitWorldGenRegion.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DhLitWorldGenRegion.java index 34a27482d..b384ca2bb 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DhLitWorldGenRegion.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DhLitWorldGenRegion.java @@ -41,7 +41,7 @@ import net.minecraft.util.Mth; import net.minecraft.world.entity.Entity; import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.ColorResolver; -#if POST_MC_1_17_1 +#if MC_1_18 || MC_1_19 || MC_1_20 import net.minecraft.world.level.LevelHeightAccessor; #endif import net.minecraft.world.level.LightLayer; @@ -73,11 +73,11 @@ public class DhLitWorldGenRegion extends WorldGenRegion */ ReentrantLock getChunkLock = new ReentrantLock(); - #if PRE_MC_1_18_2 + #if MC_1_16 || MC_1_17 private ChunkPos overrideCenterPos = null; public void setOverrideCenter(ChunkPos pos) { overrideCenterPos = pos; } - #if PRE_MC_1_17_1 + #if MC_1_16 @Override public int getCenterX() { @@ -104,7 +104,7 @@ public class DhLitWorldGenRegion extends WorldGenRegion List chunkList, ChunkStatus chunkStatus, int writeRadius, BatchGenerationEnvironment.EmptyChunkGenerator generator) { - super(serverLevel, chunkList #if POST_MC_1_17_1 , chunkStatus, writeRadius #endif ); + super(serverLevel, chunkList #if MC_1_18 || MC_1_19 || MC_1_20 , chunkStatus, writeRadius #endif ); this.firstPos = chunkList.get(0).getPos(); this.generator = generator; this.lightEngine = lightEngine; @@ -115,7 +115,7 @@ public class DhLitWorldGenRegion extends WorldGenRegion - #if POST_MC_1_17_1 + #if MC_1_18 || MC_1_19 || MC_1_20 // Bypass BCLib mixin overrides. @Override public boolean ensureCanWrite(BlockPos blockPos) @@ -130,7 +130,7 @@ public class DhLitWorldGenRegion extends WorldGenRegion { return false; } - #if POST_MC_1_18_2 + #if MC_1_19 || MC_1_20 if (center.isUpgrading()) { LevelHeightAccessor levelHeightAccessor = center.getHeightAccessorForGeneration(); @@ -185,7 +185,7 @@ public class DhLitWorldGenRegion extends WorldGenRegion BlockState blockState = this.getBlockState(blockPos); // This is a bypass for the spawner block since MC complains about not having it - #if POST_MC_1_17_1 + #if MC_1_18 || MC_1_19 || MC_1_20 if (blockState.getBlock() instanceof SpawnerBlock) { return ((EntityBlock) blockState.getBlock()).newBlockEntity(blockPos, blockState); @@ -269,7 +269,7 @@ public class DhLitWorldGenRegion extends WorldGenRegion ChunkAccess chunk = getChunkAccess(i, j, chunkStatus, bl); if (chunk instanceof LevelChunk) { - chunk = new ImposterProtoChunk((LevelChunk) chunk #if POST_MC_1_18_2 , true #endif ); + chunk = new ImposterProtoChunk((LevelChunk) chunk #if MC_1_18 || MC_1_19 || MC_1_20 , true #endif ); } return chunk; } @@ -331,7 +331,7 @@ public class DhLitWorldGenRegion extends WorldGenRegion private Biome _getBiome(BlockPos pos) { - #if POST_MC_1_18_2 + #if MC_1_18 || MC_1_19 || MC_1_20 return getBiome(pos).value(); #else return getBiome(pos); @@ -340,7 +340,7 @@ public class DhLitWorldGenRegion extends WorldGenRegion public int calculateBlockTint(BlockPos blockPos, ColorResolver colorResolver) { - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 int i = (Minecraft.getInstance()).options.biomeBlendRadius; #else int i = (Minecraft.getInstance()).options.biomeBlendRadius().get(); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DummyLightEngine.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DummyLightEngine.java index 106af9f4a..ad6334ece 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DummyLightEngine.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DummyLightEngine.java @@ -39,7 +39,7 @@ public class DummyLightEngine extends LevelLightEngine } - #if PRE_MC_1_20_1 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 @Override public void onBlockEmissionIncrease(BlockPos blockPos, int i) { } @@ -63,7 +63,7 @@ public class DummyLightEngine extends LevelLightEngine #endif @Override - public void queueSectionData(LightLayer lightLayer, SectionPos sectionPos, @Nullable DataLayer dataLayer #if PRE_MC_1_20_1 , boolean bl #endif ) { } + public void queueSectionData(LightLayer lightLayer, SectionPos sectionPos, @Nullable DataLayer dataLayer #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 , boolean bl #endif ) { } @Override public void checkBlock(BlockPos blockPos) { } @@ -87,7 +87,7 @@ public class DummyLightEngine extends LevelLightEngine @Override public void retainData(ChunkPos chunkPos, boolean bl) { } - #if POST_MC_1_17_1 + #if MC_1_18 || MC_1_19 || MC_1_20 @Override public int getLightSectionCount() { throw new UnsupportedOperationException("This should never be used!"); } @Override diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/LightGetterAdaptor.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/LightGetterAdaptor.java index b18b8f41b..91add021d 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/LightGetterAdaptor.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/LightGetterAdaptor.java @@ -23,12 +23,12 @@ import com.seibel.distanthorizons.core.dependencyInjection.ModAccessorInjector; import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IStarlightAccessor; import net.minecraft.world.level.BlockGetter; -#if POST_MC_1_17_1 +#if MC_1_18 || MC_1_19 || MC_1_20 import net.minecraft.world.level.LevelHeightAccessor; #endif import net.minecraft.world.level.chunk.ChunkStatus; import net.minecraft.world.level.chunk.LightChunkGetter; -#if POST_MC_1_20_1 +#if MC_1_20_2 || MC_1_20_4 import net.minecraft.world.level.chunk.LightChunk; #endif @@ -50,7 +50,7 @@ public class LightGetterAdaptor implements LightChunkGetter } @Override - public #if PRE_MC_1_20_1 BlockGetter #else LightChunk #endif getChunkForLighting(int chunkX, int chunkZ) + public #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 BlockGetter #else LightChunk #endif getChunkForLighting(int chunkX, int chunkZ) { if (genRegion == null) throw new IllegalStateException("World Gen region has not been set!"); @@ -64,7 +64,7 @@ public class LightGetterAdaptor implements LightChunkGetter return shouldReturnNull ? null : (genRegion != null ? genRegion : heightGetter); } - #if POST_MC_1_17_1 + #if MC_1_18 || MC_1_19 || MC_1_20 public LevelHeightAccessor getLevelHeightAccessor() { return heightGetter; diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/RegionFileStorageExternalCache.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/RegionFileStorageExternalCache.java index 94fc0a2c3..761241c68 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/RegionFileStorageExternalCache.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/RegionFileStorageExternalCache.java @@ -70,7 +70,7 @@ public class RegionFileStorageExternalCache implements AutoCloseable { this.getRegionFileLock.lock(); - #if MC_1_16_5 || MC_1_17_1 + #if MC_1_16_5 || MC_1_17 rFile = this.storage.getRegionFile(pos); // keeping the region cache size low helps prevent concurrency issues @@ -90,7 +90,7 @@ public class RegionFileStorageExternalCache implements AutoCloseable } catch (ArrayIndexOutOfBoundsException e) { - #if MC_1_16_5 || MC_1_17_1 + #if MC_1_16_5 || MC_1_17 // the file just wasn't cached break; #else @@ -145,7 +145,7 @@ public class RegionFileStorageExternalCache implements AutoCloseable // Otherwise, check if file exist, and if so, add it to the cache Path storageFolderPath; - #if MC_1_16_5 || MC_1_17_1 + #if MC_1_16_5 || MC_1_17 storageFolderPath = this.storage.folder.toPath(); #else storageFolderPath = this.storage.folder; @@ -157,7 +157,7 @@ public class RegionFileStorageExternalCache implements AutoCloseable } Path regionFilePath = storageFolderPath.resolve("r." + pos.getRegionX() + "." + pos.getRegionZ() + ".mca"); - #if MC_1_16_5 || MC_1_17_1 + #if MC_1_16_5 || MC_1_17 rFile = new RegionFile(regionFilePath.toFile(), storageFolderPath.toFile(), false); #else rFile = new RegionFile(regionFilePath, storageFolderPath, false); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/WorldGenStructFeatManager.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/WorldGenStructFeatManager.java index 79259fd36..096e1ad84 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/WorldGenStructFeatManager.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/WorldGenStructFeatManager.java @@ -37,49 +37,49 @@ import net.minecraft.world.level.WorldGenLevel; import net.minecraft.world.level.chunk.ChunkAccess; import net.minecraft.world.level.chunk.ChunkStatus; import net.minecraft.world.level.levelgen.WorldGenSettings; -#if PRE_MC_1_19_2 +#if MC_1_16 || MC_1_17 || MC_1_18 import net.minecraft.world.level.levelgen.feature.ConfiguredStructureFeature; import net.minecraft.world.level.StructureFeatureManager; #else -#if POST_MC_1_19_4 +#if MC_1_19_4 || MC_1_20 import net.minecraft.world.level.levelgen.WorldOptions; #endif import net.minecraft.world.level.levelgen.structure.Structure; import net.minecraft.world.level.StructureManager; #endif -#if POST_MC_1_18_2 +#if MC_1_18 || MC_1_19 || MC_1_20 import net.minecraft.world.level.levelgen.structure.StructureCheck; #endif import net.minecraft.world.level.levelgen.structure.StructureStart; -#if PRE_MC_1_18_2 +#if MC_1_16 || MC_1_17 import net.minecraft.world.level.levelgen.feature.StructureFeature; #endif -public class WorldGenStructFeatManager extends #if PRE_MC_1_19_2 StructureFeatureManager #else StructureManager #endif +public class WorldGenStructFeatManager extends #if MC_1_16 || MC_1_17 || MC_1_18 StructureFeatureManager #else StructureManager #endif { final WorldGenLevel genLevel; - #if PRE_MC_1_19_4 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 WorldGenSettings worldGenSettings; #else WorldOptions worldOptions; #endif - #if POST_MC_1_18_2 + #if MC_1_18 || MC_1_19 || MC_1_20 StructureCheck structureCheck; #endif - #if PRE_MC_1_19_4 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 public WorldGenStructFeatManager( WorldGenSettings worldGenSettings, - WorldGenLevel genLevel #if POST_MC_1_18_2 , StructureCheck structureCheck #endif ) + WorldGenLevel genLevel #if MC_1_18 || MC_1_19 || MC_1_20 , StructureCheck structureCheck #endif ) { - super(genLevel, worldGenSettings #if POST_MC_1_18_2 , structureCheck #endif ); + super(genLevel, worldGenSettings #if MC_1_18 || MC_1_19 || MC_1_20 , structureCheck #endif ); this.genLevel = genLevel; this.worldGenSettings = worldGenSettings; } @@ -100,8 +100,8 @@ public class WorldGenStructFeatManager extends #if PRE_MC_1_19_2 StructureFeatur { if (worldGenRegion == genLevel) return this; - #if PRE_MC_1_19_4 - return new WorldGenStructFeatManager(worldGenSettings, worldGenRegion #if POST_MC_1_18_2 , structureCheck #endif ); + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + return new WorldGenStructFeatManager(worldGenSettings, worldGenRegion #if MC_1_18 || MC_1_19 || MC_1_20 , structureCheck #endif ); #else return new WorldGenStructFeatManager(worldOptions, worldGenRegion, structureCheck); #endif @@ -113,7 +113,7 @@ public class WorldGenStructFeatManager extends #if PRE_MC_1_19_2 StructureFeatur return genLevel.getChunk(x, z, status, false); } - #if PRE_MC_1_18_2 + #if MC_1_16 || MC_1_17 @Override public Stream> startsForFeature( SectionPos sectionPos2, @@ -165,7 +165,7 @@ public class WorldGenStructFeatManager extends #if PRE_MC_1_19_2 StructureFeatur return builder.build(); } #else - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 @Override public List startsForFeature(SectionPos sectionPos, Predicate> predicate) { diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepBiomes.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepBiomes.java index 0ea6286a2..7d3571264 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepBiomes.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepBiomes.java @@ -27,12 +27,12 @@ import com.seibel.distanthorizons.common.wrappers.worldGeneration.BatchGeneratio import com.seibel.distanthorizons.common.wrappers.worldGeneration.ThreadedParameters; import net.minecraft.server.level.WorldGenRegion; -#if PRE_MC_1_19_2 +#if MC_1_16 || MC_1_17 || MC_1_18 #endif import net.minecraft.world.level.chunk.ChunkAccess; import net.minecraft.world.level.chunk.ChunkStatus; import net.minecraft.world.level.chunk.ProtoChunk; -#if POST_MC_1_18_2 +#if MC_1_18 || MC_1_19 || MC_1_20 import net.minecraft.world.level.levelgen.blending.Blender; #endif @@ -65,12 +65,12 @@ public final class StepBiomes for (ChunkAccess chunk : chunksToDo) { // System.out.println("StepBiomes: "+chunk.getPos()); - #if PRE_MC_1_18_2 + #if MC_1_16 || MC_1_17 environment.params.generator.createBiomes(environment.params.biomes, chunk); - #elif PRE_MC_1_19_2 + #elif MC_1_16 || MC_1_17 || MC_1_18 chunk = environment.joinSync(environment.params.generator.createBiomes(environment.params.biomes, Runnable::run, Blender.of(worldGenRegion), tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk)); - #elif PRE_MC_1_19_4 + #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 chunk = environment.joinSync(environment.params.generator.createBiomes(environment.params.biomes, Runnable::run, environment.params.randomState, Blender.of(worldGenRegion), tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk)); #else diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepFeatures.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepFeatures.java index 8f2b94fb8..7d36c5038 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepFeatures.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepFeatures.java @@ -32,7 +32,7 @@ import net.minecraft.world.level.chunk.ChunkAccess; import net.minecraft.world.level.chunk.ChunkStatus; import net.minecraft.world.level.chunk.ProtoChunk; import net.minecraft.world.level.levelgen.Heightmap; -#if POST_MC_1_18_2 +#if MC_1_19 || MC_1_20 #endif public final class StepFeatures @@ -65,7 +65,7 @@ public final class StepFeatures { try { - #if PRE_MC_1_18_2 + #if MC_1_16 || MC_1_17 worldGenRegion.setOverrideCenter(chunk.getPos()); environment.params.generator.applyBiomeDecoration(worldGenRegion, tParams.structFeat); #else diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepNoise.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepNoise.java index f2670d97a..a520c7015 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepNoise.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepNoise.java @@ -28,14 +28,14 @@ import com.seibel.distanthorizons.common.wrappers.worldGeneration.ThreadedParame import com.seibel.distanthorizons.core.util.objects.UncheckedInterruptedException; import net.minecraft.server.level.WorldGenRegion; -#if POST_MC_1_17_1 +#if MC_1_18 || MC_1_19 || MC_1_20 #endif -#if PRE_MC_1_19_2 +#if MC_1_16 || MC_1_17 || MC_1_18 #endif import net.minecraft.world.level.chunk.ChunkAccess; import net.minecraft.world.level.chunk.ChunkStatus; import net.minecraft.world.level.chunk.ProtoChunk; -#if POST_MC_1_18_2 +#if MC_1_18 || MC_1_19 || MC_1_20 import net.minecraft.world.level.levelgen.blending.Blender; #endif @@ -69,12 +69,12 @@ public final class StepNoise for (ChunkAccess chunk : chunksToDo) { // System.out.println("StepNoise: "+chunk.getPos()); - #if PRE_MC_1_17_1 + #if MC_1_16 environment.params.generator.fillFromNoise(worldGenRegion, tParams.structFeat, chunk); - #elif PRE_MC_1_18_2 + #elif MC_1_16 || MC_1_17 chunk = environment.joinSync(environment.params.generator.fillFromNoise(Runnable::run, tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk)); - #elif PRE_MC_1_19_2 + #elif MC_1_16 || MC_1_17 || MC_1_18 chunk = environment.joinSync(environment.params.generator.fillFromNoise(Runnable::run, Blender.of(worldGenRegion), tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk)); #else diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepStructureReference.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepStructureReference.java index e9bc14cfb..1320280f5 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepStructureReference.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepStructureReference.java @@ -27,7 +27,7 @@ import com.seibel.distanthorizons.common.wrappers.worldGeneration.BatchGeneratio import com.seibel.distanthorizons.common.wrappers.worldGeneration.ThreadedParameters; import net.minecraft.server.level.WorldGenRegion; -#if PRE_MC_1_19_2 +#if MC_1_16 || MC_1_17 || MC_1_18 #endif import net.minecraft.world.level.chunk.ChunkAccess; import net.minecraft.world.level.chunk.ChunkStatus; diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepStructureStart.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepStructureStart.java index b4d76c08d..e8a18e566 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepStructureStart.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepStructureStart.java @@ -77,10 +77,10 @@ public final class StepStructureStart } } - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 if (environment.params.worldGenSettings.generateFeatures()) { - #elif PRE_MC_1_19_4 + #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 if (environment.params.worldGenSettings.generateStructures()) { #else if (environment.params.worldOptions.generateStructures()) @@ -98,10 +98,10 @@ public final class StepStructureStart // and should prevent some concurrency issues STRUCTURE_PLACEMENT_LOCK.lock(); - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 environment.params.generator.createStructures(environment.params.registry, tParams.structFeat, chunk, environment.params.structures, environment.params.worldSeed); - #elif PRE_MC_1_19_4 + #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 environment.params.generator.createStructures(environment.params.registry, environment.params.randomState, tParams.structFeat, chunk, environment.params.structures, environment.params.worldSeed); #else @@ -110,7 +110,7 @@ public final class StepStructureStart tParams.structFeat, chunk, environment.params.structures); #endif - #if POST_MC_1_18_2 + #if MC_1_19 || MC_1_20 try { tParams.structCheck.onStructureLoad(chunk.getPos(), chunk.getAllStarts()); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepSurface.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepSurface.java index 39c4a6e8d..a50adc7a4 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepSurface.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepSurface.java @@ -61,9 +61,9 @@ public final class StepSurface for (ChunkAccess chunk : chunksToDo) { // System.out.println("StepSurface: "+chunk.getPos()); - #if PRE_MC_1_18_2 + #if MC_1_16 || MC_1_17 environment.params.generator.buildSurfaceAndBedrock(worldGenRegion, chunk); - #elif PRE_MC_1_19_2 + #elif MC_1_16 || MC_1_17 || MC_1_18 environment.params.generator.buildSurface(worldGenRegion, tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk); #else environment.params.generator.buildSurface(worldGenRegion, tParams.structFeat.forWorldGenRegion(worldGenRegion), environment.params.randomState, chunk); diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricClientProxy.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricClientProxy.java index 6eb5f15e4..9f23e8596 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricClientProxy.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricClientProxy.java @@ -205,7 +205,7 @@ public class FabricClientProxy #if MC_1_16_5 SeamlessOverdraw.applyLegacyProjectionMatrix(matrixFloatArray); - #elif PRE_MC_1_19_4 + #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 renderContext.projectionMatrix().load(FloatBuffer.wrap(matrixFloatArray)); #else renderContext.projectionMatrix().set(matrixFloatArray); diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricMain.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricMain.java index 5941f54c9..c43b73d85 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricMain.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricMain.java @@ -59,7 +59,7 @@ public class FabricMain if (Config.Client.Advanced.Graphics.Fog.disableVanillaFog.get() && SingletonInjector.INSTANCE.get(IModChecker.class).isModLoaded("bclib")) ModAccessorInjector.INSTANCE.get(IBCLibAccessor.class).setRenderCustomFog(false); // Remove BCLib's fog - #if POST_MC_1_20_1 + #if MC_1_20_2 || MC_1_20_4 if (SingletonInjector.INSTANCE.get(IModChecker.class).isModLoaded("sodium")) ModAccessorInjector.INSTANCE.get(ISodiumAccessor.class).setFogOcclusion(false); // FIXME: This is a tmp fix for sodium 0.5.0, and 0.5.1. This is fixed in sodium 0.5.2 #endif @@ -118,7 +118,7 @@ public class FabricMain ModAccessorInjector.INSTANCE.bind(IBCLibAccessor.class, new BCLibAccessor()); } - #if MC_1_16_5 || MC_1_18_2 || MC_1_19_2 || MC_1_19_4 || MC_1_20_1 + #if MC_1_16_5 || MC_1_18 || MC_1_19 || MC_1_20_1 // 1.17.1 won't support this since there isn't a matching Iris version if (modChecker.isModLoaded("iris")) { diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientLevel.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientLevel.java index 4343c34a7..a617a6faa 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientLevel.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientLevel.java @@ -24,7 +24,7 @@ import com.seibel.distanthorizons.common.wrappers.world.ClientLevelWrapper; import com.seibel.distanthorizons.core.api.internal.ClientApi; import com.seibel.distanthorizons.core.api.internal.SharedApi; import net.minecraft.client.multiplayer.ClientLevel; -#if POST_MC_1_18_2 +#if MC_1_19 || MC_1_20 #endif import net.minecraft.world.level.chunk.LevelChunk; import org.spongepowered.asm.mixin.Mixin; @@ -44,14 +44,14 @@ public class MixinClientLevel // //Moved to MixinClientPacketListener // @Inject(method = "", at = @At("TAIL")) // private void loadWorldEvent(ClientPacketListener clientPacketListener, ClientLevel.ClientLevelData clientLevelData, ResourceKey resourceKey, -// #if POST_MC_1_18_2 Holder holder, #else DimensionType dimensionType, #endif int i, -// #if POST_MC_1_18_2 int j, #endif Supplier supplier, LevelRenderer levelRenderer, boolean bl, long l, CallbackInfo ci) +// #if MC_1_19 || MC_1_20 Holder holder, #else DimensionType dimensionType, #endif int i, +// #if MC_1_19 || MC_1_20 int j, #endif Supplier supplier, LevelRenderer levelRenderer, boolean bl, long l, CallbackInfo ci) // { // ClientApi.INSTANCE.clientLevelLoadEvent(WorldWrapper.getWorldWrapper((ClientLevel)(Object)this)); // } // Moved to overriding the enableChunkLight(...) method over at ClientPacketListener for 1.20+ - #if POST_MC_1_18_2 && PRE_MC_1_20_1 // Only the setLightReady is only available after 1.18. This ensures the light data is ready. + #if (MC_1_19 || MC_1_20) && (MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19) // Only the setLightReady is only available after 1.18. This ensures the light data is ready. @Inject(method = "setLightReady", at = @At("HEAD")) private void onChunkLightReady(int x, int z, CallbackInfo ci) { diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientPacketListener.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientPacketListener.java index b290d6aad..d86208188 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientPacketListener.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientPacketListener.java @@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -#if POST_MC_1_20_1 +#if MC_1_20_2 || MC_1_20_4 import com.seibel.distanthorizons.core.wrapperInterfaces.world.IClientLevelWrapper; import net.minecraft.world.level.chunk.LevelChunk; import com.seibel.distanthorizons.common.wrappers.chunk.ChunkWrapper; @@ -31,7 +31,7 @@ public class MixinClientPacketListener @Inject(method = "handleRespawn", at = @At("RETURN")) void onHandleRespawnEnd(CallbackInfo ci) { ClientApi.INSTANCE.clientLevelLoadEvent(ClientLevelWrapper.getWrapper(this.level)); } - #if PRE_MC_1_19_4 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 @Inject(method = "cleanup", at = @At("HEAD")) #else @Inject(method = "close", at = @At("HEAD")) @@ -45,7 +45,7 @@ public class MixinClientPacketListener ClientApi.INSTANCE.onClientOnlyDisconnected(); } - #if POST_MC_1_20_1 + #if MC_1_20_2 || MC_1_20_4 @Inject(method = "enableChunkLight", at = @At("TAIL")) void onEnableChunkLight(LevelChunk chunk, int x, int z, CallbackInfo ci) { diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinFogRenderer.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinFogRenderer.java index ead892c02..d01145bf5 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinFogRenderer.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinFogRenderer.java @@ -35,7 +35,7 @@ import net.minecraft.client.renderer.FogRenderer.FogMode; import net.minecraft.world.effect.MobEffects; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; -#if PRE_MC_1_17_1 +#if MC_1_16 import net.minecraft.world.level.material.FluidState; #else import net.minecraft.world.level.material.FogType; @@ -50,14 +50,14 @@ public class MixinFogRenderer private static final float A_EVEN_LARGER_VALUE = 42069420694206942069.F; @Inject(at = @At("RETURN"), method = "setupFog") - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 private static void disableSetupFog(Camera camera, FogMode fogMode, float f, boolean bl, CallbackInfo callback) { #else private static void disableSetupFog(Camera camera, FogMode fogMode, float f, boolean bl, float g, CallbackInfo callback) { #endif - #if PRE_MC_1_17_1 + #if MC_1_16 FluidState fluidState = camera.getFluidInCamera(); boolean cameraNotInFluid = fluidState.isEmpty(); #else @@ -71,7 +71,7 @@ public class MixinFogRenderer && !SingletonInjector.INSTANCE.get(IMinecraftRenderWrapper.class).isFogStateSpecial() && Config.Client.Advanced.Graphics.Fog.disableVanillaFog.get()) { - #if PRE_MC_1_17_1 + #if MC_1_16 RenderSystem.fogStart(A_REALLY_REALLY_BIG_VALUE); RenderSystem.fogEnd(A_EVEN_LARGER_VALUE); #else diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinGameRenderer.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinGameRenderer.java index 27b97fe65..5da0b369e 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinGameRenderer.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinGameRenderer.java @@ -16,7 +16,7 @@ public class MixinGameRenderer private static final Logger LOGGER = LogManager.getLogger(MixinGameRenderer.class.getSimpleName()); - #if POST_MC_1_17_1 + #if MC_1_18 || MC_1_19 || MC_1_20 // FIXME: This I think will dup multiple renderStartupEvent calls... @Inject(method = {"reloadShaders", "preloadUiShader"}, at = @At("TAIL")) public void onStartupShaders(CallbackInfo ci) diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinLevelRenderer.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinLevelRenderer.java index 5c687cd4e..8422bebf4 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinLevelRenderer.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinLevelRenderer.java @@ -20,7 +20,7 @@ package com.seibel.distanthorizons.fabric.mixins.client; import com.mojang.blaze3d.vertex.PoseStack; -#if PRE_MC_1_19_4 +#if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 import com.mojang.math.Matrix4f; #else import net.minecraft.client.Camera; @@ -67,7 +67,7 @@ public class MixinLevelRenderer // Inject rendering at first call to renderChunkLayer // HEAD or RETURN - #if PRE_MC_1_17_1 + #if MC_1_16 @Inject(at = @At("RETURN"), method = "renderSky(Lcom/mojang/blaze3d/vertex/PoseStack;F)V") private void renderSky(PoseStack matrixStackIn, float partialTicks, CallbackInfo callback) { @@ -84,17 +84,17 @@ public class MixinLevelRenderer } #endif - #if PRE_MC_1_17_1 + #if MC_1_16 @Inject(at = @At("HEAD"), method = "renderChunkLayer(Lnet/minecraft/client/renderer/RenderType;Lcom/mojang/blaze3d/vertex/PoseStack;DDD)V", cancellable = true) private void renderChunkLayer(RenderType renderType, PoseStack matrixStackIn, double xIn, double yIn, double zIn, CallbackInfo callback) - #elif PRE_MC_1_19_4 + #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 @Inject(at = @At("HEAD"), method = "renderChunkLayer(Lnet/minecraft/client/renderer/RenderType;Lcom/mojang/blaze3d/vertex/PoseStack;DDDLcom/mojang/math/Matrix4f;)V", cancellable = true) private void renderChunkLayer(RenderType renderType, PoseStack modelViewMatrixStack, double cameraXBlockPos, double cameraYBlockPos, double cameraZBlockPos, Matrix4f projectionMatrix, CallbackInfo callback) - #elif PRE_MC_1_20_2 + #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 @Inject(at = @At("HEAD"), method = "renderChunkLayer(Lnet/minecraft/client/renderer/RenderType;Lcom/mojang/blaze3d/vertex/PoseStack;DDDLorg/joml/Matrix4f;)V", cancellable = true) @@ -113,10 +113,10 @@ public class MixinLevelRenderer } } - #if PRE_MC_1_19_4 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 @Inject(at = @At(value = "TAIL", target = "Lnet/minecraft/world/level/lighting/LevelLightEngine;runUpdates(IZZ)I"), method = "renderLevel") public void callAfterRunUpdates(PoseStack poseStack, float partialTick, long finishNanoTime, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightTexture lightTexture, Matrix4f projectionMatrix, CallbackInfo ci) - #elif PRE_MC_1_20_1 + #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 @Inject(at = @At(value = "TAIL", target = "Lnet/minecraft/world/level/lighting/LevelLightEngine;runUpdates(IZZ)I"), method = "renderLevel") public void callAfterRunUpdates(PoseStack poseStack, float partialTick, long finishNanoTime, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightTexture lightTexture, Matrix4f projectionMatrix, CallbackInfo ci) #else diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinMinecraft.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinMinecraft.java index 92d79850a..8c4a32972 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinMinecraft.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinMinecraft.java @@ -25,7 +25,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(Minecraft.class) public class MixinMinecraft { - #if PRE_MC_1_20_2 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 #if MC_1_20_1 @Redirect( method = "Lnet/minecraft/client/Minecraft;setInitialScreen(Lcom/mojang/realmsclient/client/RealmsClient;Lnet/minecraft/server/packs/resources/ReloadInstance;Lnet/minecraft/client/main/GameConfig$QuickPlayData;)V", @@ -61,7 +61,7 @@ public class MixinMinecraft } #endif - #if POST_MC_1_20_2 + #if MC_1_20_4 @Redirect( method = "Lnet/minecraft/client/Minecraft;onGameLoadFinished(Lnet/minecraft/client/Minecraft$GameLoadCookie;)V", at = @At(value = "INVOKE", target = "Ljava/lang/Runnable;run()V") diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinOptionsScreen.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinOptionsScreen.java index 7fbb823a1..5df2f3cf8 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinOptionsScreen.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinOptionsScreen.java @@ -26,7 +26,7 @@ import com.seibel.distanthorizons.core.config.Config; import net.minecraft.client.gui.screens.OptionsScreen; import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.Component; -#if PRE_MC_1_19_2 +#if MC_1_16 || MC_1_17 || MC_1_18 import net.minecraft.network.chat.TranslatableComponent; #endif import net.minecraft.resources.ResourceLocation; @@ -57,7 +57,7 @@ public class MixinOptionsScreen extends Screen private void lodconfig$init(CallbackInfo ci) { if (Config.Client.optionsButton.get()) - this. #if PRE_MC_1_17_1 addButton #else addRenderableWidget #endif + this. #if MC_1_16 addButton #else addRenderableWidget #endif (new TexturedButtonWidget( // Where the button is on the screen this.width / 2 - 180, this.height / 6 - 12, @@ -71,7 +71,7 @@ public class MixinOptionsScreen extends Screen // For now it goes to the client option by default (buttonWidget) -> Objects.requireNonNull(minecraft).setScreen(GetConfigScreen.getScreen(this)), // Add a title to the utton - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 new TranslatableComponent(ModInfo.ID + ".title"))); #else Component.translatable(ModInfo.ID + ".title"))); diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/events/MixinServerLevel.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/events/MixinServerLevel.java index a475b61a6..765b8deac 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/events/MixinServerLevel.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/events/MixinServerLevel.java @@ -31,7 +31,7 @@ import org.spongepowered.asm.mixin.Mixin; @Deprecated // TODO: Not sure if this is needed anymore public class MixinServerLevel { -// #if PRE_MC_1_17_1 +// #if MC_1_16 // @Inject(method = "save", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/level/ServerChunkCache;save(Z)V", shift = At.Shift.AFTER)) // private void saveWorldEvent(ProgressListener progressListener, boolean bl, boolean bl2, CallbackInfo ci) { // Main.client_proxy.worldSaveEvent(); diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/mods/sodium/MixinSodiumRenderer.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/mods/sodium/MixinSodiumRenderer.java index bb9741d58..6b4c4d2a4 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/mods/sodium/MixinSodiumRenderer.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/mods/sodium/MixinSodiumRenderer.java @@ -2,7 +2,7 @@ package com.seibel.distanthorizons.fabric.mixins.mods.sodium; /* Removed since DH now uses Indium so we can use the Fabric rendering API instead -#if POST_MC_1_20_1 +#if MC_1_20_2 || MC_1_20_4 // Sodium 0.5 import com.mojang.blaze3d.vertex.PoseStack; import com.seibel.distanthorizons.core.api.internal.ClientApi; @@ -55,7 +55,7 @@ public class MixinSodiumRenderer } -#elif POST_MC_1_17_1 +#elif MC_1_18 || MC_1_19 || MC_1_20 // Sodium 0.3 to 0.4 import com.seibel.distanthorizons.core.api.internal.ClientApi; import com.seibel.distanthorizons.core.dependencyInjection.ModAccessorInjector; diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinChunkGenerator.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinChunkGenerator.java index e0d28ec86..fce9efd57 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinChunkGenerator.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinChunkGenerator.java @@ -22,7 +22,7 @@ package com.seibel.distanthorizons.fabric.mixins.server; import org.spongepowered.asm.mixin.Mixin; import net.minecraft.world.level.chunk.ChunkGenerator; -#if PRE_MC_1_18_2 +#if MC_1_16 || MC_1_17 import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinChunkMap.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinChunkMap.java index 90033b89a..1e9711597 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinChunkMap.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinChunkMap.java @@ -37,7 +37,7 @@ public class MixinChunkMap // MC has a tendency to try saving incomplete or corrupted chunks (which show up as empty or black chunks) // this logic should prevent that from happening - #if MC_1_16_5 || MC_1_17_1 + #if MC_1_16_5 || MC_1_17 if (chunk.isUnsaved() || chunk.getUpgradeData() != null || !chunk.isLightCorrect()) { return; @@ -55,7 +55,7 @@ public class MixinChunkMap //==================// // some chunks may be missing their biomes, which cause issues when attempting to save them - #if MC_1_16_5 || MC_1_17_1 + #if MC_1_16_5 || MC_1_17 if (chunk.getBiomes() == null) { return; diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinUtilBackgroundThread.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinUtilBackgroundThread.java index 6e58f36af..fe6b7b4c8 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinUtilBackgroundThread.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinUtilBackgroundThread.java @@ -50,7 +50,7 @@ public class MixinUtilBackgroundThread } } - #if POST_MC_1_17_1 + #if MC_1_18 || MC_1_19 || MC_1_20 @Inject(method = "wrapThreadWithTaskName(Ljava/lang/String;Ljava/lang/Runnable;)Ljava/lang/Runnable;", at = @At("HEAD"), cancellable = true) private static void overrideUtil$wrapThreadWithTaskName(String string, Runnable r, CallbackInfoReturnable ci) @@ -62,7 +62,7 @@ public class MixinUtilBackgroundThread } } #endif - #if POST_MC_1_18_2 + #if MC_1_19 || MC_1_20 @Inject(method = "wrapThreadWithTaskName(Ljava/lang/String;Ljava/util/function/Supplier;)Ljava/util/function/Supplier;", at = @At("HEAD"), cancellable = true) private static void overrideUtil$wrapThreadWithTaskNameForSupplier(String string, Supplier r, CallbackInfoReturnable> ci) diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/unsafe/MixinThreadingDetector.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/unsafe/MixinThreadingDetector.java index b6027388f..63f2e345e 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/unsafe/MixinThreadingDetector.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/unsafe/MixinThreadingDetector.java @@ -22,7 +22,7 @@ package com.seibel.distanthorizons.fabric.mixins.server.unsafe; import org.spongepowered.asm.mixin.Mixin; //FIXME: Is this still needed? -#if POST_MC_1_18_2 +#if MC_1_19 || MC_1_20 import net.minecraft.util.ThreadingDetector; import org.spongepowered.asm.mixin.Mutable; 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 a12f1f0a4..3d7ddf888 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,8 +1,8 @@ package com.seibel.distanthorizons.fabric.wrappers.modAccessor; import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IBCLibAccessor; -#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 +#if MC_1_16_5 || MC_1_17 || MC_1_20_4 // These versions either don't have BCLib, or the implementation is different +#elif MC_1_18 import ru.bclib.config.ClientConfig; import ru.bclib.config.Configs; #else @@ -17,7 +17,7 @@ public class BCLibAccessor implements IBCLibAccessor public void setRenderCustomFog(boolean newValue) { - #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 + #if !(MC_1_16_5 || MC_1_17 || 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/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/IrisAccessor.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/IrisAccessor.java index 37fe1b2a0..d08de388b 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/IrisAccessor.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/IrisAccessor.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.fabric.wrappers.modAccessor; -#if MC_1_16_5 || MC_1_18_2 || MC_1_19_2 || MC_1_19_4 || MC_1_20_1 +#if MC_1_16_5 || MC_1_18 || MC_1_19 || MC_1_20_1 import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IIrisAccessor; import net.coderbot.iris.Iris; diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/SodiumAccessor.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/SodiumAccessor.java index 72289277a..cd340c2e5 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/SodiumAccessor.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/SodiumAccessor.java @@ -33,7 +33,7 @@ import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.ISodiumAcce import com.seibel.distanthorizons.core.wrapperInterfaces.world.IClientLevelWrapper; import me.jellysquid.mods.sodium.client.render.SodiumWorldRenderer; import net.minecraft.client.Minecraft; -#if PRE_MC_1_17_1 +#if MC_1_16 import net.minecraft.nbt.CompoundTag; import net.minecraft.network.protocol.Packet; import net.minecraft.world.entity.Entity; @@ -60,21 +60,21 @@ public class SodiumAccessor implements ISodiumAccessor return "Sodium-Fabric"; } - #if POST_MC_1_17_1 + #if MC_1_18 || MC_1_19 || MC_1_20 @Override public HashSet getNormalRenderedChunks() { SodiumWorldRenderer renderer = SodiumWorldRenderer.instance(); LevelHeightAccessor height = Minecraft.getInstance().level; - #if POST_MC_1_20_1 + #if MC_1_20_2 || MC_1_20_4 // TODO: This is just a tmp solution, use a proper solution later return MC_RENDER.getMaximumRenderedChunks().stream().filter((DhChunkPos chunk) -> { return (renderer.isBoxVisible( chunk.getMinBlockX() + 1, height.getMinBuildHeight() + 1, chunk.getMinBlockZ() + 1, chunk.getMinBlockX() + 15, height.getMaxBuildHeight() - 1, chunk.getMinBlockZ() + 15)); }).collect(Collectors.toCollection(HashSet::new)); - #elif POST_MC_1_18_2 + #elif MC_1_19 || MC_1_20 // 0b11 = Lighted chunk & loaded chunk return renderer.getChunkTracker().getChunks(0b00).filter( (long l) -> { @@ -134,7 +134,7 @@ public class SodiumAccessor implements ISodiumAccessor @Override public void setFogOcclusion(boolean b) { - #if POST_MC_1_20_1 + #if MC_1_20_2 || MC_1_20_4 me.jellysquid.mods.sodium.client.SodiumClientMod.options().performance.useFogOcclusion = b; #endif } diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeClientProxy.java b/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeClientProxy.java index c96b8ce10..302475759 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeClientProxy.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeClientProxy.java @@ -36,7 +36,7 @@ import com.seibel.distanthorizons.coreapi.ModInfo; import net.minecraft.world.level.LevelAccessor; import net.minecraft.client.multiplayer.ClientLevel; -#if PRE_MC_1_19_2 +#if MC_1_16 || MC_1_17 || MC_1_18 import net.minecraftforge.event.world.ChunkEvent; import net.minecraftforge.event.world.WorldEvent; #else @@ -44,7 +44,7 @@ import net.minecraftforge.event.level.ChunkEvent; import net.minecraftforge.event.level.LevelEvent; #endif -#if POST_MC_1_18_2 +#if MC_1_19 || MC_1_20 import net.minecraftforge.client.event.RenderLevelStageEvent; #endif import net.minecraftforge.event.entity.player.PlayerInteractEvent; @@ -79,7 +79,7 @@ public class ForgeClientProxy // private static SimpleChannel multiversePluginChannel; - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 private static LevelAccessor GetEventLevel(WorldEvent e) { return e.getWorld(); } #else private static LevelAccessor GetEventLevel(LevelEvent e) { return e.getLevel(); } @@ -107,7 +107,7 @@ public class ForgeClientProxy //==============// @SubscribeEvent - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 public void clientLevelLoadEvent(WorldEvent.Load event) #else public void clientLevelLoadEvent(LevelEvent.Load event) @@ -115,7 +115,7 @@ public class ForgeClientProxy { LOGGER.info("level load"); - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 LevelAccessor level = event.getWorld(); #else LevelAccessor level = event.getLevel(); @@ -131,7 +131,7 @@ public class ForgeClientProxy ClientApi.INSTANCE.clientLevelLoadEvent(clientLevelWrapper); } @SubscribeEvent - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 public void clientLevelUnloadEvent(WorldEvent.Unload event) #else public void clientLevelUnloadEvent(LevelEvent.Load event) @@ -139,7 +139,7 @@ public class ForgeClientProxy { LOGGER.info("level unload"); - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 LevelAccessor level = event.getWorld(); #else LevelAccessor level = event.getLevel(); @@ -165,7 +165,7 @@ public class ForgeClientProxy { LOGGER.trace("interact or block place event at blockPos: " + event.getPos()); - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 LevelAccessor level = event.getWorld(); #else LevelAccessor level = event.getLevel(); @@ -179,7 +179,7 @@ public class ForgeClientProxy { LOGGER.trace("break or block attack at blockPos: " + event.getPos()); - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 LevelAccessor level = event.getWorld(); #else LevelAccessor level = event.getLevel(); @@ -217,7 +217,7 @@ public class ForgeClientProxy //==============// @SubscribeEvent - public void registerKeyBindings(#if PRE_MC_1_19_2 InputEvent.KeyInputEvent #else InputEvent.Key #endif event) + public void registerKeyBindings(#if MC_1_16 || MC_1_17 || MC_1_18 InputEvent.KeyInputEvent #else InputEvent.Key #endif event) { if (Minecraft.getInstance().player == null) { @@ -298,15 +298,15 @@ public class ForgeClientProxy //===========// @SubscribeEvent - #if POST_MC_1_18_2 + #if MC_1_19 || MC_1_20 public void afterLevelRenderEvent(RenderLevelStageEvent event) #else public void afterLevelRenderEvent(TickEvent.RenderTickEvent event) #endif { - #if POST_MC_1_20_1 + #if MC_1_20_2 || MC_1_20_4 if (event.getStage() == RenderLevelStageEvent.Stage.AFTER_LEVEL) - #elif POST_MC_1_18_2 + #elif MC_1_19 || MC_1_20 if (event.getStage() == RenderLevelStageEvent.Stage.AFTER_SOLID_BLOCKS) #else // FIXME: Is this the correct location for 1.16 & 1.17??? diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeMain.java b/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeMain.java index 6ee80e4de..dbf61fcd0 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeMain.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeMain.java @@ -39,7 +39,7 @@ import com.seibel.distanthorizons.forge.wrappers.modAccessor.OptifineAccessor; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.core.Direction; -#if POST_MC_1_19_2 +#if MC_1_19 || MC_1_20 import net.minecraft.util.RandomSource; #endif import net.minecraft.world.level.ColorResolver; @@ -51,11 +51,11 @@ import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.*; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; -#if PRE_MC_1_17_1 +#if MC_1_16 import net.minecraftforge.fml.ExtensionPoint; -#elif MC_1_17_1 +#elif MC_1_17 import net.minecraftforge.fmlclient.ConfigGuiHandler; -#elif POST_MC_1_18_2 && PRE_MC_1_19_2 +#elif MC_1_18 import net.minecraftforge.client.ConfigGuiHandler; #else import net.minecraftforge.client.ConfigScreenHandler; @@ -64,7 +64,7 @@ import net.minecraftforge.client.ConfigScreenHandler; import org.apache.logging.log4j.Logger; // these imports change due to forge refactoring classes in 1.19 -#if PRE_MC_1_19_2 +#if MC_1_16 || MC_1_17 || MC_1_18 import net.minecraftforge.client.model.data.ModelDataMap; import java.util.Random; @@ -128,10 +128,10 @@ public class ForgeMain implements LodForgeMethodCaller ModAccessorInjector.INSTANCE.bind(IOptifineAccessor.class, new OptifineAccessor()); } - #if PRE_MC_1_17_1 + #if MC_1_16 ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.CONFIGGUIFACTORY, () -> (client, parent) -> GetConfigScreen.getScreen(parent)); - #elif MC_1_17_1 || MC_1_18_2 || PRE_MC_1_19_2 + #elif MC_1_16 || MC_1_17 || MC_1_18 ModLoadingContext.get().registerExtensionPoint(ConfigGuiHandler.ConfigGuiFactory.class, () -> new ConfigGuiHandler.ConfigGuiFactory((client, parent) -> GetConfigScreen.getScreen(parent))); #else @@ -169,14 +169,14 @@ public class ForgeMain implements LodForgeMethodCaller LOGGER.info("Mod Post-Initialized"); } - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 private final ModelDataMap modelData = new ModelDataMap.Builder().build(); #else private final ModelData modelData = ModelData.EMPTY; #endif @Override - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 public List getQuads(MinecraftClientWrapper mc, Block block, BlockState blockState, Direction direction, Random random) { return mc.getModelManager().getBlockModelShaper().getBlockModel(block.defaultBlockState()).getQuads(blockState, direction, random, modelData); @@ -184,14 +184,14 @@ public class ForgeMain implements LodForgeMethodCaller #else public List getQuads(MinecraftClientWrapper mc, Block block, BlockState blockState, Direction direction, RandomSource random) { - return mc.getModelManager().getBlockModelShaper().getBlockModel(block.defaultBlockState()).getQuads(blockState, direction, random, modelData #if POST_MC_1_19_2 , RenderType.solid() #endif ); + return mc.getModelManager().getBlockModelShaper().getBlockModel(block.defaultBlockState()).getQuads(blockState, direction, random, modelData #if MC_1_19 || MC_1_20 , RenderType.solid() #endif ); } #endif @Override //TODO: Check this if its still needed public int colorResolverGetColor(ColorResolver resolver, Biome biome, double x, double z) { - #if MC_1_17_1______Still_needed + #if MC_1_17______Still_needed return resolver.m_130045_(biome, x, z); #else return resolver.getColor(biome, x, z); diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeServerProxy.java b/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeServerProxy.java index 46d2f5c6a..b646ecb12 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeServerProxy.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeServerProxy.java @@ -14,7 +14,7 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelAccessor; import net.minecraftforge.event.TickEvent; -#if PRE_MC_1_19_2 +#if MC_1_16 || MC_1_17 || MC_1_18 import net.minecraftforge.event.world.ChunkEvent; import net.minecraftforge.event.world.WorldEvent; #else @@ -26,7 +26,7 @@ import net.minecraftforge.eventbus.api.SubscribeEvent; #if MC_1_16_5 import net.minecraftforge.fml.event.server.FMLServerAboutToStartEvent; import net.minecraftforge.fml.event.server.FMLServerStoppingEvent; -#elif MC_1_17_1 +#elif MC_1_17 import net.minecraftforge.fmlserverevents.FMLServerAboutToStartEvent; import net.minecraftforge.fmlserverevents.FMLServerStoppingEvent; #else @@ -41,7 +41,7 @@ import java.util.function.Supplier; public class ForgeServerProxy { - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 private static LevelAccessor GetEventLevel(WorldEvent e) { return e.getWorld(); } #else private static LevelAccessor GetEventLevel(LevelEvent e) { return e.getLevel(); } @@ -81,21 +81,21 @@ public class ForgeServerProxy // ServerWorldLoadEvent @SubscribeEvent - public void dedicatedWorldLoadEvent(#if MC_1_16_5 || MC_1_17_1 FMLServerAboutToStartEvent #else ServerAboutToStartEvent #endif event) + public void dedicatedWorldLoadEvent(#if MC_1_16_5 || MC_1_17 FMLServerAboutToStartEvent #else ServerAboutToStartEvent #endif event) { this.serverApi.serverLoadEvent(this.isDedicated); } // ServerWorldUnloadEvent @SubscribeEvent - public void serverWorldUnloadEvent(#if MC_1_16_5 || MC_1_17_1 FMLServerStoppingEvent #else ServerStoppingEvent #endif event) + public void serverWorldUnloadEvent(#if MC_1_16_5 || MC_1_17 FMLServerStoppingEvent #else ServerStoppingEvent #endif event) { this.serverApi.serverUnloadEvent(); } // ServerLevelLoadEvent @SubscribeEvent - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 public void serverLevelLoadEvent(WorldEvent.Load event) #else public void serverLevelLoadEvent(LevelEvent.Load event) @@ -109,7 +109,7 @@ public class ForgeServerProxy // ServerLevelUnloadEvent @SubscribeEvent - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 public void serverLevelUnloadEvent(WorldEvent.Unload event) #else public void serverLevelUnloadEvent(LevelEvent.Unload event) diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinClientPacketListener.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinClientPacketListener.java index 1bb20e3fa..21ef500a5 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinClientPacketListener.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinClientPacketListener.java @@ -16,7 +16,7 @@ public class MixinClientPacketListener @Inject(method = "handleLogin", at = @At("RETURN")) void onHandleLoginEnd(CallbackInfo ci) { ClientApi.INSTANCE.onClientOnlyConnected(); } - #if PRE_MC_1_19_4 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 @Inject(method = "cleanup", at = @At("HEAD")) #else @Inject(method = "close", at = @At("HEAD")) diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinFogRenderer.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinFogRenderer.java index 597a9850b..a9e59c9ca 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinFogRenderer.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinFogRenderer.java @@ -35,7 +35,7 @@ import net.minecraft.client.renderer.FogRenderer.FogMode; import net.minecraft.world.effect.MobEffects; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; -#if PRE_MC_1_17_1 +#if MC_1_16 import net.minecraft.world.level.material.FluidState; #else import net.minecraft.world.level.material.FogType; @@ -53,10 +53,10 @@ public class MixinFogRenderer @Inject(at = @At("RETURN"), method = "setupFog(Lnet/minecraft/client/Camera;Lnet/minecraft/client/renderer/FogRenderer$FogMode;FZF)V", - remap = #if MC_1_17_1 || MC_1_18_2 false #else true #endif ) // Remap messiness due to this being weird in forge + remap = #if MC_1_17 || MC_1_18 false #else true #endif ) // Remap messiness due to this being weird in forge private static void disableSetupFog(Camera camera, FogMode fogMode, float f, boolean bl, float partTick, CallbackInfo callback) { - #if PRE_MC_1_17_1 + #if MC_1_16 FluidState fluidState = camera.getFluidInCamera(); boolean cameraNotInFluid = fluidState.isEmpty(); #else @@ -71,7 +71,7 @@ public class MixinFogRenderer && !SingletonInjector.INSTANCE.get(IMinecraftRenderWrapper.class).isFogStateSpecial() && Config.Client.Advanced.Graphics.Fog.disableVanillaFog.get()) { - #if PRE_MC_1_17_1 + #if MC_1_16 RenderSystem.fogStart(A_REALLY_REALLY_BIG_VALUE); RenderSystem.fogEnd(A_EVEN_LARGER_VALUE); #else diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinGameRenderer.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinGameRenderer.java index 316e89d59..64899ab54 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinGameRenderer.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinGameRenderer.java @@ -16,7 +16,7 @@ public class MixinGameRenderer { private static final Logger LOGGER = LogManager.getLogger(MixinGameRenderer.class.getSimpleName()); - #if POST_MC_1_17_1 + #if MC_1_18 || MC_1_19 || MC_1_20 // FIXME: This I think will dup multiple renderStartupEvent calls... @Inject(method = {"reloadShaders", "preloadUiShader"}, at = @At("TAIL")) public void onStartupShaders(CallbackInfo ci) 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..7e1e13eb2 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 @@ -20,7 +20,7 @@ package com.seibel.distanthorizons.forge.mixins.client; import com.mojang.blaze3d.vertex.PoseStack; -#if PRE_MC_1_19_4 +#if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 import com.mojang.math.Matrix4f; #else import net.minecraft.client.Camera; @@ -52,7 +52,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import java.nio.FloatBuffer; -#if PRE_MC_1_17_1 +#if MC_1_16 import org.lwjgl.opengl.GL15; #endif @@ -84,7 +84,7 @@ public class MixinLevelRenderer throw new NullPointerException("Null cannot be cast to non-null type."); } - #if PRE_MC_1_17_1 + #if MC_1_16 @Inject(at = @At("RETURN"), method = "renderSky(Lcom/mojang/blaze3d/vertex/PoseStack;F)V") private void renderSky(PoseStack matrixStackIn, float partialTicks, CallbackInfo callback) #else @@ -99,17 +99,17 @@ public class MixinLevelRenderer // TODO: Can we move this to forge's client proxy similarly to how fabric does it - #if PRE_MC_1_17_1 + #if MC_1_16 @Inject(at = @At("HEAD"), method = "renderChunkLayer(Lnet/minecraft/client/renderer/RenderType;Lcom/mojang/blaze3d/vertex/PoseStack;DDD)V", cancellable = true) private void renderChunkLayer(RenderType renderType, PoseStack matrixStackIn, double xIn, double yIn, double zIn, CallbackInfo callback) - #elif PRE_MC_1_19_4 + #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 @Inject(at = @At("HEAD"), method = "renderChunkLayer(Lnet/minecraft/client/renderer/RenderType;Lcom/mojang/blaze3d/vertex/PoseStack;DDDLcom/mojang/math/Matrix4f;)V", cancellable = true) private void renderChunkLayer(RenderType renderType, PoseStack modelViewMatrixStack, double cameraXBlockPos, double cameraYBlockPos, double cameraZBlockPos, Matrix4f projectionMatrix, CallbackInfo callback) - #elif PRE_MC_1_20_2 + #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 @Inject(at = @At("HEAD"), method = "renderChunkLayer(Lnet/minecraft/client/renderer/RenderType;Lcom/mojang/blaze3d/vertex/PoseStack;DDDLorg/joml/Matrix4f;)V", cancellable = true) @@ -151,7 +151,7 @@ public class MixinLevelRenderer #if MC_1_16_5 SeamlessOverdraw.applyLegacyProjectionMatrix(matrixFloatArray); - #elif PRE_MC_1_19_4 + #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 projectionMatrix.load(FloatBuffer.wrap(matrixFloatArray)); #else projectionMatrix.set(matrixFloatArray); @@ -165,10 +165,10 @@ public class MixinLevelRenderer } } - #if PRE_MC_1_19_4 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 @Inject(at = @At(value = "TAIL", target = "Lnet/minecraft/world/level/lighting/LevelLightEngine;runUpdates(IZZ)I"), method = "renderLevel") public void callAfterRunUpdates(PoseStack poseStack, float partialTick, long finishNanoTime, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightTexture lightTexture, Matrix4f projectionMatrix, CallbackInfo ci) - #elif PRE_MC_1_20_1 + #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 @Inject(at = @At(value = "TAIL", target = "Lnet/minecraft/world/level/lighting/LevelLightEngine;runUpdates(IZZ)I"), method = "renderLevel") public void callAfterRunUpdates(PoseStack poseStack, float partialTick, long finishNanoTime, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightTexture lightTexture, Matrix4f projectionMatrix, CallbackInfo ci) #else diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinMinecraft.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinMinecraft.java index 1aaa81bf7..5a1141d7f 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinMinecraft.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinMinecraft.java @@ -25,7 +25,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(Minecraft.class) public class MixinMinecraft { - #if PRE_MC_1_20_2 + #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 #if MC_1_20_1 @Redirect( method = "Lnet/minecraft/client/Minecraft;setInitialScreen(Lcom/mojang/realmsclient/client/RealmsClient;Lnet/minecraft/server/packs/resources/ReloadInstance;Lnet/minecraft/client/main/GameConfig$QuickPlayData;)V", @@ -61,7 +61,7 @@ public class MixinMinecraft } #endif - #if POST_MC_1_20_2 + #if MC_1_20_4 @Redirect( method = "Lnet/minecraft/client/Minecraft;onGameLoadFinished(Lnet/minecraft/client/Minecraft$GameLoadCookie;)V", at = @At(value = "INVOKE", target = "Ljava/lang/Runnable;run()V") diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinOptionsScreen.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinOptionsScreen.java index af33b5db0..a95f9a79e 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinOptionsScreen.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinOptionsScreen.java @@ -26,7 +26,7 @@ import com.seibel.distanthorizons.core.config.Config; import net.minecraft.client.gui.screens.OptionsScreen; import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.Component; -#if PRE_MC_1_19_2 +#if MC_1_16 || MC_1_17 || MC_1_18 import net.minecraft.network.chat.TranslatableComponent; #endif import net.minecraft.resources.ResourceLocation; @@ -57,7 +57,7 @@ public class MixinOptionsScreen extends Screen private void lodconfig$init(CallbackInfo ci) { if (Config.Client.optionsButton.get()) - this. #if PRE_MC_1_17_1 addButton #else addRenderableWidget #endif + this. #if MC_1_16 addButton #else addRenderableWidget #endif (new TexturedButtonWidget( // Where the button is on the screen this.width / 2 - 180, this.height / 6 - 12, @@ -71,7 +71,7 @@ public class MixinOptionsScreen extends Screen // For now it goes to the client option by default (buttonWidget) -> Objects.requireNonNull(minecraft).setScreen(GetConfigScreen.getScreen(this)), // Add a title to the button - #if PRE_MC_1_19_2 + #if MC_1_16 || MC_1_17 || MC_1_18 new TranslatableComponent(ModInfo.ID + ".title"))); #else Component.translatable(ModInfo.ID + ".title"))); diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinChunkGenerator.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinChunkGenerator.java index 5b15692ce..134886824 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinChunkGenerator.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinChunkGenerator.java @@ -22,7 +22,7 @@ package com.seibel.distanthorizons.forge.mixins.server; import org.spongepowered.asm.mixin.Mixin; import net.minecraft.world.level.chunk.ChunkGenerator; -#if PRE_MC_1_18_2 +#if MC_1_16 || MC_1_17 import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinTFChunkGenerator.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinTFChunkGenerator.java index 537592d1b..31d787a62 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinTFChunkGenerator.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinTFChunkGenerator.java @@ -9,7 +9,7 @@ class MixinTFChunkGenerator { // not currently implemented, attempting to run with the mod enabled in the IDE causes the game to lock up } -#elif PRE_MC_1_17_1 +#elif MC_1_16 import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinUtilBackgroundThread.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinUtilBackgroundThread.java index 59904ca04..ad96fc080 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinUtilBackgroundThread.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinUtilBackgroundThread.java @@ -50,7 +50,7 @@ public class MixinUtilBackgroundThread } } - #if POST_MC_1_17_1 + #if MC_1_18 || MC_1_19 || MC_1_20 @Inject(method = "wrapThreadWithTaskName(Ljava/lang/String;Ljava/lang/Runnable;)Ljava/lang/Runnable;", at = @At("HEAD"), cancellable = true) private static void overrideUtil$wrapThreadWithTaskName(String string, Runnable r, CallbackInfoReturnable ci) @@ -62,7 +62,7 @@ public class MixinUtilBackgroundThread } } #endif - #if POST_MC_1_18_2 + #if MC_1_19 || MC_1_20 @Inject(method = "wrapThreadWithTaskName(Ljava/lang/String;Ljava/util/function/Supplier;)Ljava/util/function/Supplier;", at = @At("HEAD"), cancellable = true) private static void overrideUtil$wrapThreadWithTaskNameForSupplier(String string, Supplier r, CallbackInfoReturnable> ci) diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/unsafe/MixinThreadingDetector.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/unsafe/MixinThreadingDetector.java index d692a4c49..e3d1c545d 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/unsafe/MixinThreadingDetector.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/unsafe/MixinThreadingDetector.java @@ -20,7 +20,7 @@ package com.seibel.distanthorizons.forge.mixins.server.unsafe; import org.spongepowered.asm.mixin.Mixin; -#if POST_MC_1_18_2 +#if MC_1_19 || MC_1_20 import net.minecraft.util.ThreadingDetector; import org.spongepowered.asm.mixin.Mutable; From 7d5357dec8bf3bef53b084a4172e8bd6e21d4955 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Mon, 11 Dec 2023 07:46:50 -0600 Subject: [PATCH 10/21] downgrade 1.17.1 bclib 0.5.6 -> 0.5.5 For some reason my machine refused to download 0.5.6, anyone can re-update to the latest if the issue becomes resolved --- versionProperties/1.17.1.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versionProperties/1.17.1.properties b/versionProperties/1.17.1.properties index 8a8531d51..44be229a8 100644 --- a/versionProperties/1.17.1.properties +++ b/versionProperties/1.17.1.properties @@ -16,7 +16,7 @@ fabric_api_version=0.46.1+1.17 lithium_version= sodium_version=mc1.17.1-0.3.4 iris_version=1.17.x-v1.2.7 - bclib_version=0.5.6 + bclib_version=0.5.5 immersive_portals_version= canvas_version= From 4ae7083dcfbb6d5aa57adfddb9b6a77479c23d65 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Mon, 11 Dec 2023 07:46:53 -0600 Subject: [PATCH 11/21] Update coreSubProjects --- coreSubProjects | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreSubProjects b/coreSubProjects index 88d78c53f..706a423c5 160000 --- a/coreSubProjects +++ b/coreSubProjects @@ -1 +1 @@ -Subproject commit 88d78c53fd3a5071366f329d4187912ba169900d +Subproject commit 706a423c5f13ff82b970db4f41226facda466152 From 0fe017df74e129d8aef07e54b512717c7815ece7 Mon Sep 17 00:00:00 2001 From: Pierre Remacle <61838082+PierreRemacle@users.noreply.github.com> Date: Mon, 11 Dec 2023 16:05:03 +0100 Subject: [PATCH 12/21] Chisels & Bits blocks transparent --- .../wrappers/block/cache/ClientBlockStateCache.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockStateCache.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockStateCache.java index 9f8de4c95..5e33f3ceb 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockStateCache.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockStateCache.java @@ -91,11 +91,13 @@ public class ClientBlockStateCache { Default, Flower, - Leaves; + Leaves, + Chisel; static ColorMode getColorMode(Block b) { if (b instanceof LeavesBlock) return Leaves; if (b instanceof FlowerBlock) return Flower; + if (b.toString().equals("Block{chiselsandbits:chiseled}")) return Chisel; return Default; } } @@ -160,7 +162,14 @@ public class ClientBlockStateCache { scale = FLOWER_COLOR_SCALE; } - + //make Chiseled block not render + else if (colorMode == ColorMode.Chisel) + { + r = 0; + g = 0; + b = 0; + a = 0; + } count += scale; alpha += a * a * scale; red += r * r * scale; From b00c252f171931d6fad98410350296e8857d34a6 Mon Sep 17 00:00:00 2001 From: coolGi Date: Tue, 12 Dec 2023 17:56:44 +1030 Subject: [PATCH 13/21] Updated gradle (and its wrapper), and fabric and architectury loom --- Readme.md | 6 ++-- build.gradle | 4 +-- fabric/build.gradle | 6 ++-- forge/build.gradle | 7 ++-- gradle/wrapper/gradle-wrapper.jar | Bin 59203 -> 43462 bytes gradle/wrapper/gradle-wrapper.properties | 5 +-- gradlew | 41 ++++++++++++++++------- gradlew.bat | 15 +++++---- settings.gradle | 3 ++ 9 files changed, 56 insertions(+), 31 deletions(-) diff --git a/Readme.md b/Readme.md index f37ac9c2a..8145a1792 100644 --- a/Readme.md +++ b/Readme.md @@ -77,10 +77,10 @@ Modmenu: 1.16.22 ### Plugin and Library versions -Fabric loom: 1.1.+\ -Forge gradle (Using Architectury): 3.4-SNAPSHOT\ +Gradle: 8.5\ +Fabric loom: 1.4-SNAPSHOT\ +Architectury loom (Forge gradle replacement): 1.4-SNAPSHOT\ Sponge vanilla gradle: 0.2.1-SNAPSHOT\ -Sponge mixin: 0.8.5\ Java Preprocessor plugin: Manifold Preprocessor
diff --git a/build.gradle b/build.gradle index ca35855bc..349ec564a 100644 --- a/build.gradle +++ b/build.gradle @@ -10,11 +10,11 @@ plugins { // Manifold preprocessor id "systems.manifold.manifold-gradle-plugin" version "0.0.2-alpha" - // Provides mc libraries to core +// // Provides mc libraries to core // 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.4-SNAPSHOT" apply false } /** diff --git a/fabric/build.gradle b/fabric/build.gradle index 84c5e42ac..ee52d6df3 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -1,5 +1,5 @@ plugins { - id "fabric-loom" version "1.1.+" + id "fabric-loom" version "1.4-SNAPSHOT" } loom { @@ -25,7 +25,7 @@ loom { remapJar { inputFile = shadowJar.archiveFile dependsOn shadowJar - classifier null +// classifier null } configurations { @@ -127,7 +127,7 @@ processResources { runClient { dependsOn(copyCoreResources) dependsOn(copyCommonLoaderResources) - jvmArgs([ "-XX:-OmitStackTraceInFastThrow", minecraftMemoryJavaArg ]) +// jvmArgs([ "-XX:-OmitStackTraceInFastThrow", minecraftMemoryJavaArg ]) finalizedBy(deleteResources) } diff --git a/forge/build.gradle b/forge/build.gradle index 2a2753f91..0e34fa028 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -1,4 +1,6 @@ plugins { + // Note: This is only needed for multi-loader projects + // The main architectury loom version is set at the start of the root build.gradle id "architectury-plugin" version "3.4-SNAPSHOT" } @@ -18,6 +20,7 @@ architectury { //} loom { + silentMojangMappingsLicense() // Shut the licencing warning accessWidenerPath = project(":common").file("src/main/resources/${accessWidenerVersion}.distanthorizons.accesswidener") forge { @@ -36,7 +39,7 @@ loom { setConfigName("Forge Client") ideConfigGenerated(true) runDir("../run") - vmArgs("-XX:-OmitStackTraceInFastThrow", minecraftMemoryJavaArg) +// vmArgs("-XX:-OmitStackTraceInFastThrow", minecraftMemoryJavaArg) } server { server() @@ -50,7 +53,7 @@ loom { remapJar { inputFile = shadowJar.archiveFile dependsOn shadowJar - classifier null +// classifier null } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e708b1c023ec8b20f512888fe07c5bd3ff77bb8f..d64cd4917707c1f8861d8cb53dd15194d4248596 100644 GIT binary patch literal 43462 zcma&NWl&^owk(X(xVyW%ySuwf;qI=D6|RlDJ2cR^yEKh!@I- zp9QeisK*rlxC>+~7Dk4IxIRsKBHqdR9b3+fyL=ynHmIDe&|>O*VlvO+%z5;9Z$|DJ zb4dO}-R=MKr^6EKJiOrJdLnCJn>np?~vU-1sSFgPu;pthGwf}bG z(1db%xwr#x)r+`4AGu$j7~u2MpVs3VpLp|mx&;>`0p0vH6kF+D2CY0fVdQOZ@h;A` z{infNyvmFUiu*XG}RNMNwXrbec_*a3N=2zJ|Wh5z* z5rAX$JJR{#zP>KY**>xHTuw?|-Rg|o24V)74HcfVT;WtQHXlE+_4iPE8QE#DUm%x0 zEKr75ur~W%w#-My3Tj`hH6EuEW+8K-^5P62$7Sc5OK+22qj&Pd1;)1#4tKihi=~8C zHiQSst0cpri6%OeaR`PY>HH_;CPaRNty%WTm4{wDK8V6gCZlG@U3$~JQZ;HPvDJcT1V{ z?>H@13MJcCNe#5z+MecYNi@VT5|&UiN1D4ATT+%M+h4c$t;C#UAs3O_q=GxK0}8%8 z8J(_M9bayxN}69ex4dzM_P3oh@ZGREjVvn%%r7=xjkqxJP4kj}5tlf;QosR=%4L5y zWhgejO=vao5oX%mOHbhJ8V+SG&K5dABn6!WiKl{|oPkq(9z8l&Mm%(=qGcFzI=eLu zWc_oCLyf;hVlB@dnwY98?75B20=n$>u3b|NB28H0u-6Rpl((%KWEBO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7{xx@0a0IA~GAOt2yy!X%Q$1rt~LbTB6@Du!_0%HV>N zlf)QI1&gvERKwso23mJ!Ou6ZS#zCS5W`gxE5T>C#E|{i<1D35C222I33?Njaz`On7 zi<+VWFP6D{e-{yiN#M|Jgk<44u1TiMI78S5W`Sdb5f+{zu34s{CfWN7a3Cf^@L%!& zN$?|!!9j2c)j$~+R6n#891w-z8(!oBpL2K=+%a$r2|~8-(vQj5_XT`<0Ksf;oP+tz z9CObS!0m)Tgg`K#xBM8B(|Z)Wb&DYL{WTYv`;A=q6~Nnx2+!lTIXtj8J7dZE!P_{z z#f8w6F}^!?^KE#+ZDv+xd5O&3EmomZzsv?>E-~ygGum45fk!SBN&|eo1rKw^?aZJ4 E2O(~oYXATM diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9502e869d..e6aba2515 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ 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.5-all.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1b6c78733..1aa94a426 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +80,11 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,22 +131,29 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ @@ -205,6 +214,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index 107acd32c..93e3f59f1 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/settings.gradle b/settings.gradle index b1e6b43cb..7a873a6bb 100644 --- a/settings.gradle +++ b/settings.gradle @@ -23,6 +23,9 @@ pluginManagement { } mavenCentral() gradlePluginPortal() + + // Not needed, but useful for debugging gradle plugins + mavenLocal() } } From 14d64d535a7b7b9c02f12ec5b7f58067e0464ed7 Mon Sep 17 00:00:00 2001 From: coolGi Date: Tue, 12 Dec 2023 18:11:26 +1030 Subject: [PATCH 14/21] Changed preprocessor to use version numbers --- build.gradle | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/build.gradle b/build.gradle index 349ec564a..e8a34a59c 100644 --- a/build.gradle +++ b/build.gradle @@ -25,40 +25,30 @@ plugins { */ def writeBuildGradlePredefine(List mcVers, int mcIndex) { - ArrayList redefineList = new ArrayList() - - for (int i = 0; i < mcVers.size(); i++) - { - String fullVerStr = mcVers[i].replace(".", "_"); - String majorVerStr = fullVerStr.substring(0, fullVerStr.lastIndexOf("_")); - - if (mcIndex == i) - { - // exact - redefineList.add("MC_" + fullVerStr); - redefineList.add("MC_" + majorVerStr); - } - } - // Build the list of preprocessors to use StringBuilder sb = new StringBuilder(); sb.append("# DON'T TOUCH THIS FILE, This is handled by the build script\n"); + + + for (int i = 0; i < mcVers.size(); i++) + { + String verStr = mcVers[i].replace(".", "_"); + sb.append(verStr + "=" + i.toString() + "\n"); + + if (mcIndex == i) + sb.append("MC_VER=" + i.toString() + "\n"); + } + // Check if this is a development build if (mod_version.toLowerCase().contains("dev")) { // WARNING: only use this for logging, we don't want to have confusion // when a method doesn't work correctly in the release build. - sb.append("DEV_BUILD"); - sb.append("=\n"); - } - - // Build the MC version preprocessors - for (String redefinedVersion : redefineList) { - sb.append(redefinedVersion) - sb.append("=\n") + sb.append("DEV_BUILD=\n"); } + new File(projectDir, "build.properties").text = sb.toString() } From 61460f9ac0b7ad37b6eae83c09e7154a5100ed23 Mon Sep 17 00:00:00 2001 From: coolGi Date: Tue, 12 Dec 2023 18:18:59 +1030 Subject: [PATCH 15/21] Updated java files to use version numbers --- build.gradle | 3 +- .../common/forge/LodForgeMethodCaller.java | 4 +- .../common/rendering/SeamlessOverdraw.java | 6 +- .../common/wrappers/McObjectConverter.java | 6 +- .../common/wrappers/VersionConstants.java | 2 +- .../common/wrappers/WrapperFactory.java | 4 +- .../common/wrappers/block/BiomeWrapper.java | 34 +++++------ .../wrappers/block/BlockStateWrapper.java | 20 +++---- .../block/TextureAtlasSpriteWrapper.java | 4 +- .../block/TintGetterOverrideFast.java | 4 +- .../block/TintGetterOverrideSmooth.java | 4 +- .../block/TintWithoutLevelOverrider.java | 8 +-- .../TintWithoutLevelSmoothOverrider.java | 8 +-- .../block/cache/ClientBlockDetailMap.java | 2 +- .../block/cache/ClientBlockStateCache.java | 10 ++-- .../block/cache/ServerBlockDetailMap.java | 2 +- .../common/wrappers/chunk/ChunkWrapper.java | 38 ++++++------ .../common/wrappers/gui/ClassicConfigGUI.java | 18 +++--- .../common/wrappers/gui/DhScreen.java | 6 +- .../common/wrappers/gui/GuiHelper.java | 14 ++--- .../common/wrappers/gui/MinecraftScreen.java | 10 ++-- .../wrappers/gui/TexturedButtonWidget.java | 23 ++++---- .../wrappers/gui/updater/ChangelogScreen.java | 16 ++--- .../wrappers/gui/updater/UpdateModScreen.java | 6 +- .../minecraft/MinecraftClientWrapper.java | 8 +-- .../minecraft/MinecraftRenderWrapper.java | 26 ++++----- .../wrappers/misc/ServerPlayerWrapper.java | 2 +- .../wrappers/world/ClientLevelWrapper.java | 2 +- .../wrappers/world/ServerLevelWrapper.java | 2 +- .../BatchGenerationEnvironment.java | 18 +++--- .../worldGeneration/GlobalParameters.java | 18 +++--- .../worldGeneration/ThreadedParameters.java | 14 ++--- .../mimicObject/ChunkLoader.java | 58 +++++++++---------- .../mimicObject/DhLitWorldGenRegion.java | 20 +++---- .../mimicObject/DummyLightEngine.java | 6 +- .../mimicObject/LightGetterAdaptor.java | 8 +-- .../RegionFileStorageExternalCache.java | 8 +-- .../WorldGenStructFeatManager.java | 30 +++++----- .../worldGeneration/step/StepBiomes.java | 10 ++-- .../worldGeneration/step/StepFeatures.java | 4 +- .../worldGeneration/step/StepNoise.java | 12 ++-- .../step/StepStructureReference.java | 2 +- .../step/StepStructureStart.java | 10 ++-- .../worldGeneration/step/StepSurface.java | 4 +- .../fabric/FabricClientProxy.java | 4 +- .../distanthorizons/fabric/FabricMain.java | 4 +- .../mixins/client/MixinClientLevel.java | 8 +-- .../client/MixinClientPacketListener.java | 6 +- .../mixins/client/MixinFogRenderer.java | 8 +-- .../mixins/client/MixinGameRenderer.java | 2 +- .../mixins/client/MixinLevelRenderer.java | 14 ++--- .../fabric/mixins/client/MixinMinecraft.java | 6 +- .../mixins/client/MixinOptionsScreen.java | 6 +- .../mixins/client/MixinTextureUtil.java | 2 +- .../mixins/events/MixinServerLevel.java | 2 +- .../mods/sodium/MixinSodiumRenderer.java | 4 +- .../mixins/server/MixinChunkGenerator.java | 2 +- .../fabric/mixins/server/MixinChunkMap.java | 4 +- .../server/MixinUtilBackgroundThread.java | 4 +- .../server/unsafe/MixinThreadingDetector.java | 2 +- .../wrappers/modAccessor/BCLibAccessor.java | 6 +- .../wrappers/modAccessor/IrisAccessor.java | 2 +- .../wrappers/modAccessor/SodiumAccessor.java | 10 ++-- .../forge/ForgeClientProxy.java | 26 ++++----- .../distanthorizons/forge/ForgeMain.java | 22 +++---- .../forge/ForgeServerProxy.java | 16 ++--- .../client/MixinClientPacketListener.java | 2 +- .../forge/mixins/client/MixinFogRenderer.java | 8 +-- .../mixins/client/MixinGameRenderer.java | 2 +- .../mixins/client/MixinLevelRenderer.java | 22 +++---- .../forge/mixins/client/MixinMinecraft.java | 6 +- .../mixins/client/MixinOptionsScreen.java | 6 +- .../mixins/server/MixinChunkGenerator.java | 2 +- .../mixins/server/MixinTFChunkGenerator.java | 4 +- .../server/MixinUtilBackgroundThread.java | 4 +- .../server/unsafe/MixinThreadingDetector.java | 2 +- gradle.properties | 2 +- 77 files changed, 361 insertions(+), 373 deletions(-) diff --git a/build.gradle b/build.gradle index e8a34a59c..2656dd32f 100644 --- a/build.gradle +++ b/build.gradle @@ -34,7 +34,7 @@ def writeBuildGradlePredefine(List mcVers, int mcIndex) for (int i = 0; i < mcVers.size(); i++) { String verStr = mcVers[i].replace(".", "_"); - sb.append(verStr + "=" + i.toString() + "\n"); + sb.append("MC_" + verStr + "=" + i.toString() + "\n"); if (mcIndex == i) sb.append("MC_VER=" + i.toString() + "\n"); @@ -477,7 +477,6 @@ allprojects { p -> maven { url "https://maven.architectury.dev" } // For Git repositories - // navigating to the URL in a web browser allows for testing and viewing possible downloads maven { url "https://jitpack.io" } // For Manifold Preprocessor diff --git a/common/src/main/java/com/seibel/distanthorizons/common/forge/LodForgeMethodCaller.java b/common/src/main/java/com/seibel/distanthorizons/common/forge/LodForgeMethodCaller.java index 66883973a..b8b2add63 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/forge/LodForgeMethodCaller.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/forge/LodForgeMethodCaller.java @@ -22,7 +22,7 @@ package com.seibel.distanthorizons.common.forge; import com.seibel.distanthorizons.common.wrappers.minecraft.MinecraftClientWrapper; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.core.Direction; -#if MC_1_19 || MC_1_20 +#if MC_VER > MC_1_19_2 import net.minecraft.util.RandomSource; #endif import net.minecraft.world.level.ColorResolver; @@ -41,7 +41,7 @@ import java.util.Random; */ public interface LodForgeMethodCaller { - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 List getQuads(MinecraftClientWrapper mc, Block block, BlockState blockState, Direction direction, Random random); // FIXME: For 1.19 #else List getQuads(MinecraftClientWrapper mc, Block block, BlockState blockState, Direction direction, RandomSource random); // FIXME: For 1.19 diff --git a/common/src/main/java/com/seibel/distanthorizons/common/rendering/SeamlessOverdraw.java b/common/src/main/java/com/seibel/distanthorizons/common/rendering/SeamlessOverdraw.java index e3d3f142c..e6795c666 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/rendering/SeamlessOverdraw.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/rendering/SeamlessOverdraw.java @@ -19,11 +19,9 @@ package com.seibel.distanthorizons.common.rendering; -#if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 - +#if MC_VER < MC_1_19_4 import com.mojang.math.Matrix4f; #else - import org.joml.Matrix4f; #endif import com.seibel.distanthorizons.core.config.Config; @@ -43,7 +41,7 @@ public class SeamlessOverdraw { float[] matrixFloatArray; - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #if MC_VER < MC_1_19_4 FloatBuffer matrixFloatBuffer = FloatBuffer.allocate(16); minecraftProjectionMatrix.store(matrixFloatBuffer); matrixFloatArray = matrixFloatBuffer.array(); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/McObjectConverter.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/McObjectConverter.java index 9d81c9264..b37282f4d 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/McObjectConverter.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/McObjectConverter.java @@ -23,7 +23,7 @@ import java.nio.FloatBuffer; import java.util.function.BiConsumer; import java.util.function.Consumer; -#if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 +#if MC_VER < MC_1_19_4 import com.mojang.math.Matrix4f; #else import org.joml.Matrix4f; @@ -54,7 +54,7 @@ public class McObjectConverter /** Taken from Minecraft's com.mojang.math.Matrix4f class from 1.18.2 */ private static void storeMatrix(Matrix4f matrix, FloatBuffer buffer) { - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #if MC_VER < MC_1_19_4 matrix.store(buffer); #else // Mojang starts to use joml's Matrix4f libary in 1.19.3 so we copy their store method and use it here if its newer than 1.19.3 @@ -83,7 +83,7 @@ public class McObjectConverter FloatBuffer buffer = FloatBuffer.allocate(16); storeMatrix(mcMatrix, buffer); Mat4f matrix = new Mat4f(buffer); - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #if MC_VER < MC_1_19_4 matrix.transpose(); // In 1.19.3 and later, we no longer need to transpose it #endif return matrix; diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/VersionConstants.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/VersionConstants.java index 2853bb0c2..925ae4adb 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/VersionConstants.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/VersionConstants.java @@ -59,7 +59,7 @@ public class VersionConstants implements IVersionConstants @Override public String getMinecraftVersion() { - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 return Minecraft.getInstance().getGame().getVersion().getId(); #else return SharedConstants.getCurrentVersion().getId(); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/WrapperFactory.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/WrapperFactory.java index 5992f67a6..8b597fbfd 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/WrapperFactory.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/WrapperFactory.java @@ -106,7 +106,7 @@ public class WrapperFactory implements IWrapperFactory } } - #if MC_1_16 || MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER // Always true else if (objectArray.length == 2) { // correct number of parameters from the API @@ -173,7 +173,7 @@ public class WrapperFactory implements IWrapperFactory "Chunk wrapper creation failed. \n" + "Expected parameters: \n"); - #if MC_1_16 || MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER // Always true message.append("[" + ChunkAccess.class.getName() + "], \n"); message.append("[" + ServerLevel.class.getName() + "] or [" + ClientLevel.class.getName() + "]. \n"); #else diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BiomeWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BiomeWrapper.java index 3440b5b4d..843817892 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BiomeWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BiomeWrapper.java @@ -33,18 +33,10 @@ import org.apache.logging.log4j.Logger; import com.seibel.distanthorizons.core.wrapperInterfaces.world.IBiomeWrapper; import net.minecraft.client.Minecraft; -#if POST_MC_1_17 -import net.minecraft.core.Holder; -import net.minecraft.resources.RegistryOps; -#endif -#if MC_1_19_4 || MC_1_20 -#endif - - -#if MC_1_16_5 || MC_1_17 +#if MC_VER == MC_1_16_5 || MC_VER == MC_1_17_1 import net.minecraft.core.Registry; -#elif MC_1_18 || MC_1_19_2 +#elif MC_VER == MC_1_18_2 || MC_VER == MC_1_19_2 import net.minecraft.core.Holder; import net.minecraft.core.Registry; import net.minecraft.core.RegistryAccess; @@ -56,7 +48,7 @@ import net.minecraft.core.registries.Registries; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.biome.Biome; -#if !MC_1_16 || MC_1_17 +#if MC_VER >= MC_1_18_2 import net.minecraft.world.level.biome.Biomes; #endif @@ -66,7 +58,7 @@ public class BiomeWrapper implements IBiomeWrapper { private static final Logger LOGGER = LogManager.getLogger(); - #if MC_1_16 || MC_1_17 + #if MC_VER < MC_1_18_2 public static final ConcurrentMap WRAPPER_BY_BIOME = new ConcurrentHashMap<>(); #else public static final ConcurrentMap, BiomeWrapper> WRAPPER_BY_BIOME = new ConcurrentHashMap<>(); @@ -89,7 +81,7 @@ public class BiomeWrapper implements IBiomeWrapper // properties // - #if MC_1_16 || MC_1_17 + #if MC_VER < MC_1_18_2 public final Biome biome; #else public final Holder biome; @@ -104,7 +96,7 @@ public class BiomeWrapper implements IBiomeWrapper // constructors // //==============// - static public IBiomeWrapper getBiomeWrapper(#if MC_1_16 || MC_1_17 Biome #else Holder #endif biome, ILevelWrapper levelWrapper) + static public IBiomeWrapper getBiomeWrapper(#if MC_VER < MC_1_18_2 Biome #else Holder #endif biome, ILevelWrapper levelWrapper) { if (biome == null) { @@ -124,7 +116,7 @@ public class BiomeWrapper implements IBiomeWrapper } } - private BiomeWrapper(#if MC_1_16 || MC_1_17 Biome #else Holder #endif biome, ILevelWrapper levelWrapper) + private BiomeWrapper(#if MC_VER < MC_1_18_2 Biome #else Holder #endif biome, ILevelWrapper levelWrapper) { this.biome = biome; this.serialString = this.serialize(levelWrapper); @@ -145,7 +137,7 @@ public class BiomeWrapper implements IBiomeWrapper return EMPTY_STRING; } - #if MC_1_16 || MC_1_17 + #if MC_VER < MC_1_18_2 return biome.toString(); #else return this.biome.unwrapKey().orElse(Biomes.THE_VOID).registry().toString(); @@ -214,9 +206,9 @@ public class BiomeWrapper implements IBiomeWrapper net.minecraft.core.RegistryAccess registryAccess = Minecraft.getInstance().level.registryAccess(); ResourceLocation resourceLocation; - #if MC_1_16_5 || MC_1_17 + #if MC_VER == MC_1_16_5 || MC_VER == MC_1_17_1 resourceLocation = registryAccess.registryOrThrow(Registry.BIOME_REGISTRY).getKey(this.biome); - #elif MC_1_18 || MC_1_19_2 + #elif MC_VER == MC_1_18_2 || MC_VER == MC_1_19_2 resourceLocation = registryAccess.registryOrThrow(Registry.BIOME_REGISTRY).getKey(this.biome.value()); #else resourceLocation = registryAccess.registryOrThrow(Registries.BIOME).getKey(this.biome.value()); @@ -225,7 +217,7 @@ public class BiomeWrapper implements IBiomeWrapper if (resourceLocation == null) { String biomeName; - #if MC_1_16_5 || MC_1_17 + #if MC_VER == MC_1_16_5 || MC_VER == MC_1_17_1 biomeName = this.biome.toString(); #else biomeName = this.biome.value().toString(); @@ -277,10 +269,10 @@ public class BiomeWrapper implements IBiomeWrapper net.minecraft.core.RegistryAccess registryAccess = level.registryAccess(); boolean success; - #if MC_1_16_5 || MC_1_17 + #if MC_VER == MC_1_16_5 || MC_VER == MC_1_17_1 Biome biome = registryAccess.registryOrThrow(Registry.BIOME_REGISTRY).get(resourceLocation); success = (biome != null); - #elif MC_1_18 || MC_1_19_2 + #elif MC_VER == MC_1_18_2 || MC_VER == MC_1_19_2 Biome unwrappedBiome = registryAccess.registryOrThrow(Registry.BIOME_REGISTRY).get(resourceLocation); success = (unwrappedBiome != null); Holder biome = new Holder.Direct<>(unwrappedBiome); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BlockStateWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BlockStateWrapper.java index 6c6c12999..23e635044 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BlockStateWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BlockStateWrapper.java @@ -32,11 +32,11 @@ import java.io.IOException; import java.util.*; import java.util.concurrent.ConcurrentHashMap; -#if MC_1_16_5 || MC_1_17 +#if MC_VER == MC_1_16_5 || MC_VER == MC_1_17_1 import net.minecraft.core.Registry; import net.minecraft.core.BlockPos; import net.minecraft.world.level.EmptyBlockGetter; -#elif MC_1_18 || MC_1_19_2 +#elif MC_VER == MC_1_18_2 || MC_VER == MC_1_19_2 import net.minecraft.client.Minecraft; import net.minecraft.world.level.Level; import net.minecraft.core.BlockPos; @@ -252,7 +252,7 @@ public class BlockStateWrapper implements IBlockStateWrapper @Override public boolean isSolid() { - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 + #if MC_VER < MC_1_20_1 return this.blockState.getMaterial().isSolid(); #else return !this.blockState.getCollisionShape(EmptyBlockGetter.INSTANCE, BlockPos.ZERO).isEmpty(); @@ -267,7 +267,7 @@ public class BlockStateWrapper implements IBlockStateWrapper return false; } - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 + #if MC_VER < MC_1_20_1 return this.blockState.getMaterial().isLiquid() || !this.blockState.getFluidState().isEmpty(); #else return !this.blockState.getFluidState().isEmpty(); @@ -293,15 +293,15 @@ public class BlockStateWrapper implements IBlockStateWrapper // older versions of MC have a static registry - #if !(MC_1_16_5 || MC_1_17) + #if MC_VER > MC_1_17_1 Level level = (Level)levelWrapper.getWrappedMcObject(); net.minecraft.core.RegistryAccess registryAccess = level.registryAccess(); #endif ResourceLocation resourceLocation; - #if MC_1_16_5 || MC_1_17 + #if MC_VER == MC_1_16_5 || MC_VER == MC_1_17_1 resourceLocation = Registry.BLOCK.getKey(this.blockState.getBlock()); - #elif MC_1_18 || MC_1_19_2 + #elif MC_VER == MC_1_18_2 || MC_VER == MC_1_19_2 resourceLocation = registryAccess.registryOrThrow(Registry.BLOCK_REGISTRY).getKey(this.blockState.getBlock()); #else resourceLocation = registryAccess.registryOrThrow(Registries.BLOCK).getKey(this.blockState.getBlock()); @@ -356,16 +356,16 @@ public class BlockStateWrapper implements IBlockStateWrapper try { - #if !(MC_1_16_5 || MC_1_17) + #if MC_VER > MC_1_17_1 // use the given level if possible, otherwise try using the currently loaded one Level level = (levelWrapper != null ? (Level)levelWrapper.getWrappedMcObject() : null); level = (level == null ? Minecraft.getInstance().level : level); #endif Block block; - #if MC_1_16_5 || MC_1_17 + #if MC_VER == MC_1_16_5 || MC_VER == MC_1_17_1 block = Registry.BLOCK.get(resourceLocation); - #elif MC_1_18 || MC_1_19_2 + #elif MC_VER == MC_1_18_2 || MC_VER == MC_1_19_2 net.minecraft.core.RegistryAccess registryAccess = level.registryAccess(); block = registryAccess.registryOrThrow(Registry.BLOCK_REGISTRY).get(resourceLocation); #else diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TextureAtlasSpriteWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TextureAtlasSpriteWrapper.java index da309c851..3b777e533 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TextureAtlasSpriteWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TextureAtlasSpriteWrapper.java @@ -40,11 +40,11 @@ public class TextureAtlasSpriteWrapper */ public static int getPixelRGBA(TextureAtlasSprite sprite, int frameIndex, int x, int y) { - #if MC_1_16 + #if MC_VER < MC_1_17_1 return sprite.mainImage[0].getPixelRGBA( x + sprite.framesX[frameIndex] * sprite.getWidth(), y + sprite.framesY[frameIndex] * sprite.getHeight()); - #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #elif MC_VER < MC_1_19_4 if (sprite.animatedTexture != null) { x += sprite.animatedTexture.getFrameX(frameIndex) * sprite.width; diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideFast.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideFast.java index ed4cad81a..04c8c1d98 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideFast.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideFast.java @@ -50,7 +50,7 @@ public class TintGetterOverrideFast implements BlockAndTintGetter private Biome _getBiome(BlockPos pos) { - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_18_2 return parent.getBiome(pos).value(); #else return parent.getBiome(pos); @@ -167,7 +167,7 @@ public class TintGetterOverrideFast implements BlockAndTintGetter return parent.getMaxBuildHeight(); } - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_17_1 @Override public Optional getBlockEntity(BlockPos blockPos, BlockEntityType blockEntityType) { diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideSmooth.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideSmooth.java index 6ff85ee1c..c67d8c3e4 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideSmooth.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideSmooth.java @@ -53,7 +53,7 @@ public class TintGetterOverrideSmooth implements BlockAndTintGetter private Biome _getBiome(BlockPos pos) { - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_18_2 return parent.getBiome(pos).value(); #else return parent.getBiome(pos); @@ -193,7 +193,7 @@ public class TintGetterOverrideSmooth implements BlockAndTintGetter return parent.getMaxBuildHeight(); } - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_17_1 @Override public Optional getBlockEntity(BlockPos blockPos, BlockEntityType blockEntityType) { diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelOverrider.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelOverrider.java index c4728dfee..ab8876e74 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelOverrider.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelOverrider.java @@ -29,7 +29,7 @@ import net.minecraft.world.level.lighting.LevelLightEngine; import net.minecraft.world.level.material.FluidState; import org.jetbrains.annotations.Nullable; -#if MC_1_18 || MC_1_19 || MC_1_20 +#if MC_VER > MC_1_18_2 import net.minecraft.core.Holder; #endif @@ -46,9 +46,9 @@ public class TintWithoutLevelOverrider implements BlockAndTintGetter { return colorResolver.getColor(_unwrap(biome.biome), blockPos.getX(), blockPos.getZ()); } - private Biome _unwrap(#if MC_1_18 || MC_1_19 || MC_1_20 Holder #else Biome #endif biome) + private Biome _unwrap(#if MC_VER > MC_1_18_2 Holder #else Biome #endif biome) { - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_18_2 return biome.value(); #else return biome; @@ -84,7 +84,7 @@ public class TintWithoutLevelOverrider implements BlockAndTintGetter } - #if MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER == MC_1_17_1 || MC_VER > MC_1_18_2 @Override public int getHeight() { diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelSmoothOverrider.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelSmoothOverrider.java index 5aacf7efb..0c293eb7f 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelSmoothOverrider.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelSmoothOverrider.java @@ -30,7 +30,7 @@ import net.minecraft.world.level.lighting.LevelLightEngine; import net.minecraft.world.level.material.FluidState; import org.jetbrains.annotations.Nullable; -#if MC_1_18 || MC_1_19 || MC_1_20 +#if MC_VER > MC_1_18_2 import net.minecraft.core.Holder; #endif @@ -49,9 +49,9 @@ public class TintWithoutLevelSmoothOverrider implements BlockAndTintGetter { return colorResolver.getColor(_unwrap(biome.biome), blockPos.getX(), blockPos.getZ()); } - private Biome _unwrap(#if MC_1_18 || MC_1_19 || MC_1_20 Holder #else Biome #endif biome) + private Biome _unwrap(#if MC_VER > MC_1_18_2 Holder #else Biome #endif biome) { - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_18_2 return biome.value(); #else return biome; @@ -116,7 +116,7 @@ public class TintWithoutLevelSmoothOverrider implements BlockAndTintGetter } - #if MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER >= MC_1_17_1 && MC_VER != MC_1_18_2 @Override public int getHeight() { diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockDetailMap.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockDetailMap.java index 864be6cd5..e05b1a966 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockDetailMap.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockDetailMap.java @@ -29,7 +29,7 @@ import java.util.concurrent.ConcurrentHashMap; public class ClientBlockDetailMap { private final ConcurrentHashMap blockCache = new ConcurrentHashMap<>(); - //private final ConcurrentHashMap<#if MC_1_16 || MC_1_17 Biome #else Holder #endif, Biome> biomeMap = new ConcurrentHashMap<>(); + //private final ConcurrentHashMap<#if MC_VER < MC_1_18_2 Biome #else Holder #endif, Biome> biomeMap = new ConcurrentHashMap<>(); private final ClientLevelWrapper level; public ClientBlockDetailMap(ClientLevelWrapper level) { this.level = level; } diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockStateCache.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockStateCache.java index 9f8de4c95..629a705f3 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockStateCache.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockStateCache.java @@ -38,7 +38,7 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.FlowerBlock; import net.minecraft.world.level.block.LeavesBlock; import net.minecraft.world.level.block.RotatedPillarBlock; -#if MC_1_19 || MC_1_20 +#if MC_VER > MC_1_19_2 import net.minecraft.util.RandomSource; #else import java.util.Random; @@ -60,7 +60,7 @@ public class ClientBlockStateCache private static final HashSet BLOCK_STATES_THAT_NEED_LEVEL = new HashSet<>(); private static final HashSet BROKEN_BLOCK_STATES = new HashSet<>(); - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 public static final Random random = new Random(0); #else public static final RandomSource random = RandomSource.create(); @@ -102,7 +102,7 @@ public class ClientBlockStateCache private static int getWidth(TextureAtlasSprite texture) { - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #if MC_VER < MC_1_19_4 return texture.getWidth(); #else return texture.contents().width(); @@ -111,7 +111,7 @@ public class ClientBlockStateCache private static int getHeight(TextureAtlasSprite texture) { - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #if MC_VER < MC_1_19_4 return texture.getHeight(); #else return texture.contents().height(); @@ -211,7 +211,7 @@ public class ClientBlockStateCache needShade = quads.get(0).isShade(); tintIndex = quads.get(0).getTintIndex(); baseColor = calculateColorFromTexture( - #if MC_1_16 quads.get(0).sprite, + #if MC_VER < MC_1_17_1 quads.get(0).sprite, #else quads.get(0).getSprite(), #endif ColorMode.getColorMode(blockState.getBlock())); } diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ServerBlockDetailMap.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ServerBlockDetailMap.java index 28b69397f..22dfd9ca8 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ServerBlockDetailMap.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ServerBlockDetailMap.java @@ -29,7 +29,7 @@ import net.minecraft.world.level.block.state.BlockState; public class ServerBlockDetailMap { private final ConcurrentHashMap blockCache = new ConcurrentHashMap<>(); - //private final ConcurrentHashMap<#if MC_1_16 || MC_1_17 Biome #else Holder #endif, Biome> biomeMap = new ConcurrentHashMap<>(); + //private final ConcurrentHashMap<#if MC_VER < MC_1_18_2 Biome #else Holder #endif, Biome> biomeMap = new ConcurrentHashMap<>(); private final ServerLevelWrapper level; public ServerBlockDetailMap(ServerLevelWrapper level) { this.level = level; } diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java index 3c5b2a2d4..b92d0e8ce 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java @@ -47,27 +47,27 @@ import org.apache.logging.log4j.Logger; import java.util.*; import java.util.concurrent.ConcurrentLinkedQueue; -#if MC_1_18 || MC_1_19 || MC_1_20 +#if MC_VER > MC_1_17_1 import net.minecraft.core.QuartPos; #endif -#if MC_1_16_5 +#if MC_VER == MC_1_16_5 import net.minecraft.world.level.chunk.LevelChunkSection; #endif -#if MC_1_17 +#if MC_VER == MC_1_17_1 import net.minecraft.world.level.chunk.LevelChunkSection; #endif -#if MC_1_18 +#if MC_VER == MC_1_18_2 import net.minecraft.world.level.chunk.LevelChunkSection; #endif -#if MC_1_19 +#if MC_VER == MC_1_19_2 || MC_VER == MC_1_19_4 import net.minecraft.world.level.chunk.LevelChunkSection; #endif -#if MC_1_20_2 || MC_1_20_4 +#if MC_VER > MC_1_20_1 import net.minecraft.world.level.chunk.LevelChunkSection; import net.minecraft.world.level.lighting.LevelLightEngine; import net.minecraft.core.SectionPos; @@ -145,7 +145,7 @@ public class ChunkWrapper implements IChunkWrapper @Override public int getHeight() { - #if MC_1_16 + #if MC_VER < MC_1_17_1 return 255; #else return this.chunk.getHeight(); @@ -155,7 +155,7 @@ public class ChunkWrapper implements IChunkWrapper @Override public int getMinBuildHeight() { - #if MC_1_16 + #if MC_VER < MC_1_17_1 return 0; #else return this.chunk.getMinBuildHeight(); @@ -175,13 +175,13 @@ public class ChunkWrapper implements IChunkWrapper continue; } - #if MC_1_16_5 + #if MC_VER == MC_1_16_5 if (!sections[index].isEmpty()) { // convert from an index to a block coordinate return this.chunk.getSections()[index].bottomBlockY() * 16; } - #elif MC_1_17 + #elif MC_VER == MC_1_17_1 if (!sections[index].isEmpty()) { // convert from an index to a block coordinate @@ -210,15 +210,15 @@ public class ChunkWrapper implements IChunkWrapper @Override public IBiomeWrapper getBiome(int relX, int relY, int relZ) { - #if MC_1_16 + #if MC_VER < MC_1_17_1 return BiomeWrapper.getBiomeWrapper(this.chunk.getBiomes().getNoiseBiome( relX >> 2, relY >> 2, relZ >> 2), this.wrappedLevel); - #elif MC_1_16 || MC_1_17 + #elif MC_VER < MC_1_18_2 return BiomeWrapper.getBiomeWrapper(this.chunk.getBiomes().getNoiseBiome( QuartPos.fromBlock(relX), QuartPos.fromBlock(relY), QuartPos.fromBlock(relZ)), this.wrappedLevel); - #elif MC_1_16 || MC_1_17 + #elif MC_VER < MC_1_18_2 return BiomeWrapper.getBiomeWrapper(this.chunk.getNoiseBiome( QuartPos.fromBlock(relX), QuartPos.fromBlock(relY), QuartPos.fromBlock(relZ)), this.wrappedLevel); @@ -264,7 +264,7 @@ public class ChunkWrapper implements IChunkWrapper } - #if MC_1_16_5 || MC_1_17 + #if MC_VER == MC_1_16_5 || MC_VER == MC_1_17_1 return false; // MC's lighting engine doesn't work consistently enough to trust for 1.16 or 1.17 #else if (this.chunk instanceof LevelChunk) @@ -387,7 +387,7 @@ public class ChunkWrapper implements IChunkWrapper this.blockLightPosList = new ArrayList<>(); - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 + #if MC_VER < MC_1_20_1 this.chunk.getLights().forEach((blockPos) -> { this.blockLightPosList.add(new DhBlockPos(blockPos.getX(), blockPos.getY(), blockPos.getZ())); @@ -454,7 +454,7 @@ public class ChunkWrapper implements IChunkWrapper public static void syncedUpdateClientLightStatus() { - #if MC_1_16 || MC_1_17 + #if MC_VER < MC_1_18_2 // TODO: Check what to do in 1.18.1 and older // since we don't currently handle this list, @@ -481,16 +481,16 @@ public class ChunkWrapper implements IChunkWrapper LevelChunk levelChunk = (LevelChunk) this.chunk; ClientChunkCache clientChunkCache = ((ClientLevel) levelChunk.getLevel()).getChunkSource(); this.isMcClientLightingCorrect = clientChunkCache.getChunkForLighting(this.chunk.getPos().x, this.chunk.getPos().z) != null && - #if MC_1_16_5 || MC_1_17 + #if MC_VER <= MC_1_17_1 levelChunk.isLightCorrect(); - #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 + #elif MC_VER < MC_1_20_1 levelChunk.isClientLightReady(); #else checkLightSectionsOnChunk(levelChunk, levelChunk.getLevel().getLightEngine()); #endif } } - #if MC_1_20_2 || MC_1_20_4 + #if MC_VER > MC_1_20_1 private static boolean checkLightSectionsOnChunk(LevelChunk chunk, LevelLightEngine engine) { LevelChunkSection[] sections = chunk.getSections(); 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 1b041665f..a7a87c7cb 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 @@ -35,7 +35,7 @@ import com.seibel.distanthorizons.coreapi.ModInfo; import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; -#if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 +#if MC_VER < MC_1_20_1 import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.gui.GuiComponent; #else @@ -49,7 +49,7 @@ import net.minecraft.client.gui.components.events.GuiEventListener; import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.Component; import net.minecraft.client.resources.language.I18n; // translation -#if MC_1_18 || MC_1_19 || MC_1_20 +#if MC_VER > MC_1_17_1 import net.minecraft.client.gui.narration.NarratableEntry; #endif import net.minecraft.resources.ResourceLocation; @@ -379,13 +379,13 @@ public class ClassicConfigGUI } @Override - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 + #if MC_VER < MC_1_20_1 public void render(PoseStack matrices, int mouseX, int mouseY, float delta) #else public void render(GuiGraphics matrices, int mouseX, int mouseY, float delta) #endif { - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 // 1.20.2 now enables this by default in the `this.list.render` function + #if MC_VER < MC_1_20_2 // 1.20.2 now enables this by default in the `this.list.render` function this.renderBackground(matrices); // Renders background #else super.render(matrices, mouseX, mouseY, delta); @@ -441,7 +441,7 @@ public class ClassicConfigGUI } } } - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 + #if MC_VER < MC_1_20_2 super.render(matrices, mouseX, mouseY, delta); #endif } @@ -539,7 +539,7 @@ public class ClassicConfigGUI public ConfigListWidget(Minecraft minecraftClient, int canvasWidth, int canvasHeight, int topMargin, int botMargin, int itemSpacing) { - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 || MC_1_20_2 + #if MC_VER < MC_1_20_4 super(minecraftClient, canvasWidth, canvasHeight, topMargin, canvasHeight - botMargin, itemSpacing); #else super(minecraftClient, canvasWidth, canvasHeight - (topMargin + botMargin), topMargin, itemSpacing); @@ -605,7 +605,7 @@ public class ClassicConfigGUI } @Override - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 + #if MC_VER < MC_1_20_1 public void render(PoseStack matrices, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) #else public void render(GuiGraphics matrices, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) @@ -627,7 +627,7 @@ public class ClassicConfigGUI indexButton.render(matrices, mouseX, mouseY, tickDelta); } if (text != null && (!text.getString().contains("spacer") || button != null)) - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 + #if MC_VER < MC_1_20_1 GuiComponent.drawString(matrices, textRenderer, text, 12, y + 5, 0xFFFFFF); #else matrices.drawString(textRenderer, text, 12, y + 5, 0xFFFFFF); @@ -642,7 +642,7 @@ public class ClassicConfigGUI // Only for 1.17 and over // Remove in 1.16 and below - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_17_1 @Override public List narratables() { diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/DhScreen.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/DhScreen.java index 37e1cc0d9..5309e6565 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/DhScreen.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/DhScreen.java @@ -1,7 +1,7 @@ package com.seibel.distanthorizons.common.wrappers.gui; import net.minecraft.client.gui.Font; -#if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 +#if MC_VER < MC_1_20_1 import com.mojang.blaze3d.vertex.PoseStack; #else import net.minecraft.client.gui.GuiGraphics; @@ -24,14 +24,14 @@ public class DhScreen extends Screen // addButton in 1.16 and below protected Button addBtn(Button button) { - #if MC_1_16 + #if MC_VER < MC_1_17_1 return this.addButton(button); #else return this.addRenderableWidget(button); #endif } - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 + #if MC_VER < MC_1_20_1 protected void DhDrawCenteredString(PoseStack guiStack, Font font, Component text, int x, int y, int color) { drawCenteredString(guiStack, font, text, x, y, color); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/GuiHelper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/GuiHelper.java index 86183b3b2..18274f77c 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/GuiHelper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/GuiHelper.java @@ -5,7 +5,7 @@ import net.minecraft.client.gui.components.Button; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; -#if MC_1_16 || MC_1_17 || MC_1_18 +#if MC_VER < MC_1_19_2 import net.minecraft.network.chat.TextComponent; import net.minecraft.network.chat.TranslatableComponent; #endif @@ -17,7 +17,7 @@ public class GuiHelper */ public static Button MakeBtn(Component base, int a, int b, int c, int d, Button.OnPress action) { - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #if MC_VER < MC_1_19_4 return new Button(a, b, c, d, base, action); #else return Button.builder(base, action).bounds(a, b, c, d).build(); @@ -26,7 +26,7 @@ public class GuiHelper public static MutableComponent TextOrLiteral(String text) { - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 return new TextComponent(text); #else return Component.literal(text); @@ -35,7 +35,7 @@ public class GuiHelper public static MutableComponent TextOrTranslatable(String text) { - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 return new TextComponent(text); #else return Component.translatable(text); @@ -44,7 +44,7 @@ public class GuiHelper public static MutableComponent Translatable(String text, Object... args) { - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 return new TranslatableComponent(text, args); #else return Component.translatable(text, args); @@ -53,7 +53,7 @@ public class GuiHelper public static void SetX(AbstractWidget w, int x) { - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #if MC_VER < MC_1_19_4 w.x = x; #else w.setX(x); @@ -62,7 +62,7 @@ public class GuiHelper public static void SetY(AbstractWidget w, int y) { - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #if MC_VER < MC_1_19_4 w.y = y; #else w.setY(y); 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 572d4ef1d..6dcc5a746 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 @@ -4,7 +4,7 @@ import com.mojang.blaze3d.platform.Window; import com.mojang.blaze3d.vertex.PoseStack; import com.seibel.distanthorizons.core.config.gui.AbstractScreen; import net.minecraft.client.Minecraft; -#if MC_1_20_2 || MC_1_20_4 +#if MC_VER > MC_1_20_1 import net.minecraft.client.gui.GuiGraphics; #endif import net.minecraft.client.gui.components.ContainerObjectSelectionList; @@ -28,7 +28,7 @@ public class MinecraftScreen private AbstractScreen screen; - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 public static net.minecraft.network.chat.TranslatableComponent translate(String str, Object... args) { return new net.minecraft.network.chat.TranslatableComponent(str, args); @@ -66,13 +66,13 @@ public class MinecraftScreen } @Override - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 + #if MC_VER < MC_1_20_1 public void render(PoseStack matrices, int mouseX, int mouseY, float delta) #else public void render(GuiGraphics matrices, int mouseX, int mouseY, float delta) #endif { - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 + #if MC_VER < MC_1_20_2 this.renderBackground(matrices); // Render background #else this.renderBackground(matrices, mouseX, mouseY, delta); // Render background @@ -133,7 +133,7 @@ public class MinecraftScreen { public ConfigListWidget(Minecraft minecraftClient, int canvasWidth, int canvasHeight, int topMargin, int botMargin, int itemSpacing) { - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 || MC_1_20_2 + #if MC_VER < MC_1_20_4 super(minecraftClient, canvasWidth, canvasHeight, topMargin, canvasHeight - botMargin, itemSpacing); #else super(minecraftClient, canvasWidth, canvasHeight - (topMargin + botMargin), topMargin, itemSpacing); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/TexturedButtonWidget.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/TexturedButtonWidget.java index 037034280..c589fcf4c 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/TexturedButtonWidget.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/TexturedButtonWidget.java @@ -34,18 +34,17 @@ import net.minecraft.client.gui.components.ImageButton; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; -#if MC_1_18 || MC_1_19 || MC_1_20 +#if MC_VER > MC_1_17_1 import net.minecraft.client.renderer.GameRenderer; #endif - -#if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 +#if MC_VER < MC_1_20_1 import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.Minecraft; #else import net.minecraft.client.gui.GuiGraphics; #endif -#if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 +#if MC_VER < MC_1_20_2 public class TexturedButtonWidget extends ImageButton #else public class TexturedButtonWidget extends Button @@ -53,7 +52,7 @@ public class TexturedButtonWidget extends Button { public final boolean renderBackground; - #if MC_1_20_2 || MC_1_20_4 + #if MC_VER >= MC_1_20_2 private final int u; private final int v; private final int hoveredVOffset; @@ -70,7 +69,7 @@ public class TexturedButtonWidget extends Button } public TexturedButtonWidget(int x, int y, int width, int height, int u, int v, int hoveredVOffset, ResourceLocation texture, int textureWidth, int textureHeight, OnPress pressAction, Component text, boolean renderBackground) { - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 + #if MC_VER < MC_1_20_2 super(x, y, width, height, u, v, hoveredVOffset, texture, textureWidth, textureHeight, pressAction, text); #else // We don't pass on the text option as otherwise it will render (we normally pass it for narration) @@ -90,13 +89,13 @@ public class TexturedButtonWidget extends Button this.renderBackground = renderBackground; } - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #if MC_VER < MC_1_20_2 + #if MC_VER < MC_1_19_4 @Override public void renderButton(PoseStack matrices, int mouseX, int mouseY, float delta) { if (this.renderBackground) // Renders the background of the button { - #if MC_1_16 + #if MC_VER < MC_1_17_1 Minecraft.getInstance().getTextureManager().bind(WIDGETS_LOCATION); RenderSystem.color4f(1.0F, 1.0F, 1.0F, this.alpha); #else @@ -109,7 +108,7 @@ public class TexturedButtonWidget extends Button RenderSystem.enableBlend(); RenderSystem.defaultBlendFunc(); RenderSystem.enableDepthTest(); - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #if MC_VER < MC_1_19_4 this.blit(matrices, this.x, this.y, 0, 46 + i * 20, this.width / 2, this.height); this.blit(matrices, this.x + this.width / 2, this.y, 200 - this.width / 2, 46 + i * 20, this.width / 2, this.height); #else @@ -121,7 +120,7 @@ public class TexturedButtonWidget extends Button super.renderButton(matrices, mouseX, mouseY, delta); } #else - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 + #if MC_VER < MC_1_20_1 @Override public void renderWidget(PoseStack matrices, int mouseX, int mouseY, float delta) { @@ -139,7 +138,7 @@ public class TexturedButtonWidget extends Button if (!this.active) i = 0; else if (this.isHovered) i = 2; - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 + #if MC_VER < MC_1_20_1 RenderSystem.enableBlend(); RenderSystem.defaultBlendFunc(); RenderSystem.enableDepthTest(); 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 be2c549a9..e66d7c3f8 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 @@ -15,11 +15,11 @@ import net.minecraft.client.gui.components.events.GuiEventListener; import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.Component; -#if MC_1_18 || MC_1_19 || MC_1_20 +#if MC_VER > MC_1_17_1 import net.minecraft.client.gui.narration.NarratableEntry; #endif -#if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 +#if MC_VER < MC_1_20_1 import net.minecraft.client.gui.GuiComponent; #else import net.minecraft.client.gui.GuiGraphics; @@ -144,13 +144,13 @@ public class ChangelogScreen extends DhScreen } @Override - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 + #if MC_VER < MC_1_20_1 public void render(PoseStack matrices, int mouseX, int mouseY, float delta) #else public void render(GuiGraphics matrices, int mouseX, int mouseY, float delta) #endif { - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 + #if MC_VER < MC_1_20_2 this.renderBackground(matrices); // Render background #else this.renderBackground(matrices, mouseX, mouseY, delta); // Render background @@ -161,7 +161,7 @@ public class ChangelogScreen extends DhScreen // Set the scroll position to the mouse height relative to the screen // This is a bit of a hack as we cannot scroll on this area double scrollAmount = ((double) mouseY) / ((double) this.height) * 1.1 * this.changelogArea.getMaxScroll(); - #if MC_1_16_5 || MC_1_17 + #if MC_VER == MC_1_16_5 || MC_VER == MC_1_17_1 this.changelogArea.setScrollAmount(scrollAmount); #else this.changelogArea.scrollAmount = scrollAmount; @@ -187,7 +187,7 @@ public class ChangelogScreen extends DhScreen public TextArea(Minecraft minecraftClient, int canvasWidth, int canvasHeight, int topMargin, int botMargin, int itemSpacing) { - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 || MC_1_20_2 + #if MC_VER < MC_1_20_4 super(minecraftClient, canvasWidth, canvasHeight, topMargin, canvasHeight - botMargin, itemSpacing); #else super(minecraftClient, canvasWidth, canvasHeight - (topMargin + botMargin), topMargin, itemSpacing); @@ -225,7 +225,7 @@ public class ChangelogScreen extends DhScreen return new ButtonEntry(text); } - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 + #if MC_VER < MC_1_20_1 @Override public void render(PoseStack matrices, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) { @@ -244,7 +244,7 @@ public class ChangelogScreen extends DhScreen { return children; } - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_17_1 @Override public List narratables() { 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 a03323457..6207d06ff 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 @@ -11,7 +11,7 @@ import com.seibel.distanthorizons.core.jar.JarUtils; import com.seibel.distanthorizons.core.jar.installer.ModrinthGetter; import com.seibel.distanthorizons.core.jar.updater.SelfUpdater; import net.minecraft.client.Minecraft; -#if MC_1_20_2 || MC_1_20_4 +#if MC_VER > MC_1_20_1 import net.minecraft.client.gui.GuiGraphics; #else import com.mojang.blaze3d.vertex.PoseStack; @@ -146,13 +146,13 @@ public class UpdateModScreen extends DhScreen } @Override - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 + #if MC_VER < MC_1_20_1 public void render(PoseStack matrices, int mouseX, int mouseY, float delta) #else public void render(GuiGraphics matrices, int mouseX, int mouseY, float delta) #endif { - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 + #if MC_VER < MC_1_20_2 this.renderBackground(matrices); // Render background #else this.renderBackground(matrices, mouseX, mouseY, delta); // Render background 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 4fc7d68e8..f0d3dc654 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 @@ -47,7 +47,7 @@ import net.minecraft.client.player.LocalPlayer; import net.minecraft.client.resources.model.ModelManager; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -#if MC_1_16 || MC_1_17 || MC_1_18 +#if MC_VER < MC_1_19_2 import net.minecraft.network.chat.TextComponent; #endif import net.minecraft.server.level.ServerLevel; @@ -197,7 +197,7 @@ public class MinecraftClientWrapper implements IMinecraftClientWrapper, IMinecra @Override public DhChunkPos getPlayerChunkPos() { - #if MC_1_16 + #if MC_VER < MC_1_17_1 ChunkPos playerPos = new ChunkPos(getPlayer().blockPosition()); #else ChunkPos playerPos = getPlayer().chunkPosition(); @@ -262,7 +262,7 @@ public class MinecraftClientWrapper implements IMinecraftClientWrapper, IMinecra { LocalPlayer p = getPlayer(); if (p == null) return; - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 p.sendMessage(new TextComponent(string), getPlayer().getUUID()); #else p.sendSystemMessage(net.minecraft.network.chat.Component.translatable(string)); @@ -282,7 +282,7 @@ 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 MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 || MC_1_20_2 + #if MC_VER < MC_1_20_4 Minecraft.crash(report); #else Minecraft.getInstance().delayCrash(report); 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 0131998fc..6a8ae1318 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 @@ -39,12 +39,12 @@ import com.seibel.distanthorizons.core.logging.DhLoggerBuilder; import com.seibel.distanthorizons.core.render.DhApiRenderProxy; import com.seibel.distanthorizons.core.wrapperInterfaces.misc.ILightMapWrapper; -#if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 +#if MC_VER < MC_1_19_4 import com.mojang.math.Vector3f; #else import org.joml.Vector3f; #endif -#if MC_1_20_2 || MC_1_20_4 +#if MC_VER >= MC_1_20_2 import net.minecraft.client.renderer.chunk.SectionRenderDispatcher; #endif @@ -67,7 +67,7 @@ import net.minecraft.client.renderer.FogRenderer; import net.minecraft.client.renderer.LevelRenderer; import net.minecraft.core.BlockPos; import net.minecraft.world.effect.MobEffects; -#if MC_1_16 +#if MC_VER < MC_1_17_1 import net.minecraft.tags.FluidTags; import net.minecraft.world.entity.Entity; import net.minecraft.world.level.material.FluidState; @@ -133,7 +133,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper public boolean playerHasBlindingEffect() { return MC.player.getActiveEffectsMap().get(MobEffects.BLINDNESS) != null - #if MC_1_19 || MC_1_20 + #if MC_VER >= MC_1_19_2 || MC.player.getActiveEffectsMap().get(MobEffects.DARKNESS) != null // Deep dark effect #endif ; @@ -151,7 +151,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper @Override public Mat4f getDefaultProjectionMatrix(float partialTicks) { - #if MC_1_16 + #if MC_VER < MC_1_17_1 return McObjectConverter.Convert(Minecraft.getInstance().gameRenderer.getProjectionMatrix(Minecraft.getInstance().gameRenderer.getMainCamera(), partialTicks, true)); #else return McObjectConverter.Convert(MC.gameRenderer.getProjectionMatrix(MC.gameRenderer.getFov(MC.gameRenderer.getMainCamera(), partialTicks, true))); @@ -161,7 +161,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper @Override public double getGamma() { - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 return MC.options.gamma; #else return MC.options.gamma().get(); @@ -171,7 +171,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper @Override public Color getFogColor(float partialTicks) { - #if MC_1_16 + #if MC_VER < MC_1_17_1 float[] colorValues = new float[4]; GL15.glGetFloatv(GL15.GL_FOG_COLOR, colorValues); #else @@ -192,7 +192,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper { if (MC.level.dimensionType().hasSkyLight()) { - #if MC_1_16 + #if MC_VER < MC_1_17_1 Vec3 colorValues = MC.level.getSkyColor(MC.gameRenderer.getMainCamera().getBlockPosition(), MC.getFrameTime()); #else Vec3 colorValues = MC.level.getSkyColor(MC.gameRenderer.getMainCamera().getPosition(), MC.getFrameTime()); @@ -213,7 +213,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper @Override public int getRenderDistance() { - #if MC_1_16 || MC_1_17 + #if MC_VER < MC_1_18_2 //FIXME: How to resolve this? return MC.options.renderDistance; #else @@ -321,15 +321,15 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper { try { - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 + #if MC_VER < MC_1_20_2 LevelRenderer levelRenderer = MC.levelRenderer; Collection chunks = - #if MC_1_16 || MC_1_17 levelRenderer.renderChunks; + #if MC_VER < MC_1_18_2 levelRenderer.renderChunks; #else levelRenderer.renderChunkStorage.get().renderChunks; #endif return (chunks.stream().map((chunk) -> { AABB chunkBoundingBox = - #if MC_1_16 || MC_1_17 chunk.chunk.bb; + #if MC_VER < MC_1_18_2 chunk.chunk.bb; #else chunk.chunk.getBoundingBox(); #endif return new DhChunkPos(Math.floorDiv((int) chunkBoundingBox.minX, 16), Math.floorDiv((int) chunkBoundingBox.minZ, 16)); @@ -371,7 +371,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper @Override public boolean isFogStateSpecial() { - #if MC_1_16 + #if MC_VER < MC_1_17_1 Camera camera = Minecraft.getInstance().gameRenderer.getMainCamera(); FluidState fluidState = camera.getFluidInCamera(); Entity entity = camera.getEntity(); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/misc/ServerPlayerWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/misc/ServerPlayerWrapper.java index eb70a535b..a9a401c04 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/misc/ServerPlayerWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/misc/ServerPlayerWrapper.java @@ -33,7 +33,7 @@ public class ServerPlayerWrapper implements IServerPlayerWrapper public IServerLevelWrapper getLevel() { - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 + #if MC_VER < MC_1_20_1 return ServerLevelWrapper.getWrapper(this.serverPlayer.getLevel()); #else return ServerLevelWrapper.getWrapper(this.serverPlayer.serverLevel()); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/world/ClientLevelWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/world/ClientLevelWrapper.java index 78138d85b..989d017bc 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/world/ClientLevelWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/world/ClientLevelWrapper.java @@ -136,7 +136,7 @@ public class ClientLevelWrapper implements IClientLevelWrapper @Override public int getMinHeight() { - #if MC_1_16 + #if MC_VER < MC_1_17_1 return 0; #else return this.level.getMinBuildHeight(); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/world/ServerLevelWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/world/ServerLevelWrapper.java index 28d7c6281..0728a01f3 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/world/ServerLevelWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/world/ServerLevelWrapper.java @@ -130,7 +130,7 @@ public class ServerLevelWrapper implements IServerLevelWrapper @Override public int getMinHeight() { - #if MC_1_16 + #if MC_VER < MC_1_17_1 return 0; #else return level.getMinBuildHeight(); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/BatchGenerationEnvironment.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/BatchGenerationEnvironment.java index b0549a495..65e9c37b9 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/BatchGenerationEnvironment.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/BatchGenerationEnvironment.java @@ -56,7 +56,7 @@ import com.seibel.distanthorizons.common.wrappers.worldGeneration.step.StepStruc import com.seibel.distanthorizons.common.wrappers.worldGeneration.step.StepStructureStart; import com.seibel.distanthorizons.common.wrappers.worldGeneration.step.StepSurface; -#if MC_1_19_4 || MC_1_20 +#if MC_VER > MC_1_19_4 import net.minecraft.core.registries.Registries; #else import net.minecraft.core.Registry; @@ -365,9 +365,9 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv private static ProtoChunk EmptyChunk(ServerLevel level, ChunkPos chunkPos) { return new ProtoChunk(chunkPos, UpgradeData.EMPTY - #if MC_1_18 || MC_1_19 || MC_1_20 , level #endif - #if MC_1_18 || MC_1_19 || MC_1_20 , level.registryAccess().registryOrThrow( - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #if MC_VER > MC_1_17_1 , level #endif + #if MC_VER > MC_1_18_2 , level.registryAccess().registryOrThrow( + #if MC_VER < MC_1_19_4 Registry.BIOME_REGISTRY #else Registries.BIOME @@ -463,8 +463,8 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv if (target == null) { target = new ProtoChunk(chunkPos, UpgradeData.EMPTY - #if MC_1_18 || MC_1_19 || MC_1_20 , params.level #endif - #if MC_1_18 || MC_1_19 || MC_1_20 , params.biomes, null #endif + #if MC_VER > MC_1_17_1 , params.level #endif + #if MC_VER > MC_1_18_2 , params.biomes, null #endif ); } return target; @@ -507,7 +507,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv ChunkAccess target = wrappedChunk.getChunk(); if (target instanceof LevelChunk) { - #if MC_1_16_5 || MC_1_17 + #if MC_VER == MC_1_16_5 || MC_VER == MC_1_17_1 ((LevelChunk) target).setLoaded(true); #else ((LevelChunk) target).loaded = true; @@ -520,7 +520,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv } boolean isFull = target.getStatus() == ChunkStatus.FULL || target instanceof LevelChunk; - #if MC_1_19 || MC_1_20 + #if MC_VER > MC_1_18_2 boolean isPartial = target.isOldNoiseGeneration(); #endif if (isFull) @@ -528,7 +528,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv LOAD_LOGGER.info("Detected full existing chunk at {}", target.getPos()); genEvent.resultConsumer.accept(wrappedChunk); } - #if MC_1_19 || MC_1_20 + #if MC_VER > MC_1_18_2 else if (isPartial) { LOAD_LOGGER.info("Detected old existing chunk at {}", target.getPos()); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/GlobalParameters.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/GlobalParameters.java index d3240b09a..51da9ca78 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/GlobalParameters.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/GlobalParameters.java @@ -31,16 +31,16 @@ import net.minecraft.server.level.ThreadedLevelLightEngine; import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.biome.BiomeManager; import net.minecraft.world.level.chunk.ChunkGenerator; -#if MC_1_18 || MC_1_19 || MC_1_20 +#if MC_VER > MC_1_18_2 import net.minecraft.world.level.chunk.storage.ChunkScanAccess; #endif import net.minecraft.world.level.levelgen.WorldGenSettings; -#if MC_1_16 || MC_1_17 || MC_1_18 +#if MC_VER < MC_1_19_2 import net.minecraft.world.level.levelgen.structure.templatesystem.StructureManager; #else import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager; import net.minecraft.world.level.levelgen.RandomState; -#if MC_1_19_4 || MC_1_20 +#if MC_VER > MC_1_19_4 import net.minecraft.world.level.levelgen.WorldOptions; import net.minecraft.core.registries.Registries; #endif @@ -50,13 +50,13 @@ import net.minecraft.world.level.storage.WorldData; public final class GlobalParameters { public final ChunkGenerator generator; - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 public final StructureManager structures; #else public final StructureTemplateManager structures; public final RandomState randomState; #endif - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #if MC_VER < MC_1_19_4 public final WorldGenSettings worldGenSettings; #else public final WorldOptions worldOptions; @@ -67,7 +67,7 @@ public final class GlobalParameters public final RegistryAccess registry; public final long worldSeed; public final DataFixer fixerUpper; - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_18_2 public final BiomeManager biomeManager; public final ChunkScanAccess chunkScanner; // FIXME: Figure out if this is actually needed #endif @@ -81,7 +81,7 @@ public final class GlobalParameters WorldData worldData = server.getWorldData(); registry = server.registryAccess(); - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #if MC_VER < MC_1_19_4 worldGenSettings = worldData.worldGenSettings(); biomes = registry.registryOrThrow(Registry.BIOME_REGISTRY); worldSeed = worldGenSettings.seed(); @@ -90,14 +90,14 @@ public final class GlobalParameters biomes = registry.registryOrThrow(Registries.BIOME); worldSeed = worldOptions.seed(); #endif - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_18_2 biomeManager = new BiomeManager(level, BiomeManager.obfuscateSeed(worldSeed)); chunkScanner = level.getChunkSource().chunkScanner(); #endif structures = server.getStructureManager(); generator = level.getChunkSource().getGenerator(); fixerUpper = server.getFixerUpper(); - #if MC_1_19 || MC_1_20 + #if MC_VER > MC_1_19_2 randomState = level.getChunkSource().randomState(); #endif } diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/ThreadedParameters.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/ThreadedParameters.java index 3b6bb23d5..db8a70195 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/ThreadedParameters.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/ThreadedParameters.java @@ -25,7 +25,7 @@ import com.seibel.distanthorizons.common.wrappers.worldGeneration.mimicObject.Wo import net.minecraft.server.level.ServerLevel; import net.minecraft.world.level.WorldGenLevel; -#if MC_1_18 || MC_1_19 || MC_1_20 +#if MC_VER > MC_1_18_2 import net.minecraft.world.level.levelgen.structure.StructureCheck; #endif @@ -35,7 +35,7 @@ public final class ThreadedParameters final ServerLevel level; public WorldGenStructFeatManager structFeat = null; - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_18_2 public StructureCheck structCheck; #endif boolean isValid = true; @@ -63,9 +63,9 @@ public final class ThreadedParameters previousGlobalParameters = param; this.level = param.level; - #if MC_1_16 || MC_1_17 + #if MC_VER < MC_1_18_2 this.structFeat = new WorldGenStructFeatManager(param.worldGenSettings, level); - #elif MC_1_16 || MC_1_17 || MC_1_18 + #elif MC_VER < MC_1_19_2 this.structCheck = this.createStructureCheck(param); #else this.structCheck = new StructureCheck(param.chunkScanner, param.registry, param.structures, @@ -80,15 +80,15 @@ public final class ThreadedParameters public void makeStructFeat(WorldGenLevel genLevel, GlobalParameters param) { - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 - structFeat = new WorldGenStructFeatManager(param.worldGenSettings, genLevel #if MC_1_18 || MC_1_19 || MC_1_20 , structCheck #endif ); + #if MC_VER < MC_1_19_4 + structFeat = new WorldGenStructFeatManager(param.worldGenSettings, genLevel #if MC_VER > MC_1_18_2 , structCheck #endif ); #else structFeat = new WorldGenStructFeatManager(param.worldOptions, genLevel, structCheck); #endif } - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER > MC_1_18_2 && MC_VER < MC_1_19_2 public void recreateStructureCheck() { if (previousGlobalParameters != null) diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java index 9986c402c..bdae4bb2e 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java @@ -37,7 +37,7 @@ import java.util.Objects; import net.minecraft.core.Registry; import net.minecraft.core.SectionPos; -#if MC_1_19_4 || MC_1_20 +#if MC_VER > MC_1_19_4 import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.core.registries.Registries; #endif @@ -55,24 +55,24 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.chunk.*; import net.minecraft.world.level.chunk.storage.ChunkSerializer; import net.minecraft.world.level.levelgen.Heightmap; -#if MC_1_18 || MC_1_19 || MC_1_20 +#if MC_VER > MC_1_18_2 import net.minecraft.world.level.levelgen.blending.BlendingData; -#if MC_1_16 || MC_1_17 || MC_1_18 +#if MC_VER < MC_1_19_2 import net.minecraft.world.level.levelgen.feature.StructureFeature; #endif import net.minecraft.world.level.levelgen.structure.StructureStart; import net.minecraft.world.level.levelgen.structure.pieces.StructurePieceSerializationContext; import net.minecraft.world.ticks.LevelChunkTicks; #endif -#if MC_1_18 || MC_1_19 || MC_1_20 +#if MC_VER > MC_1_18_2 import net.minecraft.core.Holder; import net.minecraft.core.RegistryAccess; -#if MC_1_16 || MC_1_17 || MC_1_18 +#if MC_VER < MC_1_19_2 import net.minecraft.world.level.levelgen.feature.ConfiguredStructureFeature; #endif #endif -#if MC_1_16_5 || MC_1_17 +#if MC_VER == MC_1_16_5 || MC_VER == MC_1_17_1 import net.minecraft.world.level.material.Fluids; #endif @@ -81,9 +81,9 @@ import net.minecraft.world.level.material.Fluid; public class ChunkLoader { - #if MC_1_19 || MC_1_20 + #if MC_VER > MC_1_19_2 private static final Codec> BLOCK_STATE_CODEC = PalettedContainer.codecRW(Block.BLOCK_STATE_REGISTRY, BlockState.CODEC, PalettedContainer.Strategy.SECTION_STATES, Blocks.AIR.defaultBlockState()); - #elif MC_1_18 || MC_1_19 || MC_1_20 + #elif MC_VER > MC_1_18_2 private static final Codec> BLOCK_STATE_CODEC = PalettedContainer.codec(Block.BLOCK_STATE_REGISTRY, BlockState.CODEC, PalettedContainer.Strategy.SECTION_STATES, Blocks.AIR.defaultBlockState()); #endif private static final String TAG_UPGRADE_DATA = "UpgradeData"; @@ -93,7 +93,7 @@ public class ChunkLoader private static final String FLUID_TICKS_TAG_PRE18 = "LiquidTicks"; private static final ConfigBasedLogger LOGGER = BatchGenerationEnvironment.LOAD_LOGGER; - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_18_2 private static BlendingData readBlendingData(CompoundTag chunkData) { BlendingData blendingData = null; @@ -109,16 +109,16 @@ public class ChunkLoader private static LevelChunkSection[] readSections(LevelAccessor level, ChunkPos chunkPos, CompoundTag chunkData) { - #if MC_1_18 || MC_1_19 || MC_1_20 - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #if MC_VER > MC_1_18_2 + #if MC_VER < MC_1_19_4 Registry biomes = level.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY); #else Registry biomes = level.registryAccess().registryOrThrow(Registries.BIOME); #endif - #if MC_1_16 || MC_1_17 + #if MC_VER < MC_1_18_2 Codec> biomeCodec = PalettedContainer.codec( biomes, biomes.byNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, biomes.getOrThrow(Biomes.PLAINS)); - #elif MC_1_16 || MC_1_17 || MC_1_18 + #elif MC_VER < MC_1_19_2 Codec>> biomeCodec = PalettedContainer.codec( biomes.asHolderIdMap(), biomes.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, biomes.getHolderOrThrow(Biomes.PLAINS)); #else @@ -126,7 +126,7 @@ public class ChunkLoader biomes.asHolderIdMap(), biomes.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, biomes.getHolderOrThrow(Biomes.PLAINS)); #endif #endif - int i = #if MC_1_16 16; #else level.getSectionsCount(); #endif + int i = #if MC_VER < MC_1_17_1 16; #else level.getSectionsCount(); #endif LevelChunkSection[] chunkSections = new LevelChunkSection[i]; boolean isLightOn = chunkData.getBoolean("isLightOn"); @@ -139,7 +139,7 @@ public class ChunkLoader CompoundTag tagSection = tagSections.getCompound(j); int sectionYPos = tagSection.getByte("Y"); - #if MC_1_16 || MC_1_17 + #if MC_VER < MC_1_18_2 if (tagSection.contains("Palette", 9) && tagSection.contains("BlockStates", 12)) { LevelChunkSection levelChunkSection = new LevelChunkSection(sectionYPos << 4); @@ -147,7 +147,7 @@ public class ChunkLoader tagSection.getLongArray("BlockStates")); levelChunkSection.recalcBlockCounts(); if (!levelChunkSection.isEmpty()) - chunkSections[#if MC_1_16 sectionYPos #else level.getSectionIndexFromSectionY(sectionYPos) #endif ] + chunkSections[#if MC_VER < MC_1_17_1 sectionYPos #else level.getSectionIndexFromSectionY(sectionYPos) #endif ] = levelChunkSection; } #else @@ -155,7 +155,7 @@ public class ChunkLoader if (sectionId >= 0 && sectionId < chunkSections.length) { PalettedContainer blockStateContainer; - #if MC_1_16 || MC_1_17 + #if MC_VER < MC_1_18_2 PalettedContainer biomeContainer; #else PalettedContainer> biomeContainer; @@ -165,7 +165,7 @@ public class ChunkLoader ? BLOCK_STATE_CODEC.parse(NbtOps.INSTANCE, tagSection.getCompound("block_states")).promotePartial(string -> logErrors(chunkPos, sectionYPos, string)).getOrThrow(false, LOGGER::error) : new PalettedContainer(Block.BLOCK_STATE_REGISTRY, Blocks.AIR.defaultBlockState(), PalettedContainer.Strategy.SECTION_STATES); - #if MC_1_16 || MC_1_17 + #if MC_VER < MC_1_18_2 biomeContainer = tagSection.contains("biomes", 10) ? biomeCodec.parse(NbtOps.INSTANCE, tagSection.getCompound("biomes")).promotePartial(string -> logErrors(chunkPos, sectionYPos, string)).getOrThrow(false, LOGGER::error) : new PalettedContainer(biomes, biomes.getOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES); @@ -174,7 +174,7 @@ public class ChunkLoader ? biomeCodec.parse(NbtOps.INSTANCE, tagSection.getCompound("biomes")).promotePartial(string -> logErrors(chunkPos, i, (String) string)).getOrThrow(false, LOGGER::error) : new PalettedContainer>(biomes.asHolderIdMap(), biomes.getHolderOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES); #endif - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 + #if MC_VER < MC_1_20_1 chunkSections[sectionId] = new LevelChunkSection(sectionYPos, blockStateContainer, biomeContainer); #else chunkSections[sectionId] = new LevelChunkSection(blockStateContainer, biomeContainer); @@ -223,7 +223,7 @@ public class ChunkLoader public static LevelChunk read(WorldGenLevel level, ChunkPos chunkPos, CompoundTag chunkData) { - #if MC_1_16 || MC_1_17 + #if MC_VER < MC_1_18_2 CompoundTag tagLevel = chunkData.getCompound("Level"); #else CompoundTag tagLevel = chunkData; @@ -237,12 +237,12 @@ public class ChunkLoader } ChunkStatus.ChunkType chunkType = readChunkType(tagLevel); - #if MC_1_16 || MC_1_17 + #if MC_VER < MC_1_18_2 if (chunkType != ChunkStatus.ChunkType.LEVELCHUNK) return null; #else BlendingData blendingData = readBlendingData(tagLevel); - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 if (chunkType == ChunkStatus.ChunkType.PROTOCHUNK && (blendingData == null || !blendingData.oldNoise())) return null; #else @@ -255,27 +255,27 @@ public class ChunkLoader //================== Read params for making the LevelChunk ================== UpgradeData upgradeData = tagLevel.contains(TAG_UPGRADE_DATA, 10) - ? new UpgradeData(tagLevel.getCompound(TAG_UPGRADE_DATA)#if MC_1_18 || MC_1_19 || MC_1_20 , level #endif ) + ? new UpgradeData(tagLevel.getCompound(TAG_UPGRADE_DATA)#if MC_VER > MC_1_17_1 , level #endif ) : UpgradeData.EMPTY; boolean isLightOn = tagLevel.getBoolean("isLightOn"); - #if MC_1_16 || MC_1_17 + #if MC_VER < MC_1_18_2 ChunkBiomeContainer chunkBiomeContainer = new ChunkBiomeContainer( - level.getLevel().registryAccess().registryOrThrow(Registry.BIOME_REGISTRY)#if MC_1_18 || MC_1_19 || MC_1_20 , level #endif , + level.getLevel().registryAccess().registryOrThrow(Registry.BIOME_REGISTRY)#if MC_VER > MC_1_17_1 , level #endif , chunkPos, level.getLevel().getChunkSource().getGenerator().getBiomeSource(), tagLevel.contains("Biomes", 11) ? tagLevel.getIntArray("Biomes") : null); TickList blockTicks = tagLevel.contains(BLOCK_TICKS_TAG_PRE18, 9) ? ChunkTickList.create(tagLevel.getList(BLOCK_TICKS_TAG_PRE18, 10), Registry.BLOCK::getKey, Registry.BLOCK::get) : new ProtoTickList(block -> (block == null || block.defaultBlockState().isAir()), chunkPos, - tagLevel.getList("ToBeTicked", 9)#if MC_1_18 || MC_1_19 || MC_1_20 , level #endif ); + tagLevel.getList("ToBeTicked", 9)#if MC_VER > MC_1_17_1 , level #endif ); TickList fluidTicks = tagLevel.contains(FLUID_TICKS_TAG_PRE18, 9) ? ChunkTickList.create(tagLevel.getList(FLUID_TICKS_TAG_PRE18, 10), Registry.FLUID::getKey, Registry.FLUID::get) : new ProtoTickList(fluid -> (fluid == null || fluid == Fluids.EMPTY), chunkPos, - tagLevel.getList("LiquidsToBeTicked", 9)#if MC_1_18 || MC_1_19 || MC_1_20 , level #endif ); + tagLevel.getList("LiquidsToBeTicked", 9)#if MC_VER > MC_1_17_1 , level #endif ); #else - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #if MC_VER < MC_1_19_4 LevelChunkTicks blockTicks = LevelChunkTicks.load(tagLevel.getList(BLOCK_TICKS_TAG_18, 10), string -> Registry.BLOCK.getOptional(ResourceLocation.tryParse(string)), chunkPos); LevelChunkTicks fluidTicks = LevelChunkTicks.load(tagLevel.getList(FLUID_TICKS_TAG_18, 10), @@ -291,7 +291,7 @@ public class ChunkLoader LevelChunkSection[] levelChunkSections = readSections(level, chunkPos, tagLevel); // ====================== Make the chunk ========================= - #if MC_1_16 || MC_1_17 + #if MC_VER < MC_1_18_2 LevelChunk chunk = new LevelChunk((Level) level.getLevel(), chunkPos, chunkBiomeContainer, upgradeData, blockTicks, fluidTicks, inhabitedTime, levelChunkSections, null); #else diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DhLitWorldGenRegion.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DhLitWorldGenRegion.java index b384ca2bb..d287ea3f7 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DhLitWorldGenRegion.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DhLitWorldGenRegion.java @@ -41,7 +41,7 @@ import net.minecraft.util.Mth; import net.minecraft.world.entity.Entity; import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.ColorResolver; -#if MC_1_18 || MC_1_19 || MC_1_20 +#if MC_VER > MC_1_17_1 import net.minecraft.world.level.LevelHeightAccessor; #endif import net.minecraft.world.level.LightLayer; @@ -73,11 +73,11 @@ public class DhLitWorldGenRegion extends WorldGenRegion */ ReentrantLock getChunkLock = new ReentrantLock(); - #if MC_1_16 || MC_1_17 + #if MC_VER < MC_1_18_2 private ChunkPos overrideCenterPos = null; public void setOverrideCenter(ChunkPos pos) { overrideCenterPos = pos; } - #if MC_1_16 + #if MC_VER < MC_1_17_1 @Override public int getCenterX() { @@ -104,7 +104,7 @@ public class DhLitWorldGenRegion extends WorldGenRegion List chunkList, ChunkStatus chunkStatus, int writeRadius, BatchGenerationEnvironment.EmptyChunkGenerator generator) { - super(serverLevel, chunkList #if MC_1_18 || MC_1_19 || MC_1_20 , chunkStatus, writeRadius #endif ); + super(serverLevel, chunkList #if MC_VER > MC_1_17_1 , chunkStatus, writeRadius #endif ); this.firstPos = chunkList.get(0).getPos(); this.generator = generator; this.lightEngine = lightEngine; @@ -115,7 +115,7 @@ public class DhLitWorldGenRegion extends WorldGenRegion - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_17_1 // Bypass BCLib mixin overrides. @Override public boolean ensureCanWrite(BlockPos blockPos) @@ -130,7 +130,7 @@ public class DhLitWorldGenRegion extends WorldGenRegion { return false; } - #if MC_1_19 || MC_1_20 + #if MC_VER > MC_1_18_2 if (center.isUpgrading()) { LevelHeightAccessor levelHeightAccessor = center.getHeightAccessorForGeneration(); @@ -185,7 +185,7 @@ public class DhLitWorldGenRegion extends WorldGenRegion BlockState blockState = this.getBlockState(blockPos); // This is a bypass for the spawner block since MC complains about not having it - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_17_1 if (blockState.getBlock() instanceof SpawnerBlock) { return ((EntityBlock) blockState.getBlock()).newBlockEntity(blockPos, blockState); @@ -269,7 +269,7 @@ public class DhLitWorldGenRegion extends WorldGenRegion ChunkAccess chunk = getChunkAccess(i, j, chunkStatus, bl); if (chunk instanceof LevelChunk) { - chunk = new ImposterProtoChunk((LevelChunk) chunk #if MC_1_18 || MC_1_19 || MC_1_20 , true #endif ); + chunk = new ImposterProtoChunk((LevelChunk) chunk #if MC_VER > MC_1_18_2 , true #endif ); } return chunk; } @@ -331,7 +331,7 @@ public class DhLitWorldGenRegion extends WorldGenRegion private Biome _getBiome(BlockPos pos) { - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_18_2 return getBiome(pos).value(); #else return getBiome(pos); @@ -340,7 +340,7 @@ public class DhLitWorldGenRegion extends WorldGenRegion public int calculateBlockTint(BlockPos blockPos, ColorResolver colorResolver) { - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 int i = (Minecraft.getInstance()).options.biomeBlendRadius; #else int i = (Minecraft.getInstance()).options.biomeBlendRadius().get(); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DummyLightEngine.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DummyLightEngine.java index ad6334ece..0be2237ff 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DummyLightEngine.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DummyLightEngine.java @@ -39,7 +39,7 @@ public class DummyLightEngine extends LevelLightEngine } - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 + #if MC_VER < MC_1_20_1 @Override public void onBlockEmissionIncrease(BlockPos blockPos, int i) { } @@ -63,7 +63,7 @@ public class DummyLightEngine extends LevelLightEngine #endif @Override - public void queueSectionData(LightLayer lightLayer, SectionPos sectionPos, @Nullable DataLayer dataLayer #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 , boolean bl #endif ) { } + public void queueSectionData(LightLayer lightLayer, SectionPos sectionPos, @Nullable DataLayer dataLayer #if MC_VER < MC_1_20_1 , boolean bl #endif ) { } @Override public void checkBlock(BlockPos blockPos) { } @@ -87,7 +87,7 @@ public class DummyLightEngine extends LevelLightEngine @Override public void retainData(ChunkPos chunkPos, boolean bl) { } - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_17_1 @Override public int getLightSectionCount() { throw new UnsupportedOperationException("This should never be used!"); } @Override diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/LightGetterAdaptor.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/LightGetterAdaptor.java index 91add021d..268445fa2 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/LightGetterAdaptor.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/LightGetterAdaptor.java @@ -23,12 +23,12 @@ import com.seibel.distanthorizons.core.dependencyInjection.ModAccessorInjector; import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IStarlightAccessor; import net.minecraft.world.level.BlockGetter; -#if MC_1_18 || MC_1_19 || MC_1_20 +#if MC_VER > MC_1_17_1 import net.minecraft.world.level.LevelHeightAccessor; #endif import net.minecraft.world.level.chunk.ChunkStatus; import net.minecraft.world.level.chunk.LightChunkGetter; -#if MC_1_20_2 || MC_1_20_4 +#if MC_VER > MC_1_20_1 import net.minecraft.world.level.chunk.LightChunk; #endif @@ -50,7 +50,7 @@ public class LightGetterAdaptor implements LightChunkGetter } @Override - public #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 BlockGetter #else LightChunk #endif getChunkForLighting(int chunkX, int chunkZ) + public #if MC_VER < MC_1_20_1 BlockGetter #else LightChunk #endif getChunkForLighting(int chunkX, int chunkZ) { if (genRegion == null) throw new IllegalStateException("World Gen region has not been set!"); @@ -64,7 +64,7 @@ public class LightGetterAdaptor implements LightChunkGetter return shouldReturnNull ? null : (genRegion != null ? genRegion : heightGetter); } - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_17_1 public LevelHeightAccessor getLevelHeightAccessor() { return heightGetter; diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/RegionFileStorageExternalCache.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/RegionFileStorageExternalCache.java index 761241c68..edbc1c89f 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/RegionFileStorageExternalCache.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/RegionFileStorageExternalCache.java @@ -70,7 +70,7 @@ public class RegionFileStorageExternalCache implements AutoCloseable { this.getRegionFileLock.lock(); - #if MC_1_16_5 || MC_1_17 + #if MC_VER == MC_1_16_5 || MC_VER == MC_1_17_1 rFile = this.storage.getRegionFile(pos); // keeping the region cache size low helps prevent concurrency issues @@ -90,7 +90,7 @@ public class RegionFileStorageExternalCache implements AutoCloseable } catch (ArrayIndexOutOfBoundsException e) { - #if MC_1_16_5 || MC_1_17 + #if MC_VER == MC_1_16_5 || MC_VER == MC_1_17_1 // the file just wasn't cached break; #else @@ -145,7 +145,7 @@ public class RegionFileStorageExternalCache implements AutoCloseable // Otherwise, check if file exist, and if so, add it to the cache Path storageFolderPath; - #if MC_1_16_5 || MC_1_17 + #if MC_VER == MC_1_16_5 || MC_VER == MC_1_17_1 storageFolderPath = this.storage.folder.toPath(); #else storageFolderPath = this.storage.folder; @@ -157,7 +157,7 @@ public class RegionFileStorageExternalCache implements AutoCloseable } Path regionFilePath = storageFolderPath.resolve("r." + pos.getRegionX() + "." + pos.getRegionZ() + ".mca"); - #if MC_1_16_5 || MC_1_17 + #if MC_VER == MC_1_16_5 || MC_VER == MC_1_17_1 rFile = new RegionFile(regionFilePath.toFile(), storageFolderPath.toFile(), false); #else rFile = new RegionFile(regionFilePath, storageFolderPath, false); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/WorldGenStructFeatManager.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/WorldGenStructFeatManager.java index 096e1ad84..69777916e 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/WorldGenStructFeatManager.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/WorldGenStructFeatManager.java @@ -37,49 +37,49 @@ import net.minecraft.world.level.WorldGenLevel; import net.minecraft.world.level.chunk.ChunkAccess; import net.minecraft.world.level.chunk.ChunkStatus; import net.minecraft.world.level.levelgen.WorldGenSettings; -#if MC_1_16 || MC_1_17 || MC_1_18 +#if MC_VER < MC_1_19_2 import net.minecraft.world.level.levelgen.feature.ConfiguredStructureFeature; import net.minecraft.world.level.StructureFeatureManager; #else -#if MC_1_19_4 || MC_1_20 +#if MC_VER > MC_1_19_4 import net.minecraft.world.level.levelgen.WorldOptions; #endif import net.minecraft.world.level.levelgen.structure.Structure; import net.minecraft.world.level.StructureManager; #endif -#if MC_1_18 || MC_1_19 || MC_1_20 +#if MC_VER > MC_1_18_2 import net.minecraft.world.level.levelgen.structure.StructureCheck; #endif import net.minecraft.world.level.levelgen.structure.StructureStart; -#if MC_1_16 || MC_1_17 +#if MC_VER < MC_1_18_2 import net.minecraft.world.level.levelgen.feature.StructureFeature; #endif -public class WorldGenStructFeatManager extends #if MC_1_16 || MC_1_17 || MC_1_18 StructureFeatureManager #else StructureManager #endif +public class WorldGenStructFeatManager extends #if MC_VER < MC_1_19_2 StructureFeatureManager #else StructureManager #endif { final WorldGenLevel genLevel; - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #if MC_VER < MC_1_19_4 WorldGenSettings worldGenSettings; #else WorldOptions worldOptions; #endif - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_18_2 StructureCheck structureCheck; #endif - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #if MC_VER < MC_1_19_4 public WorldGenStructFeatManager( WorldGenSettings worldGenSettings, - WorldGenLevel genLevel #if MC_1_18 || MC_1_19 || MC_1_20 , StructureCheck structureCheck #endif ) + WorldGenLevel genLevel #if MC_VER > MC_1_18_2 , StructureCheck structureCheck #endif ) { - super(genLevel, worldGenSettings #if MC_1_18 || MC_1_19 || MC_1_20 , structureCheck #endif ); + super(genLevel, worldGenSettings #if MC_VER > MC_1_18_2 , structureCheck #endif ); this.genLevel = genLevel; this.worldGenSettings = worldGenSettings; } @@ -100,8 +100,8 @@ public class WorldGenStructFeatManager extends #if MC_1_16 || MC_1_17 || MC_1_18 { if (worldGenRegion == genLevel) return this; - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 - return new WorldGenStructFeatManager(worldGenSettings, worldGenRegion #if MC_1_18 || MC_1_19 || MC_1_20 , structureCheck #endif ); + #if MC_VER < MC_1_19_4 + return new WorldGenStructFeatManager(worldGenSettings, worldGenRegion #if MC_VER > MC_1_18_2 , structureCheck #endif ); #else return new WorldGenStructFeatManager(worldOptions, worldGenRegion, structureCheck); #endif @@ -113,7 +113,7 @@ public class WorldGenStructFeatManager extends #if MC_1_16 || MC_1_17 || MC_1_18 return genLevel.getChunk(x, z, status, false); } - #if MC_1_16 || MC_1_17 + #if MC_VER < MC_1_18_2 @Override public Stream> startsForFeature( SectionPos sectionPos2, @@ -140,7 +140,7 @@ public class WorldGenStructFeatManager extends #if MC_1_16 || MC_1_17 || MC_1_18 return chunk.hasAnyStructureReferences(); } - #if MC_1_18_1 + #if MC_VER == MC_1_18_1 @Override @SuppressWarnings({ "rawtypes", "unchecked" }) public List> startsForFeature(SectionPos sectionPos, @@ -165,7 +165,7 @@ public class WorldGenStructFeatManager extends #if MC_1_16 || MC_1_17 || MC_1_18 return builder.build(); } #else - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 @Override public List startsForFeature(SectionPos sectionPos, Predicate> predicate) { diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepBiomes.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepBiomes.java index 7d3571264..150b7f3bd 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepBiomes.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepBiomes.java @@ -27,12 +27,12 @@ import com.seibel.distanthorizons.common.wrappers.worldGeneration.BatchGeneratio import com.seibel.distanthorizons.common.wrappers.worldGeneration.ThreadedParameters; import net.minecraft.server.level.WorldGenRegion; -#if MC_1_16 || MC_1_17 || MC_1_18 +#if MC_VER < MC_1_19_2 #endif import net.minecraft.world.level.chunk.ChunkAccess; import net.minecraft.world.level.chunk.ChunkStatus; import net.minecraft.world.level.chunk.ProtoChunk; -#if MC_1_18 || MC_1_19 || MC_1_20 +#if MC_VER > MC_1_18_2 import net.minecraft.world.level.levelgen.blending.Blender; #endif @@ -65,12 +65,12 @@ public final class StepBiomes for (ChunkAccess chunk : chunksToDo) { // System.out.println("StepBiomes: "+chunk.getPos()); - #if MC_1_16 || MC_1_17 + #if MC_VER < MC_1_18_2 environment.params.generator.createBiomes(environment.params.biomes, chunk); - #elif MC_1_16 || MC_1_17 || MC_1_18 + #elif MC_VER < MC_1_19_2 chunk = environment.joinSync(environment.params.generator.createBiomes(environment.params.biomes, Runnable::run, Blender.of(worldGenRegion), tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk)); - #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #elif MC_VER < MC_1_19_4 chunk = environment.joinSync(environment.params.generator.createBiomes(environment.params.biomes, Runnable::run, environment.params.randomState, Blender.of(worldGenRegion), tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk)); #else diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepFeatures.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepFeatures.java index 7d36c5038..f5b7d1016 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepFeatures.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepFeatures.java @@ -32,7 +32,7 @@ import net.minecraft.world.level.chunk.ChunkAccess; import net.minecraft.world.level.chunk.ChunkStatus; import net.minecraft.world.level.chunk.ProtoChunk; import net.minecraft.world.level.levelgen.Heightmap; -#if MC_1_19 || MC_1_20 +#if MC_VER > MC_1_18_2 #endif public final class StepFeatures @@ -65,7 +65,7 @@ public final class StepFeatures { try { - #if MC_1_16 || MC_1_17 + #if MC_VER < MC_1_18_2 worldGenRegion.setOverrideCenter(chunk.getPos()); environment.params.generator.applyBiomeDecoration(worldGenRegion, tParams.structFeat); #else diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepNoise.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepNoise.java index a520c7015..f3c01a650 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepNoise.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepNoise.java @@ -28,14 +28,14 @@ import com.seibel.distanthorizons.common.wrappers.worldGeneration.ThreadedParame import com.seibel.distanthorizons.core.util.objects.UncheckedInterruptedException; import net.minecraft.server.level.WorldGenRegion; -#if MC_1_18 || MC_1_19 || MC_1_20 +#if MC_VER > MC_1_17_1 #endif -#if MC_1_16 || MC_1_17 || MC_1_18 +#if MC_VER < MC_1_19_2 #endif import net.minecraft.world.level.chunk.ChunkAccess; import net.minecraft.world.level.chunk.ChunkStatus; import net.minecraft.world.level.chunk.ProtoChunk; -#if MC_1_18 || MC_1_19 || MC_1_20 +#if MC_VER > MC_1_18_2 import net.minecraft.world.level.levelgen.blending.Blender; #endif @@ -69,12 +69,12 @@ public final class StepNoise for (ChunkAccess chunk : chunksToDo) { // System.out.println("StepNoise: "+chunk.getPos()); - #if MC_1_16 + #if MC_VER < MC_1_17_1 environment.params.generator.fillFromNoise(worldGenRegion, tParams.structFeat, chunk); - #elif MC_1_16 || MC_1_17 + #elif MC_VER < MC_1_18_2 chunk = environment.joinSync(environment.params.generator.fillFromNoise(Runnable::run, tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk)); - #elif MC_1_16 || MC_1_17 || MC_1_18 + #elif MC_VER < MC_1_19_2 chunk = environment.joinSync(environment.params.generator.fillFromNoise(Runnable::run, Blender.of(worldGenRegion), tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk)); #else diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepStructureReference.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepStructureReference.java index 1320280f5..76ee86400 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepStructureReference.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepStructureReference.java @@ -27,7 +27,7 @@ import com.seibel.distanthorizons.common.wrappers.worldGeneration.BatchGeneratio import com.seibel.distanthorizons.common.wrappers.worldGeneration.ThreadedParameters; import net.minecraft.server.level.WorldGenRegion; -#if MC_1_16 || MC_1_17 || MC_1_18 +#if MC_VER < MC_1_19_2 #endif import net.minecraft.world.level.chunk.ChunkAccess; import net.minecraft.world.level.chunk.ChunkStatus; diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepStructureStart.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepStructureStart.java index e8a18e566..0a22eae65 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepStructureStart.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepStructureStart.java @@ -77,10 +77,10 @@ public final class StepStructureStart } } - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 if (environment.params.worldGenSettings.generateFeatures()) { - #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #elif MC_VER < MC_1_19_4 if (environment.params.worldGenSettings.generateStructures()) { #else if (environment.params.worldOptions.generateStructures()) @@ -98,10 +98,10 @@ public final class StepStructureStart // and should prevent some concurrency issues STRUCTURE_PLACEMENT_LOCK.lock(); - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 environment.params.generator.createStructures(environment.params.registry, tParams.structFeat, chunk, environment.params.structures, environment.params.worldSeed); - #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #elif MC_VER < MC_1_19_4 environment.params.generator.createStructures(environment.params.registry, environment.params.randomState, tParams.structFeat, chunk, environment.params.structures, environment.params.worldSeed); #else @@ -110,7 +110,7 @@ public final class StepStructureStart tParams.structFeat, chunk, environment.params.structures); #endif - #if MC_1_19 || MC_1_20 + #if MC_VER > MC_1_18_2 try { tParams.structCheck.onStructureLoad(chunk.getPos(), chunk.getAllStarts()); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepSurface.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepSurface.java index a50adc7a4..5978651d8 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepSurface.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepSurface.java @@ -61,9 +61,9 @@ public final class StepSurface for (ChunkAccess chunk : chunksToDo) { // System.out.println("StepSurface: "+chunk.getPos()); - #if MC_1_16 || MC_1_17 + #if MC_VER < MC_1_18_2 environment.params.generator.buildSurfaceAndBedrock(worldGenRegion, chunk); - #elif MC_1_16 || MC_1_17 || MC_1_18 + #elif MC_VER < MC_1_19_2 environment.params.generator.buildSurface(worldGenRegion, tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk); #else environment.params.generator.buildSurface(worldGenRegion, tParams.structFeat.forWorldGenRegion(worldGenRegion), environment.params.randomState, chunk); diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricClientProxy.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricClientProxy.java index 9f23e8596..409002829 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricClientProxy.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricClientProxy.java @@ -203,9 +203,9 @@ public class FabricClientProxy { float[] matrixFloatArray = SeamlessOverdraw.overwriteMinecraftNearFarClipPlanes(renderContext.projectionMatrix(), renderContext.tickDelta()); - #if MC_1_16_5 + #if MC_VER == MC_1_16_5 SeamlessOverdraw.applyLegacyProjectionMatrix(matrixFloatArray); - #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #elif MC_VER < MC_1_19_4 renderContext.projectionMatrix().load(FloatBuffer.wrap(matrixFloatArray)); #else renderContext.projectionMatrix().set(matrixFloatArray); diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricMain.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricMain.java index c43b73d85..4ef561058 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricMain.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricMain.java @@ -59,7 +59,7 @@ public class FabricMain if (Config.Client.Advanced.Graphics.Fog.disableVanillaFog.get() && SingletonInjector.INSTANCE.get(IModChecker.class).isModLoaded("bclib")) ModAccessorInjector.INSTANCE.get(IBCLibAccessor.class).setRenderCustomFog(false); // Remove BCLib's fog - #if MC_1_20_2 || MC_1_20_4 + #if MC_VER > MC_1_20_1 if (SingletonInjector.INSTANCE.get(IModChecker.class).isModLoaded("sodium")) ModAccessorInjector.INSTANCE.get(ISodiumAccessor.class).setFogOcclusion(false); // FIXME: This is a tmp fix for sodium 0.5.0, and 0.5.1. This is fixed in sodium 0.5.2 #endif @@ -118,7 +118,7 @@ public class FabricMain ModAccessorInjector.INSTANCE.bind(IBCLibAccessor.class, new BCLibAccessor()); } - #if MC_1_16_5 || MC_1_18 || MC_1_19 || MC_1_20_1 + #if MC_VER != MC_1_17_1 && MC_VER <= MC_1_20_1 // 1.17.1 won't support this since there isn't a matching Iris version if (modChecker.isModLoaded("iris")) { diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientLevel.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientLevel.java index a617a6faa..7dc45f784 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientLevel.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientLevel.java @@ -24,7 +24,7 @@ import com.seibel.distanthorizons.common.wrappers.world.ClientLevelWrapper; import com.seibel.distanthorizons.core.api.internal.ClientApi; import com.seibel.distanthorizons.core.api.internal.SharedApi; import net.minecraft.client.multiplayer.ClientLevel; -#if MC_1_19 || MC_1_20 +#if MC_VER > MC_1_18_2 #endif import net.minecraft.world.level.chunk.LevelChunk; import org.spongepowered.asm.mixin.Mixin; @@ -44,14 +44,14 @@ public class MixinClientLevel // //Moved to MixinClientPacketListener // @Inject(method = "", at = @At("TAIL")) // private void loadWorldEvent(ClientPacketListener clientPacketListener, ClientLevel.ClientLevelData clientLevelData, ResourceKey resourceKey, -// #if MC_1_19 || MC_1_20 Holder holder, #else DimensionType dimensionType, #endif int i, -// #if MC_1_19 || MC_1_20 int j, #endif Supplier supplier, LevelRenderer levelRenderer, boolean bl, long l, CallbackInfo ci) +// #if MC_VER > MC_1_18_2 Holder holder, #else DimensionType dimensionType, #endif int i, +// #if MC_VER > MC_1_18_2 int j, #endif Supplier supplier, LevelRenderer levelRenderer, boolean bl, long l, CallbackInfo ci) // { // ClientApi.INSTANCE.clientLevelLoadEvent(WorldWrapper.getWorldWrapper((ClientLevel)(Object)this)); // } // Moved to overriding the enableChunkLight(...) method over at ClientPacketListener for 1.20+ - #if (MC_1_19 || MC_1_20) && (MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19) // Only the setLightReady is only available after 1.18. This ensures the light data is ready. + #if MC_VER > MC_1_18_2 && MC_VER < MC_1_20_1 // Only the setLightReady is only available after 1.18. This ensures the light data is ready. @Inject(method = "setLightReady", at = @At("HEAD")) private void onChunkLightReady(int x, int z, CallbackInfo ci) { diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientPacketListener.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientPacketListener.java index d86208188..ac6c09572 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientPacketListener.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientPacketListener.java @@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -#if MC_1_20_2 || MC_1_20_4 +#if MC_VER > MC_1_20_1 import com.seibel.distanthorizons.core.wrapperInterfaces.world.IClientLevelWrapper; import net.minecraft.world.level.chunk.LevelChunk; import com.seibel.distanthorizons.common.wrappers.chunk.ChunkWrapper; @@ -31,7 +31,7 @@ public class MixinClientPacketListener @Inject(method = "handleRespawn", at = @At("RETURN")) void onHandleRespawnEnd(CallbackInfo ci) { ClientApi.INSTANCE.clientLevelLoadEvent(ClientLevelWrapper.getWrapper(this.level)); } - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #if MC_VER < MC_1_19_4 @Inject(method = "cleanup", at = @At("HEAD")) #else @Inject(method = "close", at = @At("HEAD")) @@ -45,7 +45,7 @@ public class MixinClientPacketListener ClientApi.INSTANCE.onClientOnlyDisconnected(); } - #if MC_1_20_2 || MC_1_20_4 + #if MC_VER > MC_1_20_1 @Inject(method = "enableChunkLight", at = @At("TAIL")) void onEnableChunkLight(LevelChunk chunk, int x, int z, CallbackInfo ci) { diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinFogRenderer.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinFogRenderer.java index d01145bf5..3f24f1865 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinFogRenderer.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinFogRenderer.java @@ -35,7 +35,7 @@ import net.minecraft.client.renderer.FogRenderer.FogMode; import net.minecraft.world.effect.MobEffects; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; -#if MC_1_16 +#if MC_VER < MC_1_17_1 import net.minecraft.world.level.material.FluidState; #else import net.minecraft.world.level.material.FogType; @@ -50,14 +50,14 @@ public class MixinFogRenderer private static final float A_EVEN_LARGER_VALUE = 42069420694206942069.F; @Inject(at = @At("RETURN"), method = "setupFog") - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 private static void disableSetupFog(Camera camera, FogMode fogMode, float f, boolean bl, CallbackInfo callback) { #else private static void disableSetupFog(Camera camera, FogMode fogMode, float f, boolean bl, float g, CallbackInfo callback) { #endif - #if MC_1_16 + #if MC_VER < MC_1_17_1 FluidState fluidState = camera.getFluidInCamera(); boolean cameraNotInFluid = fluidState.isEmpty(); #else @@ -71,7 +71,7 @@ public class MixinFogRenderer && !SingletonInjector.INSTANCE.get(IMinecraftRenderWrapper.class).isFogStateSpecial() && Config.Client.Advanced.Graphics.Fog.disableVanillaFog.get()) { - #if MC_1_16 + #if MC_VER < MC_1_17_1 RenderSystem.fogStart(A_REALLY_REALLY_BIG_VALUE); RenderSystem.fogEnd(A_EVEN_LARGER_VALUE); #else diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinGameRenderer.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinGameRenderer.java index 5da0b369e..5a11f09d8 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinGameRenderer.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinGameRenderer.java @@ -16,7 +16,7 @@ public class MixinGameRenderer private static final Logger LOGGER = LogManager.getLogger(MixinGameRenderer.class.getSimpleName()); - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_17_1 // FIXME: This I think will dup multiple renderStartupEvent calls... @Inject(method = {"reloadShaders", "preloadUiShader"}, at = @At("TAIL")) public void onStartupShaders(CallbackInfo ci) diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinLevelRenderer.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinLevelRenderer.java index 8422bebf4..4d2f041a2 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinLevelRenderer.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinLevelRenderer.java @@ -20,7 +20,7 @@ package com.seibel.distanthorizons.fabric.mixins.client; import com.mojang.blaze3d.vertex.PoseStack; -#if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 +#if MC_VER < MC_1_19_4 import com.mojang.math.Matrix4f; #else import net.minecraft.client.Camera; @@ -67,7 +67,7 @@ public class MixinLevelRenderer // Inject rendering at first call to renderChunkLayer // HEAD or RETURN - #if MC_1_16 + #if MC_VER < MC_1_17_1 @Inject(at = @At("RETURN"), method = "renderSky(Lcom/mojang/blaze3d/vertex/PoseStack;F)V") private void renderSky(PoseStack matrixStackIn, float partialTicks, CallbackInfo callback) { @@ -84,17 +84,17 @@ public class MixinLevelRenderer } #endif - #if MC_1_16 + #if MC_VER < MC_1_17_1 @Inject(at = @At("HEAD"), method = "renderChunkLayer(Lnet/minecraft/client/renderer/RenderType;Lcom/mojang/blaze3d/vertex/PoseStack;DDD)V", cancellable = true) private void renderChunkLayer(RenderType renderType, PoseStack matrixStackIn, double xIn, double yIn, double zIn, CallbackInfo callback) - #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #elif MC_VER < MC_1_19_4 @Inject(at = @At("HEAD"), method = "renderChunkLayer(Lnet/minecraft/client/renderer/RenderType;Lcom/mojang/blaze3d/vertex/PoseStack;DDDLcom/mojang/math/Matrix4f;)V", cancellable = true) private void renderChunkLayer(RenderType renderType, PoseStack modelViewMatrixStack, double cameraXBlockPos, double cameraYBlockPos, double cameraZBlockPos, Matrix4f projectionMatrix, CallbackInfo callback) - #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 + #elif MC_VER < MC_1_20_2 @Inject(at = @At("HEAD"), method = "renderChunkLayer(Lnet/minecraft/client/renderer/RenderType;Lcom/mojang/blaze3d/vertex/PoseStack;DDDLorg/joml/Matrix4f;)V", cancellable = true) @@ -113,10 +113,10 @@ public class MixinLevelRenderer } } - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #if MC_VER < MC_1_19_4 @Inject(at = @At(value = "TAIL", target = "Lnet/minecraft/world/level/lighting/LevelLightEngine;runUpdates(IZZ)I"), method = "renderLevel") public void callAfterRunUpdates(PoseStack poseStack, float partialTick, long finishNanoTime, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightTexture lightTexture, Matrix4f projectionMatrix, CallbackInfo ci) - #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 + #elif MC_VER < MC_1_20_1 @Inject(at = @At(value = "TAIL", target = "Lnet/minecraft/world/level/lighting/LevelLightEngine;runUpdates(IZZ)I"), method = "renderLevel") public void callAfterRunUpdates(PoseStack poseStack, float partialTick, long finishNanoTime, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightTexture lightTexture, Matrix4f projectionMatrix, CallbackInfo ci) #else diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinMinecraft.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinMinecraft.java index 8c4a32972..f96c258de 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinMinecraft.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinMinecraft.java @@ -25,8 +25,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(Minecraft.class) public class MixinMinecraft { - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 - #if MC_1_20_1 + #if MC_VER < MC_1_20_2 + #if MC_VER == MC_1_20_1 @Redirect( method = "Lnet/minecraft/client/Minecraft;setInitialScreen(Lcom/mojang/realmsclient/client/RealmsClient;Lnet/minecraft/server/packs/resources/ReloadInstance;Lnet/minecraft/client/main/GameConfig$QuickPlayData;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/Minecraft;setScreen(Lnet/minecraft/client/gui/screens/Screen;)V") @@ -61,7 +61,7 @@ public class MixinMinecraft } #endif - #if MC_1_20_4 + #if MC_VER > MC_1_20_2 @Redirect( method = "Lnet/minecraft/client/Minecraft;onGameLoadFinished(Lnet/minecraft/client/Minecraft$GameLoadCookie;)V", at = @At(value = "INVOKE", target = "Ljava/lang/Runnable;run()V") diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinOptionsScreen.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinOptionsScreen.java index 5df2f3cf8..61b805be5 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinOptionsScreen.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinOptionsScreen.java @@ -26,7 +26,7 @@ import com.seibel.distanthorizons.core.config.Config; import net.minecraft.client.gui.screens.OptionsScreen; import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.Component; -#if MC_1_16 || MC_1_17 || MC_1_18 +#if MC_VER < MC_1_19_2 import net.minecraft.network.chat.TranslatableComponent; #endif import net.minecraft.resources.ResourceLocation; @@ -57,7 +57,7 @@ public class MixinOptionsScreen extends Screen private void lodconfig$init(CallbackInfo ci) { if (Config.Client.optionsButton.get()) - this. #if MC_1_16 addButton #else addRenderableWidget #endif + this. #if MC_VER < MC_1_17_1 addButton #else addRenderableWidget #endif (new TexturedButtonWidget( // Where the button is on the screen this.width / 2 - 180, this.height / 6 - 12, @@ -71,7 +71,7 @@ public class MixinOptionsScreen extends Screen // For now it goes to the client option by default (buttonWidget) -> Objects.requireNonNull(minecraft).setScreen(GetConfigScreen.getScreen(this)), // Add a title to the utton - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 new TranslatableComponent(ModInfo.ID + ".title"))); #else Component.translatable(ModInfo.ID + ".title"))); diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinTextureUtil.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinTextureUtil.java index 91e27661c..597d5a609 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinTextureUtil.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinTextureUtil.java @@ -16,7 +16,7 @@ import org.spongepowered.asm.mixin.injection.Redirect; public class MixinTextureUtil { @Redirect(method = "Lcom/mojang/blaze3d/platform/TextureUtil;prepareImage(Lcom/mojang/blaze3d/platform/NativeImage$InternalGlFormat;IIII)V", - at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GlStateManager;_texParameter(IIF)V", #if MC_1_16_5 remap = true #else remap = false #endif)) + at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GlStateManager;_texParameter(IIF)V", #if MC_VER == MC_1_16_5 remap = true #else remap = false #endif)) private static void setLodBias(int target, int pname, float param) { float biasValue = Config.Client.Advanced.Graphics.AdvancedGraphics.lodBias.get().floatValue(); diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/events/MixinServerLevel.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/events/MixinServerLevel.java index 765b8deac..9d02eb99d 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/events/MixinServerLevel.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/events/MixinServerLevel.java @@ -31,7 +31,7 @@ import org.spongepowered.asm.mixin.Mixin; @Deprecated // TODO: Not sure if this is needed anymore public class MixinServerLevel { -// #if MC_1_16 +// #if MC_VER < MC_1_17_1 // @Inject(method = "save", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/level/ServerChunkCache;save(Z)V", shift = At.Shift.AFTER)) // private void saveWorldEvent(ProgressListener progressListener, boolean bl, boolean bl2, CallbackInfo ci) { // Main.client_proxy.worldSaveEvent(); diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/mods/sodium/MixinSodiumRenderer.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/mods/sodium/MixinSodiumRenderer.java index 6b4c4d2a4..cde893175 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/mods/sodium/MixinSodiumRenderer.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/mods/sodium/MixinSodiumRenderer.java @@ -2,7 +2,7 @@ package com.seibel.distanthorizons.fabric.mixins.mods.sodium; /* Removed since DH now uses Indium so we can use the Fabric rendering API instead -#if MC_1_20_2 || MC_1_20_4 +#if MC_VER > MC_1_20_1 // Sodium 0.5 import com.mojang.blaze3d.vertex.PoseStack; import com.seibel.distanthorizons.core.api.internal.ClientApi; @@ -55,7 +55,7 @@ public class MixinSodiumRenderer } -#elif MC_1_18 || MC_1_19 || MC_1_20 +#elif MC_VER > MC_1_17_1 // Sodium 0.3 to 0.4 import com.seibel.distanthorizons.core.api.internal.ClientApi; import com.seibel.distanthorizons.core.dependencyInjection.ModAccessorInjector; diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinChunkGenerator.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinChunkGenerator.java index fce9efd57..14be488cd 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinChunkGenerator.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinChunkGenerator.java @@ -22,7 +22,7 @@ package com.seibel.distanthorizons.fabric.mixins.server; import org.spongepowered.asm.mixin.Mixin; import net.minecraft.world.level.chunk.ChunkGenerator; -#if MC_1_16 || MC_1_17 +#if MC_VER < MC_1_18_2 import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinChunkMap.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinChunkMap.java index 1e9711597..8544ed05e 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinChunkMap.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinChunkMap.java @@ -37,7 +37,7 @@ public class MixinChunkMap // MC has a tendency to try saving incomplete or corrupted chunks (which show up as empty or black chunks) // this logic should prevent that from happening - #if MC_1_16_5 || MC_1_17 + #if MC_1_16_5 || MC_1_17_1 if (chunk.isUnsaved() || chunk.getUpgradeData() != null || !chunk.isLightCorrect()) { return; @@ -55,7 +55,7 @@ public class MixinChunkMap //==================// // some chunks may be missing their biomes, which cause issues when attempting to save them - #if MC_1_16_5 || MC_1_17 + #if MC_VER == MC_1_16_5 || MC_VER == MC_1_17_1 if (chunk.getBiomes() == null) { return; diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinUtilBackgroundThread.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinUtilBackgroundThread.java index fe6b7b4c8..ed33bc5b0 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinUtilBackgroundThread.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinUtilBackgroundThread.java @@ -50,7 +50,7 @@ public class MixinUtilBackgroundThread } } - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_17_1 @Inject(method = "wrapThreadWithTaskName(Ljava/lang/String;Ljava/lang/Runnable;)Ljava/lang/Runnable;", at = @At("HEAD"), cancellable = true) private static void overrideUtil$wrapThreadWithTaskName(String string, Runnable r, CallbackInfoReturnable ci) @@ -62,7 +62,7 @@ public class MixinUtilBackgroundThread } } #endif - #if MC_1_19 || MC_1_20 + #if MC_VER > MC_1_18_2 @Inject(method = "wrapThreadWithTaskName(Ljava/lang/String;Ljava/util/function/Supplier;)Ljava/util/function/Supplier;", at = @At("HEAD"), cancellable = true) private static void overrideUtil$wrapThreadWithTaskNameForSupplier(String string, Supplier r, CallbackInfoReturnable> ci) diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/unsafe/MixinThreadingDetector.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/unsafe/MixinThreadingDetector.java index 63f2e345e..7ea166ef7 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/unsafe/MixinThreadingDetector.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/unsafe/MixinThreadingDetector.java @@ -22,7 +22,7 @@ package com.seibel.distanthorizons.fabric.mixins.server.unsafe; import org.spongepowered.asm.mixin.Mixin; //FIXME: Is this still needed? -#if MC_1_19 || MC_1_20 +#if MC_VER > MC_1_18_2 import net.minecraft.util.ThreadingDetector; import org.spongepowered.asm.mixin.Mutable; 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 3d7ddf888..93934f15e 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,8 +1,8 @@ package com.seibel.distanthorizons.fabric.wrappers.modAccessor; import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IBCLibAccessor; -#if MC_1_16_5 || MC_1_17 || MC_1_20_4 // These versions either don't have BCLib, or the implementation is different -#elif MC_1_18 +#if MC_VER == MC_1_16_5 || MC_VER == MC_1_17_1 || MC_VER == MC_1_20_4 // These versions either don't have BCLib, or the implementation is different +#elif MC_VER == MC_1_18_2 import ru.bclib.config.ClientConfig; import ru.bclib.config.Configs; #else @@ -17,7 +17,7 @@ public class BCLibAccessor implements IBCLibAccessor public void setRenderCustomFog(boolean newValue) { - #if !(MC_1_16_5 || MC_1_17 || MC_1_20_4) // These versions either don't have BCLib, or the implementation is different + #if !(MC_VER == MC_1_16_5 || MC_VER == MC_1_17_1 || MC_VER == 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/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/IrisAccessor.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/IrisAccessor.java index d08de388b..53edafd5e 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/IrisAccessor.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/IrisAccessor.java @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.fabric.wrappers.modAccessor; -#if MC_1_16_5 || MC_1_18 || MC_1_19 || MC_1_20_1 +#if MC_VER != MC_1_17_1 && MC_VER <= MC_1_20_1 import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IIrisAccessor; import net.coderbot.iris.Iris; diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/SodiumAccessor.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/SodiumAccessor.java index cd340c2e5..86a6909d2 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/SodiumAccessor.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/SodiumAccessor.java @@ -33,7 +33,7 @@ import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.ISodiumAcce import com.seibel.distanthorizons.core.wrapperInterfaces.world.IClientLevelWrapper; import me.jellysquid.mods.sodium.client.render.SodiumWorldRenderer; import net.minecraft.client.Minecraft; -#if MC_1_16 +#if MC_VER < MC_1_17_1 import net.minecraft.nbt.CompoundTag; import net.minecraft.network.protocol.Packet; import net.minecraft.world.entity.Entity; @@ -60,21 +60,21 @@ public class SodiumAccessor implements ISodiumAccessor return "Sodium-Fabric"; } - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_17_1 @Override public HashSet getNormalRenderedChunks() { SodiumWorldRenderer renderer = SodiumWorldRenderer.instance(); LevelHeightAccessor height = Minecraft.getInstance().level; - #if MC_1_20_2 || MC_1_20_4 + #if MC_VER > MC_1_20_1 // TODO: This is just a tmp solution, use a proper solution later return MC_RENDER.getMaximumRenderedChunks().stream().filter((DhChunkPos chunk) -> { return (renderer.isBoxVisible( chunk.getMinBlockX() + 1, height.getMinBuildHeight() + 1, chunk.getMinBlockZ() + 1, chunk.getMinBlockX() + 15, height.getMaxBuildHeight() - 1, chunk.getMinBlockZ() + 15)); }).collect(Collectors.toCollection(HashSet::new)); - #elif MC_1_19 || MC_1_20 + #elif MC_VER > MC_1_18_2 // 0b11 = Lighted chunk & loaded chunk return renderer.getChunkTracker().getChunks(0b00).filter( (long l) -> { @@ -134,7 +134,7 @@ public class SodiumAccessor implements ISodiumAccessor @Override public void setFogOcclusion(boolean b) { - #if MC_1_20_2 || MC_1_20_4 + #if MC_VER > MC_1_20_1 me.jellysquid.mods.sodium.client.SodiumClientMod.options().performance.useFogOcclusion = b; #endif } diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeClientProxy.java b/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeClientProxy.java index 302475759..836cd6cf3 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeClientProxy.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeClientProxy.java @@ -36,7 +36,7 @@ import com.seibel.distanthorizons.coreapi.ModInfo; import net.minecraft.world.level.LevelAccessor; import net.minecraft.client.multiplayer.ClientLevel; -#if MC_1_16 || MC_1_17 || MC_1_18 +#if MC_VER < MC_1_19_2 import net.minecraftforge.event.world.ChunkEvent; import net.minecraftforge.event.world.WorldEvent; #else @@ -44,7 +44,7 @@ import net.minecraftforge.event.level.ChunkEvent; import net.minecraftforge.event.level.LevelEvent; #endif -#if MC_1_19 || MC_1_20 +#if MC_VER > MC_1_18_2 import net.minecraftforge.client.event.RenderLevelStageEvent; #endif import net.minecraftforge.event.entity.player.PlayerInteractEvent; @@ -79,7 +79,7 @@ public class ForgeClientProxy // private static SimpleChannel multiversePluginChannel; - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 private static LevelAccessor GetEventLevel(WorldEvent e) { return e.getWorld(); } #else private static LevelAccessor GetEventLevel(LevelEvent e) { return e.getLevel(); } @@ -107,7 +107,7 @@ public class ForgeClientProxy //==============// @SubscribeEvent - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 public void clientLevelLoadEvent(WorldEvent.Load event) #else public void clientLevelLoadEvent(LevelEvent.Load event) @@ -115,7 +115,7 @@ public class ForgeClientProxy { LOGGER.info("level load"); - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 LevelAccessor level = event.getWorld(); #else LevelAccessor level = event.getLevel(); @@ -131,7 +131,7 @@ public class ForgeClientProxy ClientApi.INSTANCE.clientLevelLoadEvent(clientLevelWrapper); } @SubscribeEvent - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 public void clientLevelUnloadEvent(WorldEvent.Unload event) #else public void clientLevelUnloadEvent(LevelEvent.Load event) @@ -139,7 +139,7 @@ public class ForgeClientProxy { LOGGER.info("level unload"); - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 LevelAccessor level = event.getWorld(); #else LevelAccessor level = event.getLevel(); @@ -165,7 +165,7 @@ public class ForgeClientProxy { LOGGER.trace("interact or block place event at blockPos: " + event.getPos()); - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 LevelAccessor level = event.getWorld(); #else LevelAccessor level = event.getLevel(); @@ -179,7 +179,7 @@ public class ForgeClientProxy { LOGGER.trace("break or block attack at blockPos: " + event.getPos()); - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 LevelAccessor level = event.getWorld(); #else LevelAccessor level = event.getLevel(); @@ -217,7 +217,7 @@ public class ForgeClientProxy //==============// @SubscribeEvent - public void registerKeyBindings(#if MC_1_16 || MC_1_17 || MC_1_18 InputEvent.KeyInputEvent #else InputEvent.Key #endif event) + public void registerKeyBindings(#if MC_VER < MC_1_19_2 InputEvent.KeyInputEvent #else InputEvent.Key #endif event) { if (Minecraft.getInstance().player == null) { @@ -298,15 +298,15 @@ public class ForgeClientProxy //===========// @SubscribeEvent - #if MC_1_19 || MC_1_20 + #if MC_VER > MC_1_18_2 public void afterLevelRenderEvent(RenderLevelStageEvent event) #else public void afterLevelRenderEvent(TickEvent.RenderTickEvent event) #endif { - #if MC_1_20_2 || MC_1_20_4 + #if MC_VER > MC_1_20_1 if (event.getStage() == RenderLevelStageEvent.Stage.AFTER_LEVEL) - #elif MC_1_19 || MC_1_20 + #elif MC_VER > MC_1_18_2 if (event.getStage() == RenderLevelStageEvent.Stage.AFTER_SOLID_BLOCKS) #else // FIXME: Is this the correct location for 1.16 & 1.17??? diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeMain.java b/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeMain.java index dbf61fcd0..d88441f92 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeMain.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeMain.java @@ -39,7 +39,7 @@ import com.seibel.distanthorizons.forge.wrappers.modAccessor.OptifineAccessor; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.core.Direction; -#if MC_1_19 || MC_1_20 +#if MC_VER > MC_1_19_2 import net.minecraft.util.RandomSource; #endif import net.minecraft.world.level.ColorResolver; @@ -51,11 +51,11 @@ import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.*; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; -#if MC_1_16 +#if MC_VER < MC_1_17_1 import net.minecraftforge.fml.ExtensionPoint; -#elif MC_1_17 +#elif MC_VER == MC_1_17_1 import net.minecraftforge.fmlclient.ConfigGuiHandler; -#elif MC_1_18 +#elif MC_VER > MC_1_18_2 && MC_VER < MC_1_19_2 import net.minecraftforge.client.ConfigGuiHandler; #else import net.minecraftforge.client.ConfigScreenHandler; @@ -64,7 +64,7 @@ import net.minecraftforge.client.ConfigScreenHandler; import org.apache.logging.log4j.Logger; // these imports change due to forge refactoring classes in 1.19 -#if MC_1_16 || MC_1_17 || MC_1_18 +#if MC_VER < MC_1_19_2 import net.minecraftforge.client.model.data.ModelDataMap; import java.util.Random; @@ -128,10 +128,10 @@ public class ForgeMain implements LodForgeMethodCaller ModAccessorInjector.INSTANCE.bind(IOptifineAccessor.class, new OptifineAccessor()); } - #if MC_1_16 + #if MC_VER < MC_1_17_1 ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.CONFIGGUIFACTORY, () -> (client, parent) -> GetConfigScreen.getScreen(parent)); - #elif MC_1_16 || MC_1_17 || MC_1_18 + #elif MC_VER >= MC_1_17_1 && MC_VER <= MC_1_19_2 ModLoadingContext.get().registerExtensionPoint(ConfigGuiHandler.ConfigGuiFactory.class, () -> new ConfigGuiHandler.ConfigGuiFactory((client, parent) -> GetConfigScreen.getScreen(parent))); #else @@ -169,14 +169,14 @@ public class ForgeMain implements LodForgeMethodCaller LOGGER.info("Mod Post-Initialized"); } - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 private final ModelDataMap modelData = new ModelDataMap.Builder().build(); #else private final ModelData modelData = ModelData.EMPTY; #endif @Override - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 public List getQuads(MinecraftClientWrapper mc, Block block, BlockState blockState, Direction direction, Random random) { return mc.getModelManager().getBlockModelShaper().getBlockModel(block.defaultBlockState()).getQuads(blockState, direction, random, modelData); @@ -184,14 +184,14 @@ public class ForgeMain implements LodForgeMethodCaller #else public List getQuads(MinecraftClientWrapper mc, Block block, BlockState blockState, Direction direction, RandomSource random) { - return mc.getModelManager().getBlockModelShaper().getBlockModel(block.defaultBlockState()).getQuads(blockState, direction, random, modelData #if MC_1_19 || MC_1_20 , RenderType.solid() #endif ); + return mc.getModelManager().getBlockModelShaper().getBlockModel(block.defaultBlockState()).getQuads(blockState, direction, random, modelData #if MC_VER > MC_1_19_2 , RenderType.solid() #endif ); } #endif @Override //TODO: Check this if its still needed public int colorResolverGetColor(ColorResolver resolver, Biome biome, double x, double z) { - #if MC_1_17______Still_needed + #if MC_1_17_1______Still_needed return resolver.m_130045_(biome, x, z); #else return resolver.getColor(biome, x, z); diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeServerProxy.java b/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeServerProxy.java index b646ecb12..7b5c9b29c 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeServerProxy.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeServerProxy.java @@ -14,7 +14,7 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelAccessor; import net.minecraftforge.event.TickEvent; -#if MC_1_16 || MC_1_17 || MC_1_18 +#if MC_VER < MC_1_19_2 import net.minecraftforge.event.world.ChunkEvent; import net.minecraftforge.event.world.WorldEvent; #else @@ -23,10 +23,10 @@ import net.minecraftforge.event.level.LevelEvent; #endif import net.minecraftforge.eventbus.api.SubscribeEvent; -#if MC_1_16_5 +#if MC_VER == MC_1_16_5 import net.minecraftforge.fml.event.server.FMLServerAboutToStartEvent; import net.minecraftforge.fml.event.server.FMLServerStoppingEvent; -#elif MC_1_17 +#elif MC_VER == MC_1_17_1 import net.minecraftforge.fmlserverevents.FMLServerAboutToStartEvent; import net.minecraftforge.fmlserverevents.FMLServerStoppingEvent; #else @@ -41,7 +41,7 @@ import java.util.function.Supplier; public class ForgeServerProxy { - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 private static LevelAccessor GetEventLevel(WorldEvent e) { return e.getWorld(); } #else private static LevelAccessor GetEventLevel(LevelEvent e) { return e.getLevel(); } @@ -81,21 +81,21 @@ public class ForgeServerProxy // ServerWorldLoadEvent @SubscribeEvent - public void dedicatedWorldLoadEvent(#if MC_1_16_5 || MC_1_17 FMLServerAboutToStartEvent #else ServerAboutToStartEvent #endif event) + public void dedicatedWorldLoadEvent(#if MC_VER == MC_1_16_5 || MC_VER == MC_1_17_1 FMLServerAboutToStartEvent #else ServerAboutToStartEvent #endif event) { this.serverApi.serverLoadEvent(this.isDedicated); } // ServerWorldUnloadEvent @SubscribeEvent - public void serverWorldUnloadEvent(#if MC_1_16_5 || MC_1_17 FMLServerStoppingEvent #else ServerStoppingEvent #endif event) + public void serverWorldUnloadEvent(#if MC_VER == MC_1_16_5 || MC_VER == MC_1_17_1 FMLServerStoppingEvent #else ServerStoppingEvent #endif event) { this.serverApi.serverUnloadEvent(); } // ServerLevelLoadEvent @SubscribeEvent - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 public void serverLevelLoadEvent(WorldEvent.Load event) #else public void serverLevelLoadEvent(LevelEvent.Load event) @@ -109,7 +109,7 @@ public class ForgeServerProxy // ServerLevelUnloadEvent @SubscribeEvent - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 public void serverLevelUnloadEvent(WorldEvent.Unload event) #else public void serverLevelUnloadEvent(LevelEvent.Unload event) diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinClientPacketListener.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinClientPacketListener.java index 21ef500a5..2726de266 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinClientPacketListener.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinClientPacketListener.java @@ -16,7 +16,7 @@ public class MixinClientPacketListener @Inject(method = "handleLogin", at = @At("RETURN")) void onHandleLoginEnd(CallbackInfo ci) { ClientApi.INSTANCE.onClientOnlyConnected(); } - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #if MC_VER < MC_1_19_4 @Inject(method = "cleanup", at = @At("HEAD")) #else @Inject(method = "close", at = @At("HEAD")) diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinFogRenderer.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinFogRenderer.java index a9e59c9ca..db0ed1a9f 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinFogRenderer.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinFogRenderer.java @@ -35,7 +35,7 @@ import net.minecraft.client.renderer.FogRenderer.FogMode; import net.minecraft.world.effect.MobEffects; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; -#if MC_1_16 +#if MC_VER < MC_1_17_1 import net.minecraft.world.level.material.FluidState; #else import net.minecraft.world.level.material.FogType; @@ -53,10 +53,10 @@ public class MixinFogRenderer @Inject(at = @At("RETURN"), method = "setupFog(Lnet/minecraft/client/Camera;Lnet/minecraft/client/renderer/FogRenderer$FogMode;FZF)V", - remap = #if MC_1_17 || MC_1_18 false #else true #endif ) // Remap messiness due to this being weird in forge + remap = #if MC_VER == MC_1_17_1 || MC_VER == MC_1_18_2 false #else true #endif ) // Remap messiness due to this being weird in forge private static void disableSetupFog(Camera camera, FogMode fogMode, float f, boolean bl, float partTick, CallbackInfo callback) { - #if MC_1_16 + #if MC_VER < MC_1_17_1 FluidState fluidState = camera.getFluidInCamera(); boolean cameraNotInFluid = fluidState.isEmpty(); #else @@ -71,7 +71,7 @@ public class MixinFogRenderer && !SingletonInjector.INSTANCE.get(IMinecraftRenderWrapper.class).isFogStateSpecial() && Config.Client.Advanced.Graphics.Fog.disableVanillaFog.get()) { - #if MC_1_16 + #if MC_VER < MC_1_17_1 RenderSystem.fogStart(A_REALLY_REALLY_BIG_VALUE); RenderSystem.fogEnd(A_EVEN_LARGER_VALUE); #else diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinGameRenderer.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinGameRenderer.java index 64899ab54..9834b90bf 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinGameRenderer.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinGameRenderer.java @@ -16,7 +16,7 @@ public class MixinGameRenderer { private static final Logger LOGGER = LogManager.getLogger(MixinGameRenderer.class.getSimpleName()); - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_17_1 // FIXME: This I think will dup multiple renderStartupEvent calls... @Inject(method = {"reloadShaders", "preloadUiShader"}, at = @At("TAIL")) public void onStartupShaders(CallbackInfo ci) 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 7e1e13eb2..f6223c099 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 @@ -20,7 +20,7 @@ package com.seibel.distanthorizons.forge.mixins.client; import com.mojang.blaze3d.vertex.PoseStack; -#if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 +#if MC_VER < MC_1_19_4 import com.mojang.math.Matrix4f; #else import net.minecraft.client.Camera; @@ -52,7 +52,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import java.nio.FloatBuffer; -#if MC_1_16 +#if MC_VER < MC_1_17_1 import org.lwjgl.opengl.GL15; #endif @@ -84,7 +84,7 @@ public class MixinLevelRenderer throw new NullPointerException("Null cannot be cast to non-null type."); } - #if MC_1_16 + #if MC_VER < MC_1_17_1 @Inject(at = @At("RETURN"), method = "renderSky(Lcom/mojang/blaze3d/vertex/PoseStack;F)V") private void renderSky(PoseStack matrixStackIn, float partialTicks, CallbackInfo callback) #else @@ -99,17 +99,17 @@ public class MixinLevelRenderer // TODO: Can we move this to forge's client proxy similarly to how fabric does it - #if MC_1_16 + #if MC_VER < MC_1_17_1 @Inject(at = @At("HEAD"), method = "renderChunkLayer(Lnet/minecraft/client/renderer/RenderType;Lcom/mojang/blaze3d/vertex/PoseStack;DDD)V", cancellable = true) private void renderChunkLayer(RenderType renderType, PoseStack matrixStackIn, double xIn, double yIn, double zIn, CallbackInfo callback) - #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #elif MC_VER < MC_1_19_4 @Inject(at = @At("HEAD"), method = "renderChunkLayer(Lnet/minecraft/client/renderer/RenderType;Lcom/mojang/blaze3d/vertex/PoseStack;DDDLcom/mojang/math/Matrix4f;)V", cancellable = true) private void renderChunkLayer(RenderType renderType, PoseStack modelViewMatrixStack, double cameraXBlockPos, double cameraYBlockPos, double cameraZBlockPos, Matrix4f projectionMatrix, CallbackInfo callback) - #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 + #elif MC_VER < MC_1_20_2 @Inject(at = @At("HEAD"), method = "renderChunkLayer(Lnet/minecraft/client/renderer/RenderType;Lcom/mojang/blaze3d/vertex/PoseStack;DDDLorg/joml/Matrix4f;)V", cancellable = true) @@ -122,7 +122,7 @@ public class MixinLevelRenderer #endif { // get MC's model view and projection matrices - #if MC_1_16_5 + #if MC_VER == MC_1_16_5 // get the matrices from the OpenGL fixed pipeline float[] mcProjMatrixRaw = new float[16]; GL15.glGetFloatv(GL15.GL_PROJECTION_MATRIX, mcProjMatrixRaw); @@ -149,9 +149,9 @@ public class MixinLevelRenderer { float[] matrixFloatArray = SeamlessOverdraw.overwriteMinecraftNearFarClipPlanes(mcProjectionMatrix, previousPartialTicks); - #if MC_1_16_5 + #if MC_VER == MC_1_16_5 SeamlessOverdraw.applyLegacyProjectionMatrix(matrixFloatArray); - #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #elif MC_VER < MC_1_19_4 projectionMatrix.load(FloatBuffer.wrap(matrixFloatArray)); #else projectionMatrix.set(matrixFloatArray); @@ -165,10 +165,10 @@ public class MixinLevelRenderer } } - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19_2 + #if MC_VER < MC_1_19_4 @Inject(at = @At(value = "TAIL", target = "Lnet/minecraft/world/level/lighting/LevelLightEngine;runUpdates(IZZ)I"), method = "renderLevel") public void callAfterRunUpdates(PoseStack poseStack, float partialTick, long finishNanoTime, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightTexture lightTexture, Matrix4f projectionMatrix, CallbackInfo ci) - #elif MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 + #elif MC_VER < MC_1_20_1 @Inject(at = @At(value = "TAIL", target = "Lnet/minecraft/world/level/lighting/LevelLightEngine;runUpdates(IZZ)I"), method = "renderLevel") public void callAfterRunUpdates(PoseStack poseStack, float partialTick, long finishNanoTime, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightTexture lightTexture, Matrix4f projectionMatrix, CallbackInfo ci) #else diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinMinecraft.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinMinecraft.java index 5a1141d7f..155c30259 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinMinecraft.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinMinecraft.java @@ -25,8 +25,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(Minecraft.class) public class MixinMinecraft { - #if MC_1_16 || MC_1_17 || MC_1_18 || MC_1_19 || MC_1_20_1 - #if MC_1_20_1 + #if MC_VER < MC_1_20_2 + #if MC_VER == MC_1_20_1 @Redirect( method = "Lnet/minecraft/client/Minecraft;setInitialScreen(Lcom/mojang/realmsclient/client/RealmsClient;Lnet/minecraft/server/packs/resources/ReloadInstance;Lnet/minecraft/client/main/GameConfig$QuickPlayData;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/Minecraft;setScreen(Lnet/minecraft/client/gui/screens/Screen;)V") @@ -61,7 +61,7 @@ public class MixinMinecraft } #endif - #if MC_1_20_4 + #if MC_VER > MC_1_20_2 @Redirect( method = "Lnet/minecraft/client/Minecraft;onGameLoadFinished(Lnet/minecraft/client/Minecraft$GameLoadCookie;)V", at = @At(value = "INVOKE", target = "Ljava/lang/Runnable;run()V") diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinOptionsScreen.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinOptionsScreen.java index a95f9a79e..e3af8c9e8 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinOptionsScreen.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinOptionsScreen.java @@ -26,7 +26,7 @@ import com.seibel.distanthorizons.core.config.Config; import net.minecraft.client.gui.screens.OptionsScreen; import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.Component; -#if MC_1_16 || MC_1_17 || MC_1_18 +#if MC_VER < MC_1_19_2 import net.minecraft.network.chat.TranslatableComponent; #endif import net.minecraft.resources.ResourceLocation; @@ -57,7 +57,7 @@ public class MixinOptionsScreen extends Screen private void lodconfig$init(CallbackInfo ci) { if (Config.Client.optionsButton.get()) - this. #if MC_1_16 addButton #else addRenderableWidget #endif + this. #if MC_VER < MC_1_17_1 addButton #else addRenderableWidget #endif (new TexturedButtonWidget( // Where the button is on the screen this.width / 2 - 180, this.height / 6 - 12, @@ -71,7 +71,7 @@ public class MixinOptionsScreen extends Screen // For now it goes to the client option by default (buttonWidget) -> Objects.requireNonNull(minecraft).setScreen(GetConfigScreen.getScreen(this)), // Add a title to the button - #if MC_1_16 || MC_1_17 || MC_1_18 + #if MC_VER < MC_1_19_2 new TranslatableComponent(ModInfo.ID + ".title"))); #else Component.translatable(ModInfo.ID + ".title"))); diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinChunkGenerator.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinChunkGenerator.java index 134886824..3541cf2fb 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinChunkGenerator.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinChunkGenerator.java @@ -22,7 +22,7 @@ package com.seibel.distanthorizons.forge.mixins.server; import org.spongepowered.asm.mixin.Mixin; import net.minecraft.world.level.chunk.ChunkGenerator; -#if MC_1_16 || MC_1_17 +#if MC_VER < MC_1_18_2 import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinTFChunkGenerator.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinTFChunkGenerator.java index 31d787a62..ab203d244 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinTFChunkGenerator.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinTFChunkGenerator.java @@ -3,13 +3,13 @@ package com.seibel.distanthorizons.forge.mixins.server; import net.minecraft.world.level.chunk.ChunkGenerator; import org.spongepowered.asm.mixin.Mixin; -#if MC_1_16_5 +#if MC_VER == MC_1_16_5 @Mixin(ChunkGenerator.class) class MixinTFChunkGenerator { // not currently implemented, attempting to run with the mod enabled in the IDE causes the game to lock up } -#elif MC_1_16 +#elif MC_VER < MC_1_17_1 import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinUtilBackgroundThread.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinUtilBackgroundThread.java index ad96fc080..900d1115c 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinUtilBackgroundThread.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinUtilBackgroundThread.java @@ -50,7 +50,7 @@ public class MixinUtilBackgroundThread } } - #if MC_1_18 || MC_1_19 || MC_1_20 + #if MC_VER > MC_1_17_1 @Inject(method = "wrapThreadWithTaskName(Ljava/lang/String;Ljava/lang/Runnable;)Ljava/lang/Runnable;", at = @At("HEAD"), cancellable = true) private static void overrideUtil$wrapThreadWithTaskName(String string, Runnable r, CallbackInfoReturnable ci) @@ -62,7 +62,7 @@ public class MixinUtilBackgroundThread } } #endif - #if MC_1_19 || MC_1_20 + #if MC_VER > MC_1_18_2 @Inject(method = "wrapThreadWithTaskName(Ljava/lang/String;Ljava/util/function/Supplier;)Ljava/util/function/Supplier;", at = @At("HEAD"), cancellable = true) private static void overrideUtil$wrapThreadWithTaskNameForSupplier(String string, Supplier r, CallbackInfoReturnable> ci) diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/unsafe/MixinThreadingDetector.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/unsafe/MixinThreadingDetector.java index e3d1c545d..3ce324a04 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/unsafe/MixinThreadingDetector.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/unsafe/MixinThreadingDetector.java @@ -20,7 +20,7 @@ package com.seibel.distanthorizons.forge.mixins.server.unsafe; import org.spongepowered.asm.mixin.Mixin; -#if MC_1_19 || MC_1_20 +#if MC_VER > MC_1_18_2 import net.minecraft.util.ThreadingDetector; import org.spongepowered.asm.mixin.Mutable; diff --git a/gradle.properties b/gradle.properties index b57fed3ee..fbd09c11b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -47,4 +47,4 @@ versionStr= mcVer=1.20.2 # Defines the maximum amount of memory Minecraft is allowed when run in a developement environment -minecraftMemoryJavaArg="-Xmx4G" +#minecraftMemoryJavaArg="-Xmx4G" From 0d7b0f9fe429e0f1c0e3d3563202c4265cde1dca Mon Sep 17 00:00:00 2001 From: coolGi Date: Tue, 12 Dec 2023 19:28:41 +1030 Subject: [PATCH 16/21] Updated to new git url --- .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 8145a1792..92244ca27 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 24520824e950ad745a92257c0b31811215b70e38 Mon Sep 17 00:00:00 2001 From: coolGi Date: Tue, 12 Dec 2023 19:28:45 +1030 Subject: [PATCH 17/21] Updated to new git url --- coreSubProjects | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreSubProjects b/coreSubProjects index 706a423c5..19d20f559 160000 --- a/coreSubProjects +++ b/coreSubProjects @@ -1 +1 @@ -Subproject commit 706a423c5f13ff82b970db4f41226facda466152 +Subproject commit 19d20f5591fbb7a72fa623fcd1831f9e6d28e713 From cf8b0329bbf8ed6aa7cce6ff5e679eae9d3c3b3f Mon Sep 17 00:00:00 2001 From: coolGi Date: Tue, 12 Dec 2023 22:17:21 +1030 Subject: [PATCH 18/21] Hopefully fixed compolation with the new preprocessor --- .../common/forge/LodForgeMethodCaller.java | 2 +- .../block/TintGetterOverrideFast.java | 4 ++-- .../block/TintGetterOverrideSmooth.java | 4 ++-- .../block/TintWithoutLevelOverrider.java | 8 +++---- .../TintWithoutLevelSmoothOverrider.java | 8 +++---- .../block/cache/ClientBlockStateCache.java | 2 +- .../common/wrappers/chunk/ChunkWrapper.java | 6 ++--- .../common/wrappers/gui/ClassicConfigGUI.java | 4 ++-- .../common/wrappers/gui/MinecraftScreen.java | 2 +- .../wrappers/gui/TexturedButtonWidget.java | 2 +- .../wrappers/gui/updater/ChangelogScreen.java | 4 ++-- .../wrappers/gui/updater/UpdateModScreen.java | 2 +- .../BatchGenerationEnvironment.java | 14 ++++++------ .../worldGeneration/GlobalParameters.java | 10 ++++----- .../worldGeneration/ThreadedParameters.java | 8 +++---- .../mimicObject/ChunkLoader.java | 22 +++++++++---------- .../mimicObject/DhLitWorldGenRegion.java | 14 ++++++------ .../mimicObject/DummyLightEngine.java | 2 +- .../mimicObject/LightGetterAdaptor.java | 6 ++--- .../WorldGenStructFeatManager.java | 12 +++++----- .../worldGeneration/step/StepBiomes.java | 2 +- .../worldGeneration/step/StepFeatures.java | 2 +- .../worldGeneration/step/StepNoise.java | 4 ++-- .../step/StepStructureStart.java | 2 +- .../distanthorizons/fabric/FabricMain.java | 2 +- .../mixins/client/MixinClientLevel.java | 8 +++---- .../client/MixinClientPacketListener.java | 4 ++-- .../mixins/client/MixinGameRenderer.java | 2 +- .../fabric/mixins/client/MixinMinecraft.java | 2 +- .../mods/sodium/MixinSodiumRenderer.java | 4 ++-- .../server/MixinUtilBackgroundThread.java | 4 ++-- .../server/unsafe/MixinThreadingDetector.java | 2 +- .../wrappers/modAccessor/SodiumAccessor.java | 8 +++---- .../forge/ForgeClientProxy.java | 8 +++---- .../distanthorizons/forge/ForgeMain.java | 8 +++---- .../mixins/client/MixinGameRenderer.java | 2 +- .../forge/mixins/client/MixinMinecraft.java | 2 +- .../server/MixinUtilBackgroundThread.java | 4 ++-- .../server/unsafe/MixinThreadingDetector.java | 2 +- 39 files changed, 104 insertions(+), 104 deletions(-) diff --git a/common/src/main/java/com/seibel/distanthorizons/common/forge/LodForgeMethodCaller.java b/common/src/main/java/com/seibel/distanthorizons/common/forge/LodForgeMethodCaller.java index b8b2add63..afa8fa468 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/forge/LodForgeMethodCaller.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/forge/LodForgeMethodCaller.java @@ -22,7 +22,7 @@ package com.seibel.distanthorizons.common.forge; import com.seibel.distanthorizons.common.wrappers.minecraft.MinecraftClientWrapper; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.core.Direction; -#if MC_VER > MC_1_19_2 +#if MC_VER >= MC_1_19_2 import net.minecraft.util.RandomSource; #endif import net.minecraft.world.level.ColorResolver; diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideFast.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideFast.java index 04c8c1d98..da3e8d4cf 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideFast.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideFast.java @@ -50,7 +50,7 @@ public class TintGetterOverrideFast implements BlockAndTintGetter private Biome _getBiome(BlockPos pos) { - #if MC_VER > MC_1_18_2 + #if MC_VER >= MC_1_18_2 return parent.getBiome(pos).value(); #else return parent.getBiome(pos); @@ -167,7 +167,7 @@ public class TintGetterOverrideFast implements BlockAndTintGetter return parent.getMaxBuildHeight(); } - #if MC_VER > MC_1_17_1 + #if MC_VER >= MC_1_17_1 @Override public Optional getBlockEntity(BlockPos blockPos, BlockEntityType blockEntityType) { diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideSmooth.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideSmooth.java index c67d8c3e4..240c4e848 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideSmooth.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintGetterOverrideSmooth.java @@ -53,7 +53,7 @@ public class TintGetterOverrideSmooth implements BlockAndTintGetter private Biome _getBiome(BlockPos pos) { - #if MC_VER > MC_1_18_2 + #if MC_VER >= MC_1_18_2 return parent.getBiome(pos).value(); #else return parent.getBiome(pos); @@ -193,7 +193,7 @@ public class TintGetterOverrideSmooth implements BlockAndTintGetter return parent.getMaxBuildHeight(); } - #if MC_VER > MC_1_17_1 + #if MC_VER >= MC_1_17_1 @Override public Optional getBlockEntity(BlockPos blockPos, BlockEntityType blockEntityType) { diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelOverrider.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelOverrider.java index ab8876e74..6f425019e 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelOverrider.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelOverrider.java @@ -29,7 +29,7 @@ import net.minecraft.world.level.lighting.LevelLightEngine; import net.minecraft.world.level.material.FluidState; import org.jetbrains.annotations.Nullable; -#if MC_VER > MC_1_18_2 +#if MC_VER >= MC_1_18_2 import net.minecraft.core.Holder; #endif @@ -46,9 +46,9 @@ public class TintWithoutLevelOverrider implements BlockAndTintGetter { return colorResolver.getColor(_unwrap(biome.biome), blockPos.getX(), blockPos.getZ()); } - private Biome _unwrap(#if MC_VER > MC_1_18_2 Holder #else Biome #endif biome) + private Biome _unwrap(#if MC_VER >= MC_1_18_2 Holder #else Biome #endif biome) { - #if MC_VER > MC_1_18_2 + #if MC_VER >= MC_1_18_2 return biome.value(); #else return biome; @@ -84,7 +84,7 @@ public class TintWithoutLevelOverrider implements BlockAndTintGetter } - #if MC_VER == MC_1_17_1 || MC_VER > MC_1_18_2 + #if MC_VER >= MC_1_17_1 @Override public int getHeight() { diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelSmoothOverrider.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelSmoothOverrider.java index 0c293eb7f..04a9b41b1 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelSmoothOverrider.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/TintWithoutLevelSmoothOverrider.java @@ -30,7 +30,7 @@ import net.minecraft.world.level.lighting.LevelLightEngine; import net.minecraft.world.level.material.FluidState; import org.jetbrains.annotations.Nullable; -#if MC_VER > MC_1_18_2 +#if MC_VER >= MC_1_18_2 import net.minecraft.core.Holder; #endif @@ -49,9 +49,9 @@ public class TintWithoutLevelSmoothOverrider implements BlockAndTintGetter { return colorResolver.getColor(_unwrap(biome.biome), blockPos.getX(), blockPos.getZ()); } - private Biome _unwrap(#if MC_VER > MC_1_18_2 Holder #else Biome #endif biome) + private Biome _unwrap(#if MC_VER >= MC_1_18_2 Holder #else Biome #endif biome) { - #if MC_VER > MC_1_18_2 + #if MC_VER >= MC_1_18_2 return biome.value(); #else return biome; @@ -116,7 +116,7 @@ public class TintWithoutLevelSmoothOverrider implements BlockAndTintGetter } - #if MC_VER >= MC_1_17_1 && MC_VER != MC_1_18_2 + #if MC_VER >= MC_1_17_1 @Override public int getHeight() { diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockStateCache.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockStateCache.java index 629a705f3..45612b100 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockStateCache.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/cache/ClientBlockStateCache.java @@ -38,7 +38,7 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.FlowerBlock; import net.minecraft.world.level.block.LeavesBlock; import net.minecraft.world.level.block.RotatedPillarBlock; -#if MC_VER > MC_1_19_2 +#if MC_VER >= MC_1_19_2 import net.minecraft.util.RandomSource; #else import java.util.Random; diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java index b92d0e8ce..36cb5c311 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java @@ -47,7 +47,7 @@ import org.apache.logging.log4j.Logger; import java.util.*; import java.util.concurrent.ConcurrentLinkedQueue; -#if MC_VER > MC_1_17_1 +#if MC_VER >= MC_1_17_1 import net.minecraft.core.QuartPos; #endif @@ -67,7 +67,7 @@ import net.minecraft.world.level.chunk.LevelChunkSection; import net.minecraft.world.level.chunk.LevelChunkSection; #endif -#if MC_VER > MC_1_20_1 +#if MC_VER >= MC_1_20_1 import net.minecraft.world.level.chunk.LevelChunkSection; import net.minecraft.world.level.lighting.LevelLightEngine; import net.minecraft.core.SectionPos; @@ -490,7 +490,7 @@ public class ChunkWrapper implements IChunkWrapper #endif } } - #if MC_VER > MC_1_20_1 + #if MC_VER >= MC_1_20_1 private static boolean checkLightSectionsOnChunk(LevelChunk chunk, LevelLightEngine engine) { LevelChunkSection[] sections = chunk.getSections(); 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 a7a87c7cb..7577120fb 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 @@ -49,7 +49,7 @@ import net.minecraft.client.gui.components.events.GuiEventListener; import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.Component; import net.minecraft.client.resources.language.I18n; // translation -#if MC_VER > MC_1_17_1 +#if MC_VER >= MC_1_17_1 import net.minecraft.client.gui.narration.NarratableEntry; #endif import net.minecraft.resources.ResourceLocation; @@ -642,7 +642,7 @@ public class ClassicConfigGUI // Only for 1.17 and over // Remove in 1.16 and below - #if MC_VER > MC_1_17_1 + #if MC_VER >= MC_1_17_1 @Override public List narratables() { 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 6dcc5a746..1b3c1298c 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 @@ -4,7 +4,7 @@ import com.mojang.blaze3d.platform.Window; import com.mojang.blaze3d.vertex.PoseStack; import com.seibel.distanthorizons.core.config.gui.AbstractScreen; import net.minecraft.client.Minecraft; -#if MC_VER > MC_1_20_1 +#if MC_VER >= MC_1_20_1 import net.minecraft.client.gui.GuiGraphics; #endif import net.minecraft.client.gui.components.ContainerObjectSelectionList; diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/TexturedButtonWidget.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/TexturedButtonWidget.java index c589fcf4c..c69a9ad49 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/TexturedButtonWidget.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/TexturedButtonWidget.java @@ -34,7 +34,7 @@ import net.minecraft.client.gui.components.ImageButton; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; -#if MC_VER > MC_1_17_1 +#if MC_VER >= MC_1_17_1 import net.minecraft.client.renderer.GameRenderer; #endif #if MC_VER < MC_1_20_1 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 e66d7c3f8..1328a5ba9 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 @@ -15,7 +15,7 @@ import net.minecraft.client.gui.components.events.GuiEventListener; import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.Component; -#if MC_VER > MC_1_17_1 +#if MC_VER >= MC_1_17_1 import net.minecraft.client.gui.narration.NarratableEntry; #endif @@ -244,7 +244,7 @@ public class ChangelogScreen extends DhScreen { return children; } - #if MC_VER > MC_1_17_1 + #if MC_VER >= MC_1_17_1 @Override public List narratables() { 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 6207d06ff..074e96b21 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 @@ -11,7 +11,7 @@ import com.seibel.distanthorizons.core.jar.JarUtils; import com.seibel.distanthorizons.core.jar.installer.ModrinthGetter; import com.seibel.distanthorizons.core.jar.updater.SelfUpdater; import net.minecraft.client.Minecraft; -#if MC_VER > MC_1_20_1 +#if MC_VER >= MC_1_20_1 import net.minecraft.client.gui.GuiGraphics; #else import com.mojang.blaze3d.vertex.PoseStack; diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/BatchGenerationEnvironment.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/BatchGenerationEnvironment.java index 65e9c37b9..0ba131419 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/BatchGenerationEnvironment.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/BatchGenerationEnvironment.java @@ -56,7 +56,7 @@ import com.seibel.distanthorizons.common.wrappers.worldGeneration.step.StepStruc import com.seibel.distanthorizons.common.wrappers.worldGeneration.step.StepStructureStart; import com.seibel.distanthorizons.common.wrappers.worldGeneration.step.StepSurface; -#if MC_VER > MC_1_19_4 +#if MC_VER >= MC_1_19_4 import net.minecraft.core.registries.Registries; #else import net.minecraft.core.Registry; @@ -365,8 +365,8 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv private static ProtoChunk EmptyChunk(ServerLevel level, ChunkPos chunkPos) { return new ProtoChunk(chunkPos, UpgradeData.EMPTY - #if MC_VER > MC_1_17_1 , level #endif - #if MC_VER > MC_1_18_2 , level.registryAccess().registryOrThrow( + #if MC_VER >= MC_1_17_1 , level #endif + #if MC_VER >= MC_1_18_2 , level.registryAccess().registryOrThrow( #if MC_VER < MC_1_19_4 Registry.BIOME_REGISTRY #else @@ -463,8 +463,8 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv if (target == null) { target = new ProtoChunk(chunkPos, UpgradeData.EMPTY - #if MC_VER > MC_1_17_1 , params.level #endif - #if MC_VER > MC_1_18_2 , params.biomes, null #endif + #if MC_VER >= MC_1_17_1 , params.level #endif + #if MC_VER >= MC_1_18_2 , params.biomes, null #endif ); } return target; @@ -520,7 +520,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv } boolean isFull = target.getStatus() == ChunkStatus.FULL || target instanceof LevelChunk; - #if MC_VER > MC_1_18_2 + #if MC_VER >= MC_1_18_2 boolean isPartial = target.isOldNoiseGeneration(); #endif if (isFull) @@ -528,7 +528,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv LOAD_LOGGER.info("Detected full existing chunk at {}", target.getPos()); genEvent.resultConsumer.accept(wrappedChunk); } - #if MC_VER > MC_1_18_2 + #if MC_VER >= MC_1_18_2 else if (isPartial) { LOAD_LOGGER.info("Detected old existing chunk at {}", target.getPos()); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/GlobalParameters.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/GlobalParameters.java index 51da9ca78..ac7e1c639 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/GlobalParameters.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/GlobalParameters.java @@ -31,7 +31,7 @@ import net.minecraft.server.level.ThreadedLevelLightEngine; import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.biome.BiomeManager; import net.minecraft.world.level.chunk.ChunkGenerator; -#if MC_VER > MC_1_18_2 +#if MC_VER >= MC_1_18_2 import net.minecraft.world.level.chunk.storage.ChunkScanAccess; #endif import net.minecraft.world.level.levelgen.WorldGenSettings; @@ -40,7 +40,7 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.StructureMana #else import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager; import net.minecraft.world.level.levelgen.RandomState; -#if MC_VER > MC_1_19_4 +#if MC_VER >= MC_1_19_4 import net.minecraft.world.level.levelgen.WorldOptions; import net.minecraft.core.registries.Registries; #endif @@ -67,7 +67,7 @@ public final class GlobalParameters public final RegistryAccess registry; public final long worldSeed; public final DataFixer fixerUpper; - #if MC_VER > MC_1_18_2 + #if MC_VER >= MC_1_18_2 public final BiomeManager biomeManager; public final ChunkScanAccess chunkScanner; // FIXME: Figure out if this is actually needed #endif @@ -90,14 +90,14 @@ public final class GlobalParameters biomes = registry.registryOrThrow(Registries.BIOME); worldSeed = worldOptions.seed(); #endif - #if MC_VER > MC_1_18_2 + #if MC_VER >= MC_1_18_2 biomeManager = new BiomeManager(level, BiomeManager.obfuscateSeed(worldSeed)); chunkScanner = level.getChunkSource().chunkScanner(); #endif structures = server.getStructureManager(); generator = level.getChunkSource().getGenerator(); fixerUpper = server.getFixerUpper(); - #if MC_VER > MC_1_19_2 + #if MC_VER >= MC_1_19_2 randomState = level.getChunkSource().randomState(); #endif } diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/ThreadedParameters.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/ThreadedParameters.java index db8a70195..71cc834c3 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/ThreadedParameters.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/ThreadedParameters.java @@ -25,7 +25,7 @@ import com.seibel.distanthorizons.common.wrappers.worldGeneration.mimicObject.Wo import net.minecraft.server.level.ServerLevel; import net.minecraft.world.level.WorldGenLevel; -#if MC_VER > MC_1_18_2 +#if MC_VER >= MC_1_18_2 import net.minecraft.world.level.levelgen.structure.StructureCheck; #endif @@ -35,7 +35,7 @@ public final class ThreadedParameters final ServerLevel level; public WorldGenStructFeatManager structFeat = null; - #if MC_VER > MC_1_18_2 + #if MC_VER >= MC_1_18_2 public StructureCheck structCheck; #endif boolean isValid = true; @@ -81,14 +81,14 @@ public final class ThreadedParameters public void makeStructFeat(WorldGenLevel genLevel, GlobalParameters param) { #if MC_VER < MC_1_19_4 - structFeat = new WorldGenStructFeatManager(param.worldGenSettings, genLevel #if MC_VER > MC_1_18_2 , structCheck #endif ); + structFeat = new WorldGenStructFeatManager(param.worldGenSettings, genLevel #if MC_VER >= MC_1_18_2 , structCheck #endif ); #else structFeat = new WorldGenStructFeatManager(param.worldOptions, genLevel, structCheck); #endif } - #if MC_VER > MC_1_18_2 && MC_VER < MC_1_19_2 + #if MC_VER >= MC_1_18_2 && MC_VER < MC_1_19_2 public void recreateStructureCheck() { if (previousGlobalParameters != null) diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java index bdae4bb2e..7edb2d77e 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java @@ -37,7 +37,7 @@ import java.util.Objects; import net.minecraft.core.Registry; import net.minecraft.core.SectionPos; -#if MC_VER > MC_1_19_4 +#if MC_VER >= MC_1_19_4 import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.core.registries.Registries; #endif @@ -55,7 +55,7 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.chunk.*; import net.minecraft.world.level.chunk.storage.ChunkSerializer; import net.minecraft.world.level.levelgen.Heightmap; -#if MC_VER > MC_1_18_2 +#if MC_VER >= MC_1_18_2 import net.minecraft.world.level.levelgen.blending.BlendingData; #if MC_VER < MC_1_19_2 import net.minecraft.world.level.levelgen.feature.StructureFeature; @@ -64,7 +64,7 @@ import net.minecraft.world.level.levelgen.structure.StructureStart; import net.minecraft.world.level.levelgen.structure.pieces.StructurePieceSerializationContext; import net.minecraft.world.ticks.LevelChunkTicks; #endif -#if MC_VER > MC_1_18_2 +#if MC_VER >= MC_1_18_2 import net.minecraft.core.Holder; import net.minecraft.core.RegistryAccess; #if MC_VER < MC_1_19_2 @@ -81,9 +81,9 @@ import net.minecraft.world.level.material.Fluid; public class ChunkLoader { - #if MC_VER > MC_1_19_2 + #if MC_VER >= MC_1_19_2 private static final Codec> BLOCK_STATE_CODEC = PalettedContainer.codecRW(Block.BLOCK_STATE_REGISTRY, BlockState.CODEC, PalettedContainer.Strategy.SECTION_STATES, Blocks.AIR.defaultBlockState()); - #elif MC_VER > MC_1_18_2 + #elif MC_VER >= MC_1_18_2 private static final Codec> BLOCK_STATE_CODEC = PalettedContainer.codec(Block.BLOCK_STATE_REGISTRY, BlockState.CODEC, PalettedContainer.Strategy.SECTION_STATES, Blocks.AIR.defaultBlockState()); #endif private static final String TAG_UPGRADE_DATA = "UpgradeData"; @@ -93,7 +93,7 @@ public class ChunkLoader private static final String FLUID_TICKS_TAG_PRE18 = "LiquidTicks"; private static final ConfigBasedLogger LOGGER = BatchGenerationEnvironment.LOAD_LOGGER; - #if MC_VER > MC_1_18_2 + #if MC_VER >= MC_1_18_2 private static BlendingData readBlendingData(CompoundTag chunkData) { BlendingData blendingData = null; @@ -109,7 +109,7 @@ public class ChunkLoader private static LevelChunkSection[] readSections(LevelAccessor level, ChunkPos chunkPos, CompoundTag chunkData) { - #if MC_VER > MC_1_18_2 + #if MC_VER >= MC_1_18_2 #if MC_VER < MC_1_19_4 Registry biomes = level.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY); #else @@ -255,25 +255,25 @@ public class ChunkLoader //================== Read params for making the LevelChunk ================== UpgradeData upgradeData = tagLevel.contains(TAG_UPGRADE_DATA, 10) - ? new UpgradeData(tagLevel.getCompound(TAG_UPGRADE_DATA)#if MC_VER > MC_1_17_1 , level #endif ) + ? new UpgradeData(tagLevel.getCompound(TAG_UPGRADE_DATA)#if MC_VER >= MC_1_17_1 , level #endif ) : UpgradeData.EMPTY; boolean isLightOn = tagLevel.getBoolean("isLightOn"); #if MC_VER < MC_1_18_2 ChunkBiomeContainer chunkBiomeContainer = new ChunkBiomeContainer( - level.getLevel().registryAccess().registryOrThrow(Registry.BIOME_REGISTRY)#if MC_VER > MC_1_17_1 , level #endif , + level.getLevel().registryAccess().registryOrThrow(Registry.BIOME_REGISTRY)#if MC_VER >= MC_1_17_1 , level #endif , chunkPos, level.getLevel().getChunkSource().getGenerator().getBiomeSource(), tagLevel.contains("Biomes", 11) ? tagLevel.getIntArray("Biomes") : null); TickList blockTicks = tagLevel.contains(BLOCK_TICKS_TAG_PRE18, 9) ? ChunkTickList.create(tagLevel.getList(BLOCK_TICKS_TAG_PRE18, 10), Registry.BLOCK::getKey, Registry.BLOCK::get) : new ProtoTickList(block -> (block == null || block.defaultBlockState().isAir()), chunkPos, - tagLevel.getList("ToBeTicked", 9)#if MC_VER > MC_1_17_1 , level #endif ); + tagLevel.getList("ToBeTicked", 9)#if MC_VER >= MC_1_17_1 , level #endif ); TickList fluidTicks = tagLevel.contains(FLUID_TICKS_TAG_PRE18, 9) ? ChunkTickList.create(tagLevel.getList(FLUID_TICKS_TAG_PRE18, 10), Registry.FLUID::getKey, Registry.FLUID::get) : new ProtoTickList(fluid -> (fluid == null || fluid == Fluids.EMPTY), chunkPos, - tagLevel.getList("LiquidsToBeTicked", 9)#if MC_VER > MC_1_17_1 , level #endif ); + tagLevel.getList("LiquidsToBeTicked", 9)#if MC_VER >= MC_1_17_1 , level #endif ); #else #if MC_VER < MC_1_19_4 LevelChunkTicks blockTicks = LevelChunkTicks.load(tagLevel.getList(BLOCK_TICKS_TAG_18, 10), diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DhLitWorldGenRegion.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DhLitWorldGenRegion.java index d287ea3f7..b73e18c43 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DhLitWorldGenRegion.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DhLitWorldGenRegion.java @@ -41,7 +41,7 @@ import net.minecraft.util.Mth; import net.minecraft.world.entity.Entity; import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.ColorResolver; -#if MC_VER > MC_1_17_1 +#if MC_VER >= MC_1_17_1 import net.minecraft.world.level.LevelHeightAccessor; #endif import net.minecraft.world.level.LightLayer; @@ -104,7 +104,7 @@ public class DhLitWorldGenRegion extends WorldGenRegion List chunkList, ChunkStatus chunkStatus, int writeRadius, BatchGenerationEnvironment.EmptyChunkGenerator generator) { - super(serverLevel, chunkList #if MC_VER > MC_1_17_1 , chunkStatus, writeRadius #endif ); + super(serverLevel, chunkList #if MC_VER >= MC_1_17_1 , chunkStatus, writeRadius #endif ); this.firstPos = chunkList.get(0).getPos(); this.generator = generator; this.lightEngine = lightEngine; @@ -115,7 +115,7 @@ public class DhLitWorldGenRegion extends WorldGenRegion - #if MC_VER > MC_1_17_1 + #if MC_VER >= MC_1_17_1 // Bypass BCLib mixin overrides. @Override public boolean ensureCanWrite(BlockPos blockPos) @@ -130,7 +130,7 @@ public class DhLitWorldGenRegion extends WorldGenRegion { return false; } - #if MC_VER > MC_1_18_2 + #if MC_VER >= MC_1_18_2 if (center.isUpgrading()) { LevelHeightAccessor levelHeightAccessor = center.getHeightAccessorForGeneration(); @@ -185,7 +185,7 @@ public class DhLitWorldGenRegion extends WorldGenRegion BlockState blockState = this.getBlockState(blockPos); // This is a bypass for the spawner block since MC complains about not having it - #if MC_VER > MC_1_17_1 + #if MC_VER >= MC_1_17_1 if (blockState.getBlock() instanceof SpawnerBlock) { return ((EntityBlock) blockState.getBlock()).newBlockEntity(blockPos, blockState); @@ -269,7 +269,7 @@ public class DhLitWorldGenRegion extends WorldGenRegion ChunkAccess chunk = getChunkAccess(i, j, chunkStatus, bl); if (chunk instanceof LevelChunk) { - chunk = new ImposterProtoChunk((LevelChunk) chunk #if MC_VER > MC_1_18_2 , true #endif ); + chunk = new ImposterProtoChunk((LevelChunk) chunk #if MC_VER >= MC_1_18_2 , true #endif ); } return chunk; } @@ -331,7 +331,7 @@ public class DhLitWorldGenRegion extends WorldGenRegion private Biome _getBiome(BlockPos pos) { - #if MC_VER > MC_1_18_2 + #if MC_VER >= MC_1_18_2 return getBiome(pos).value(); #else return getBiome(pos); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DummyLightEngine.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DummyLightEngine.java index 0be2237ff..f46b77131 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DummyLightEngine.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/DummyLightEngine.java @@ -87,7 +87,7 @@ public class DummyLightEngine extends LevelLightEngine @Override public void retainData(ChunkPos chunkPos, boolean bl) { } - #if MC_VER > MC_1_17_1 + #if MC_VER >= MC_1_17_1 @Override public int getLightSectionCount() { throw new UnsupportedOperationException("This should never be used!"); } @Override diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/LightGetterAdaptor.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/LightGetterAdaptor.java index 268445fa2..097962b94 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/LightGetterAdaptor.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/LightGetterAdaptor.java @@ -23,12 +23,12 @@ import com.seibel.distanthorizons.core.dependencyInjection.ModAccessorInjector; import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IStarlightAccessor; import net.minecraft.world.level.BlockGetter; -#if MC_VER > MC_1_17_1 +#if MC_VER >= MC_1_17_1 import net.minecraft.world.level.LevelHeightAccessor; #endif import net.minecraft.world.level.chunk.ChunkStatus; import net.minecraft.world.level.chunk.LightChunkGetter; -#if MC_VER > MC_1_20_1 +#if MC_VER >= MC_1_20_1 import net.minecraft.world.level.chunk.LightChunk; #endif @@ -64,7 +64,7 @@ public class LightGetterAdaptor implements LightChunkGetter return shouldReturnNull ? null : (genRegion != null ? genRegion : heightGetter); } - #if MC_VER > MC_1_17_1 + #if MC_VER >= MC_1_17_1 public LevelHeightAccessor getLevelHeightAccessor() { return heightGetter; diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/WorldGenStructFeatManager.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/WorldGenStructFeatManager.java index 69777916e..05c846540 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/WorldGenStructFeatManager.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/WorldGenStructFeatManager.java @@ -41,13 +41,13 @@ import net.minecraft.world.level.levelgen.WorldGenSettings; import net.minecraft.world.level.levelgen.feature.ConfiguredStructureFeature; import net.minecraft.world.level.StructureFeatureManager; #else -#if MC_VER > MC_1_19_4 +#if MC_VER >= MC_1_19_4 import net.minecraft.world.level.levelgen.WorldOptions; #endif import net.minecraft.world.level.levelgen.structure.Structure; import net.minecraft.world.level.StructureManager; #endif -#if MC_VER > MC_1_18_2 +#if MC_VER >= MC_1_18_2 import net.minecraft.world.level.levelgen.structure.StructureCheck; #endif @@ -69,17 +69,17 @@ public class WorldGenStructFeatManager extends #if MC_VER < MC_1_19_2 StructureF WorldOptions worldOptions; #endif - #if MC_VER > MC_1_18_2 + #if MC_VER >= MC_1_18_2 StructureCheck structureCheck; #endif #if MC_VER < MC_1_19_4 public WorldGenStructFeatManager( WorldGenSettings worldGenSettings, - WorldGenLevel genLevel #if MC_VER > MC_1_18_2 , StructureCheck structureCheck #endif ) + WorldGenLevel genLevel #if MC_VER >= MC_1_18_2 , StructureCheck structureCheck #endif ) { - super(genLevel, worldGenSettings #if MC_VER > MC_1_18_2 , structureCheck #endif ); + super(genLevel, worldGenSettings #if MC_VER >= MC_1_18_2 , structureCheck #endif ); this.genLevel = genLevel; this.worldGenSettings = worldGenSettings; } @@ -101,7 +101,7 @@ public class WorldGenStructFeatManager extends #if MC_VER < MC_1_19_2 StructureF if (worldGenRegion == genLevel) return this; #if MC_VER < MC_1_19_4 - return new WorldGenStructFeatManager(worldGenSettings, worldGenRegion #if MC_VER > MC_1_18_2 , structureCheck #endif ); + return new WorldGenStructFeatManager(worldGenSettings, worldGenRegion #if MC_VER >= MC_1_18_2 , structureCheck #endif ); #else return new WorldGenStructFeatManager(worldOptions, worldGenRegion, structureCheck); #endif diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepBiomes.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepBiomes.java index 150b7f3bd..f0ee76c04 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepBiomes.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepBiomes.java @@ -32,7 +32,7 @@ import net.minecraft.server.level.WorldGenRegion; import net.minecraft.world.level.chunk.ChunkAccess; import net.minecraft.world.level.chunk.ChunkStatus; import net.minecraft.world.level.chunk.ProtoChunk; -#if MC_VER > MC_1_18_2 +#if MC_VER >= MC_1_18_2 import net.minecraft.world.level.levelgen.blending.Blender; #endif diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepFeatures.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepFeatures.java index f5b7d1016..65092f701 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepFeatures.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepFeatures.java @@ -32,7 +32,7 @@ import net.minecraft.world.level.chunk.ChunkAccess; import net.minecraft.world.level.chunk.ChunkStatus; import net.minecraft.world.level.chunk.ProtoChunk; import net.minecraft.world.level.levelgen.Heightmap; -#if MC_VER > MC_1_18_2 +#if MC_VER >= MC_1_18_2 #endif public final class StepFeatures diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepNoise.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepNoise.java index f3c01a650..1974e385d 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepNoise.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepNoise.java @@ -28,14 +28,14 @@ import com.seibel.distanthorizons.common.wrappers.worldGeneration.ThreadedParame import com.seibel.distanthorizons.core.util.objects.UncheckedInterruptedException; import net.minecraft.server.level.WorldGenRegion; -#if MC_VER > MC_1_17_1 +#if MC_VER >= MC_1_17_1 #endif #if MC_VER < MC_1_19_2 #endif import net.minecraft.world.level.chunk.ChunkAccess; import net.minecraft.world.level.chunk.ChunkStatus; import net.minecraft.world.level.chunk.ProtoChunk; -#if MC_VER > MC_1_18_2 +#if MC_VER >= MC_1_18_2 import net.minecraft.world.level.levelgen.blending.Blender; #endif diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepStructureStart.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepStructureStart.java index 0a22eae65..63cc74800 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepStructureStart.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepStructureStart.java @@ -110,7 +110,7 @@ public final class StepStructureStart tParams.structFeat, chunk, environment.params.structures); #endif - #if MC_VER > MC_1_18_2 + #if MC_VER >= MC_1_18_2 try { tParams.structCheck.onStructureLoad(chunk.getPos(), chunk.getAllStarts()); diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricMain.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricMain.java index 4ef561058..97eb41228 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricMain.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricMain.java @@ -59,7 +59,7 @@ public class FabricMain if (Config.Client.Advanced.Graphics.Fog.disableVanillaFog.get() && SingletonInjector.INSTANCE.get(IModChecker.class).isModLoaded("bclib")) ModAccessorInjector.INSTANCE.get(IBCLibAccessor.class).setRenderCustomFog(false); // Remove BCLib's fog - #if MC_VER > MC_1_20_1 + #if MC_VER >= MC_1_20_1 if (SingletonInjector.INSTANCE.get(IModChecker.class).isModLoaded("sodium")) ModAccessorInjector.INSTANCE.get(ISodiumAccessor.class).setFogOcclusion(false); // FIXME: This is a tmp fix for sodium 0.5.0, and 0.5.1. This is fixed in sodium 0.5.2 #endif diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientLevel.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientLevel.java index 7dc45f784..59c290576 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientLevel.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientLevel.java @@ -24,7 +24,7 @@ import com.seibel.distanthorizons.common.wrappers.world.ClientLevelWrapper; import com.seibel.distanthorizons.core.api.internal.ClientApi; import com.seibel.distanthorizons.core.api.internal.SharedApi; import net.minecraft.client.multiplayer.ClientLevel; -#if MC_VER > MC_1_18_2 +#if MC_VER >= MC_1_18_2 #endif import net.minecraft.world.level.chunk.LevelChunk; import org.spongepowered.asm.mixin.Mixin; @@ -44,14 +44,14 @@ public class MixinClientLevel // //Moved to MixinClientPacketListener // @Inject(method = "", at = @At("TAIL")) // private void loadWorldEvent(ClientPacketListener clientPacketListener, ClientLevel.ClientLevelData clientLevelData, ResourceKey resourceKey, -// #if MC_VER > MC_1_18_2 Holder holder, #else DimensionType dimensionType, #endif int i, -// #if MC_VER > MC_1_18_2 int j, #endif Supplier supplier, LevelRenderer levelRenderer, boolean bl, long l, CallbackInfo ci) +// #if MC_VER >= MC_1_18_2 Holder holder, #else DimensionType dimensionType, #endif int i, +// #if MC_VER >= MC_1_18_2 int j, #endif Supplier supplier, LevelRenderer levelRenderer, boolean bl, long l, CallbackInfo ci) // { // ClientApi.INSTANCE.clientLevelLoadEvent(WorldWrapper.getWorldWrapper((ClientLevel)(Object)this)); // } // Moved to overriding the enableChunkLight(...) method over at ClientPacketListener for 1.20+ - #if MC_VER > MC_1_18_2 && MC_VER < MC_1_20_1 // Only the setLightReady is only available after 1.18. This ensures the light data is ready. + #if MC_VER >= MC_1_18_2 && MC_VER < MC_1_20_1 // Only the setLightReady is only available after 1.18. This ensures the light data is ready. @Inject(method = "setLightReady", at = @At("HEAD")) private void onChunkLightReady(int x, int z, CallbackInfo ci) { diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientPacketListener.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientPacketListener.java index ac6c09572..2e7716b87 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientPacketListener.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinClientPacketListener.java @@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -#if MC_VER > MC_1_20_1 +#if MC_VER >= MC_1_20_1 import com.seibel.distanthorizons.core.wrapperInterfaces.world.IClientLevelWrapper; import net.minecraft.world.level.chunk.LevelChunk; import com.seibel.distanthorizons.common.wrappers.chunk.ChunkWrapper; @@ -45,7 +45,7 @@ public class MixinClientPacketListener ClientApi.INSTANCE.onClientOnlyDisconnected(); } - #if MC_VER > MC_1_20_1 + #if MC_VER >= MC_1_20_1 @Inject(method = "enableChunkLight", at = @At("TAIL")) void onEnableChunkLight(LevelChunk chunk, int x, int z, CallbackInfo ci) { diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinGameRenderer.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinGameRenderer.java index 5a11f09d8..4cc9c68c2 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinGameRenderer.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinGameRenderer.java @@ -16,7 +16,7 @@ public class MixinGameRenderer private static final Logger LOGGER = LogManager.getLogger(MixinGameRenderer.class.getSimpleName()); - #if MC_VER > MC_1_17_1 + #if MC_VER >= MC_1_17_1 // FIXME: This I think will dup multiple renderStartupEvent calls... @Inject(method = {"reloadShaders", "preloadUiShader"}, at = @At("TAIL")) public void onStartupShaders(CallbackInfo ci) diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinMinecraft.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinMinecraft.java index f96c258de..3e7e1c12b 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinMinecraft.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinMinecraft.java @@ -61,7 +61,7 @@ public class MixinMinecraft } #endif - #if MC_VER > MC_1_20_2 + #if MC_VER >= MC_1_20_2 @Redirect( method = "Lnet/minecraft/client/Minecraft;onGameLoadFinished(Lnet/minecraft/client/Minecraft$GameLoadCookie;)V", at = @At(value = "INVOKE", target = "Ljava/lang/Runnable;run()V") diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/mods/sodium/MixinSodiumRenderer.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/mods/sodium/MixinSodiumRenderer.java index cde893175..498fdf8c9 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/mods/sodium/MixinSodiumRenderer.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/mods/sodium/MixinSodiumRenderer.java @@ -2,7 +2,7 @@ package com.seibel.distanthorizons.fabric.mixins.mods.sodium; /* Removed since DH now uses Indium so we can use the Fabric rendering API instead -#if MC_VER > MC_1_20_1 +#if MC_VER >= MC_1_20_1 // Sodium 0.5 import com.mojang.blaze3d.vertex.PoseStack; import com.seibel.distanthorizons.core.api.internal.ClientApi; @@ -55,7 +55,7 @@ public class MixinSodiumRenderer } -#elif MC_VER > MC_1_17_1 +#elif MC_VER >= MC_1_17_1 // Sodium 0.3 to 0.4 import com.seibel.distanthorizons.core.api.internal.ClientApi; import com.seibel.distanthorizons.core.dependencyInjection.ModAccessorInjector; diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinUtilBackgroundThread.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinUtilBackgroundThread.java index ed33bc5b0..8bfd986df 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinUtilBackgroundThread.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinUtilBackgroundThread.java @@ -50,7 +50,7 @@ public class MixinUtilBackgroundThread } } - #if MC_VER > MC_1_17_1 + #if MC_VER >= MC_1_17_1 @Inject(method = "wrapThreadWithTaskName(Ljava/lang/String;Ljava/lang/Runnable;)Ljava/lang/Runnable;", at = @At("HEAD"), cancellable = true) private static void overrideUtil$wrapThreadWithTaskName(String string, Runnable r, CallbackInfoReturnable ci) @@ -62,7 +62,7 @@ public class MixinUtilBackgroundThread } } #endif - #if MC_VER > MC_1_18_2 + #if MC_VER >= MC_1_18_2 @Inject(method = "wrapThreadWithTaskName(Ljava/lang/String;Ljava/util/function/Supplier;)Ljava/util/function/Supplier;", at = @At("HEAD"), cancellable = true) private static void overrideUtil$wrapThreadWithTaskNameForSupplier(String string, Supplier r, CallbackInfoReturnable> ci) diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/unsafe/MixinThreadingDetector.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/unsafe/MixinThreadingDetector.java index 7ea166ef7..24641322f 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/unsafe/MixinThreadingDetector.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/unsafe/MixinThreadingDetector.java @@ -22,7 +22,7 @@ package com.seibel.distanthorizons.fabric.mixins.server.unsafe; import org.spongepowered.asm.mixin.Mixin; //FIXME: Is this still needed? -#if MC_VER > MC_1_18_2 +#if MC_VER >= MC_1_18_2 import net.minecraft.util.ThreadingDetector; import org.spongepowered.asm.mixin.Mutable; diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/SodiumAccessor.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/SodiumAccessor.java index 86a6909d2..7145d673a 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/SodiumAccessor.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/SodiumAccessor.java @@ -60,21 +60,21 @@ public class SodiumAccessor implements ISodiumAccessor return "Sodium-Fabric"; } - #if MC_VER > MC_1_17_1 + #if MC_VER >= MC_1_17_1 @Override public HashSet getNormalRenderedChunks() { SodiumWorldRenderer renderer = SodiumWorldRenderer.instance(); LevelHeightAccessor height = Minecraft.getInstance().level; - #if MC_VER > MC_1_20_1 + #if MC_VER >= MC_1_20_1 // TODO: This is just a tmp solution, use a proper solution later return MC_RENDER.getMaximumRenderedChunks().stream().filter((DhChunkPos chunk) -> { return (renderer.isBoxVisible( chunk.getMinBlockX() + 1, height.getMinBuildHeight() + 1, chunk.getMinBlockZ() + 1, chunk.getMinBlockX() + 15, height.getMaxBuildHeight() - 1, chunk.getMinBlockZ() + 15)); }).collect(Collectors.toCollection(HashSet::new)); - #elif MC_VER > MC_1_18_2 + #elif MC_VER >= MC_1_18_2 // 0b11 = Lighted chunk & loaded chunk return renderer.getChunkTracker().getChunks(0b00).filter( (long l) -> { @@ -134,7 +134,7 @@ public class SodiumAccessor implements ISodiumAccessor @Override public void setFogOcclusion(boolean b) { - #if MC_VER > MC_1_20_1 + #if MC_VER >= MC_1_20_1 me.jellysquid.mods.sodium.client.SodiumClientMod.options().performance.useFogOcclusion = b; #endif } diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeClientProxy.java b/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeClientProxy.java index 836cd6cf3..085d2e477 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeClientProxy.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeClientProxy.java @@ -44,7 +44,7 @@ import net.minecraftforge.event.level.ChunkEvent; import net.minecraftforge.event.level.LevelEvent; #endif -#if MC_VER > MC_1_18_2 +#if MC_VER >= MC_1_18_2 import net.minecraftforge.client.event.RenderLevelStageEvent; #endif import net.minecraftforge.event.entity.player.PlayerInteractEvent; @@ -298,15 +298,15 @@ public class ForgeClientProxy //===========// @SubscribeEvent - #if MC_VER > MC_1_18_2 + #if MC_VER >= MC_1_18_2 public void afterLevelRenderEvent(RenderLevelStageEvent event) #else public void afterLevelRenderEvent(TickEvent.RenderTickEvent event) #endif { - #if MC_VER > MC_1_20_1 + #if MC_VER >= MC_1_20_1 if (event.getStage() == RenderLevelStageEvent.Stage.AFTER_LEVEL) - #elif MC_VER > MC_1_18_2 + #elif MC_VER >= MC_1_18_2 if (event.getStage() == RenderLevelStageEvent.Stage.AFTER_SOLID_BLOCKS) #else // FIXME: Is this the correct location for 1.16 & 1.17??? diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeMain.java b/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeMain.java index d88441f92..4195b2dea 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeMain.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeMain.java @@ -39,7 +39,7 @@ import com.seibel.distanthorizons.forge.wrappers.modAccessor.OptifineAccessor; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.core.Direction; -#if MC_VER > MC_1_19_2 +#if MC_VER >= MC_1_19_2 import net.minecraft.util.RandomSource; #endif import net.minecraft.world.level.ColorResolver; @@ -55,7 +55,7 @@ import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.fml.ExtensionPoint; #elif MC_VER == MC_1_17_1 import net.minecraftforge.fmlclient.ConfigGuiHandler; -#elif MC_VER > MC_1_18_2 && MC_VER < MC_1_19_2 +#elif MC_VER >= MC_1_18_2 && MC_VER < MC_1_19_2 import net.minecraftforge.client.ConfigGuiHandler; #else import net.minecraftforge.client.ConfigScreenHandler; @@ -131,7 +131,7 @@ public class ForgeMain implements LodForgeMethodCaller #if MC_VER < MC_1_17_1 ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.CONFIGGUIFACTORY, () -> (client, parent) -> GetConfigScreen.getScreen(parent)); - #elif MC_VER >= MC_1_17_1 && MC_VER <= MC_1_19_2 + #elif MC_VER >= MC_1_17_1 && MC_VER < MC_1_19_2 ModLoadingContext.get().registerExtensionPoint(ConfigGuiHandler.ConfigGuiFactory.class, () -> new ConfigGuiHandler.ConfigGuiFactory((client, parent) -> GetConfigScreen.getScreen(parent))); #else @@ -184,7 +184,7 @@ public class ForgeMain implements LodForgeMethodCaller #else public List getQuads(MinecraftClientWrapper mc, Block block, BlockState blockState, Direction direction, RandomSource random) { - return mc.getModelManager().getBlockModelShaper().getBlockModel(block.defaultBlockState()).getQuads(blockState, direction, random, modelData #if MC_VER > MC_1_19_2 , RenderType.solid() #endif ); + return mc.getModelManager().getBlockModelShaper().getBlockModel(block.defaultBlockState()).getQuads(blockState, direction, random, modelData #if MC_VER >= MC_1_19_2 , RenderType.solid() #endif ); } #endif diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinGameRenderer.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinGameRenderer.java index 9834b90bf..614054ee2 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinGameRenderer.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinGameRenderer.java @@ -16,7 +16,7 @@ public class MixinGameRenderer { private static final Logger LOGGER = LogManager.getLogger(MixinGameRenderer.class.getSimpleName()); - #if MC_VER > MC_1_17_1 + #if MC_VER >= MC_1_17_1 // FIXME: This I think will dup multiple renderStartupEvent calls... @Inject(method = {"reloadShaders", "preloadUiShader"}, at = @At("TAIL")) public void onStartupShaders(CallbackInfo ci) diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinMinecraft.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinMinecraft.java index 155c30259..b8c25e6e1 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinMinecraft.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinMinecraft.java @@ -61,7 +61,7 @@ public class MixinMinecraft } #endif - #if MC_VER > MC_1_20_2 + #if MC_VER >= MC_1_20_2 @Redirect( method = "Lnet/minecraft/client/Minecraft;onGameLoadFinished(Lnet/minecraft/client/Minecraft$GameLoadCookie;)V", at = @At(value = "INVOKE", target = "Ljava/lang/Runnable;run()V") diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinUtilBackgroundThread.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinUtilBackgroundThread.java index 900d1115c..dee12f792 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinUtilBackgroundThread.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinUtilBackgroundThread.java @@ -50,7 +50,7 @@ public class MixinUtilBackgroundThread } } - #if MC_VER > MC_1_17_1 + #if MC_VER >= MC_1_17_1 @Inject(method = "wrapThreadWithTaskName(Ljava/lang/String;Ljava/lang/Runnable;)Ljava/lang/Runnable;", at = @At("HEAD"), cancellable = true) private static void overrideUtil$wrapThreadWithTaskName(String string, Runnable r, CallbackInfoReturnable ci) @@ -62,7 +62,7 @@ public class MixinUtilBackgroundThread } } #endif - #if MC_VER > MC_1_18_2 + #if MC_VER >= MC_1_18_2 @Inject(method = "wrapThreadWithTaskName(Ljava/lang/String;Ljava/util/function/Supplier;)Ljava/util/function/Supplier;", at = @At("HEAD"), cancellable = true) private static void overrideUtil$wrapThreadWithTaskNameForSupplier(String string, Supplier r, CallbackInfoReturnable> ci) diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/unsafe/MixinThreadingDetector.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/unsafe/MixinThreadingDetector.java index 3ce324a04..2cb73c02c 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/unsafe/MixinThreadingDetector.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/unsafe/MixinThreadingDetector.java @@ -20,7 +20,7 @@ package com.seibel.distanthorizons.forge.mixins.server.unsafe; import org.spongepowered.asm.mixin.Mixin; -#if MC_VER > MC_1_18_2 +#if MC_VER >= MC_1_18_2 import net.minecraft.util.ThreadingDetector; import org.spongepowered.asm.mixin.Mutable; From d597634ac6e005c6b07345848c902d836b030cd7 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Tue, 12 Dec 2023 07:47:22 -0600 Subject: [PATCH 19/21] Fix forge 1.20.4 crashing due to incorrect version number order --- 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 6044d24a4809df08fa7b0ff398feffad321b7076 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Wed, 13 Dec 2023 22:08:45 -0600 Subject: [PATCH 20/21] Fix ThreadPool null pointer before world startup --- coreSubProjects | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreSubProjects b/coreSubProjects index 19d20f559..77d8f413e 160000 --- a/coreSubProjects +++ b/coreSubProjects @@ -1 +1 @@ -Subproject commit 19d20f5591fbb7a72fa623fcd1831f9e6d28e713 +Subproject commit 77d8f413e6def735b3d30664a5b9fd7076a2034e From 4d8ce3b5eafb61b73b9804ae1edf04342849fa99 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Thu, 14 Dec 2023 07:50:57 -0600 Subject: [PATCH 21/21] Optimize DH lighting for chunks with populated sections Specifically improves lighting speed for BigGlobe worlds --- .../common/wrappers/chunk/ChunkWrapper.java | 89 +++++++++++++++---- coreSubProjects | 2 +- 2 files changed, 71 insertions(+), 20 deletions(-) diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java index 36cb5c311..c0b0235ab 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/chunk/ChunkWrapper.java @@ -100,6 +100,9 @@ public class ChunkWrapper implements IChunkWrapper private boolean useDhLighting; + private int minNonEmptyHeight = Integer.MIN_VALUE; + private int maxNonEmptyHeight = Integer.MAX_VALUE; + /** * Due to vanilla `isClientLightReady()` not being designed for use by a non-render thread, it may return 'true' * before the light engine has ticked, (right after all light changes is marked by the engine to be processed). @@ -165,8 +168,18 @@ public class ChunkWrapper implements IChunkWrapper public int getMaxBuildHeight() { return this.chunk.getMaxBuildHeight(); } @Override - public int getMinFilledHeight() + public int getMinNonEmptyHeight() { + if (this.minNonEmptyHeight != Integer.MIN_VALUE) + { + return this.minNonEmptyHeight; + } + + + // default if every section is empty or missing + this.minNonEmptyHeight = this.getMinBuildHeight(); + + // determine the lowest empty section (bottom up) LevelChunkSection[] sections = this.chunk.getSections(); for (int index = 0; index < sections.length; index++) { @@ -175,27 +188,65 @@ public class ChunkWrapper implements IChunkWrapper continue; } - #if MC_VER == MC_1_16_5 - if (!sections[index].isEmpty()) + if (!isChunkSectionEmpty(sections[index])) { - // convert from an index to a block coordinate - return this.chunk.getSections()[index].bottomBlockY() * 16; + this.minNonEmptyHeight = this.getChunkSectionMinHeight(index); + break; } - #elif MC_VER == MC_1_17_1 - if (!sections[index].isEmpty()) - { - // convert from an index to a block coordinate - return this.chunk.getSections()[index].bottomBlockY() * 16; - } - #else - if (!sections[index].hasOnlyAir()) - { - // convert from an index to a block coordinate - return this.chunk.getSectionYFromSectionIndex(index) * 16; - } - #endif } - return Integer.MAX_VALUE; + + return this.minNonEmptyHeight; + } + + + @Override + public int getMaxNonEmptyHeight() + { + if (this.maxNonEmptyHeight != Integer.MAX_VALUE) + { + return this.maxNonEmptyHeight; + } + + + // default if every section is empty or missing + this.maxNonEmptyHeight = this.getMaxBuildHeight(); + + // determine the highest empty section (top down) + LevelChunkSection[] sections = this.chunk.getSections(); + for (int index = sections.length-1; index >= 0; index--) + { + if (sections[index] == null) + { + continue; + } + + if (!isChunkSectionEmpty(sections[index])) + { + this.maxNonEmptyHeight = this.getChunkSectionMinHeight(index) + 16; + break; + } + } + + return this.maxNonEmptyHeight; + } + private static boolean isChunkSectionEmpty(LevelChunkSection section) + { + #if MC_VER == MC_1_16_5 + return section.isEmpty(); + #elif MC_VER == MC_1_17_1 + return section.isEmpty(); + #else + return section.hasOnlyAir(); + #endif + } + private int getChunkSectionMinHeight(int index) + { + // convert from an index to a block coordinate + #if MC_VER == MC_1_16_5 || MC_VER == MC_1_17_1 + return this.chunk.getSections()[index].bottomBlockY() * 16; + #else + return this.chunk.getSectionYFromSectionIndex(index) * 16; + #endif } diff --git a/coreSubProjects b/coreSubProjects index 77d8f413e..ebebc5566 160000 --- a/coreSubProjects +++ b/coreSubProjects @@ -1 +1 @@ -Subproject commit 77d8f413e6def735b3d30664a5b9fd7076a2034e +Subproject commit ebebc5566e5b44e3fa86c3f1b80a91a25a218ea0