From 1b66672166007b18b415dabd0f75191b968b4f24 Mon Sep 17 00:00:00 2001 From: TomTheFurry Date: Thu, 29 Jun 2023 16:04:20 +0800 Subject: [PATCH] Trash remaining 1.19 & 1.18.1 unsupported mc version, and fixup 1.19.2 --- .gitlab-ci.yml | 34 +++++++++++++ buildAll.bat | 6 +-- .../common/forge/LodForgeMethodCaller.java | 4 +- .../common/wrappers/VersionConstants.java | 2 +- .../common/wrappers/block/BiomeWrapper.java | 2 +- .../block/cache/ClientBlockStateCache.java | 4 +- .../common/wrappers/chunk/ChunkWrapper.java | 6 +-- .../common/wrappers/gui/ClassicConfigGUI.java | 2 +- .../common/wrappers/gui/GuiHelper.java | 14 +++--- .../common/wrappers/gui/MinecraftScreen.java | 2 +- .../wrappers/gui/updater/ChangelogScreen.java | 2 +- .../minecraft/MinecraftClientWrapper.java | 4 +- .../minecraft/MinecraftRenderWrapper.java | 6 +-- .../BatchGenerationEnvironment.java | 12 ++--- .../worldGeneration/GlobalParameters.java | 14 +++--- .../worldGeneration/ThreadedParameters.java | 10 ++-- .../mimicObject/ChunkLoader.java | 26 +++++----- .../mimicObject/LightedWorldGenRegion.java | 8 +-- .../mimicObject/WorldGenLevelLightEngine.java | 2 +- .../WorldGenStructFeatManager.java | 26 +++++----- .../worldGeneration/step/StepBiomes.java | 8 +-- .../worldGeneration/step/StepFeatures.java | 4 +- .../worldGeneration/step/StepLight.java | 2 +- .../worldGeneration/step/StepNoise.java | 6 +-- .../step/StepStructureReference.java | 2 +- .../step/StepStructureStart.java | 12 +++-- .../worldGeneration/step/StepSurface.java | 2 +- .../1_19_2.distanthorizons.accesswidener | 39 +++++++++++++++ ...r => 1_19_4.distanthorizons.accesswidener} | 0 coreSubProjects | 2 +- .../fabric/FabricClientProxy.java | 2 +- .../mixins/client/MixinClientLevel.java | 4 +- .../client/MixinClientPacketListener.java | 2 +- .../mixins/client/MixinFogRenderer.java | 2 +- .../mixins/client/MixinOptionsScreen.java | 4 +- .../mixins/server/MixinChunkGenerator.java | 2 +- .../server/MixinUtilBackgroundThread.java | 2 +- .../server/unsafe/MixinThreadingDetector.java | 2 +- .../wrappers/modAccessor/SodiumAccessor.java | 2 +- .../forge/ForgeClientProxy.java | 6 +-- .../distanthorizons/forge/ForgeMain.java | 8 +-- .../forge/ForgeServerProxy.java | 4 +- .../client/MixinClientPacketListener.java | 2 +- .../mixins/client/MixinOptionsScreen.java | 4 +- .../mixins/server/MixinChunkGenerator.java | 2 +- .../server/MixinUtilBackgroundThread.java | 2 +- .../server/unsafe/MixinThreadingDetector.java | 2 +- gradle.properties | 2 +- versionProperties/1.18.1.properties | 50 ------------------- versionProperties/1.19.2.properties | 2 +- versionProperties/1.19.4.properties | 2 +- versionProperties/1.19.properties | 47 ----------------- 52 files changed, 198 insertions(+), 220 deletions(-) create mode 100644 common/src/main/resources/1_19_2.distanthorizons.accesswidener rename common/src/main/resources/{1_19.distanthorizons.accesswidener => 1_19_4.distanthorizons.accesswidener} (100%) delete mode 100644 versionProperties/1.18.1.properties delete mode 100644 versionProperties/1.19.properties diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 86d3b9ffd..26eda445f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,6 +9,7 @@ stages: - build_1_18_2 - build_1_19_4 - build_1_20_1 + - build_1_19_2 - pages variables: @@ -50,6 +51,39 @@ build_1_18_2: - cache/ allow_failure: true +# 1.19.2 build +build_1_19_2: + stage: build_1_19_2 + script: + # this both runs the unit tests and assembles the code + - ./gradlew clean -PmcVer="1.19.2" --gradle-user-home cache/; + - ./gradlew build -PmcVer="1.19.2" --gradle-user-home cache/; + - ./gradlew mergeJars -PmcVer="1.19.2" --gradle-user-home cache/; + image: eclipse-temurin:17 + artifacts: + name: "NightlyBuild_1_19_2-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_TIMESTAMP}" + paths: + - Merged/*.jar + - fabric/build/libs/*.jar + - forge/build/libs/*.jar + - quilt/build/libs/*.jar + exclude: + # TODO: There is a lot of duplicate stuff here, fix it later to be smaller + - fabric/build/libs/*-all.jar + - fabric/build/libs/*-sources.jar + - forge/build/libs/*-all.jar + - forge/build/libs/*-sources.jar + - quilt/build/libs/*-all.jar + - quilt/build/libs/*-sources.jar + expire_in: 1 day + when: always + cache: + key: "gradleCache" + policy: pull-push + paths: + - .gradle + - cache/ + allow_failure: true # 1.19.4 build build_1_19_4: diff --git a/buildAll.bat b/buildAll.bat index 9affd3a91..75578f376 100644 --- a/buildAll.bat +++ b/buildAll.bat @@ -10,11 +10,9 @@ echo So if someone does use Windows and knows how to script stuff then can you p @REM Old BAT script if you need some help with this task @REM SETLOCAL -@REM CALL :buildVersion "1.19" @REM CALL :buildVersion "1.18.2" -@REM CALL :buildVersion "1.18.1" -@REM CALL :buildVersion "1.17.1" -@REM CALL :buildVersion "1.16.5" +@REM CALL :buildVersion "1.19.4" +@REM CALL :buildVersion "1.20.1" @REM EXIT /B %ERRORLEVEL% @REM @REM :buildVersion 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 e086f6b96..2b73515c7 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 +#if POST_MC_1_19_2 import net.minecraft.util.RandomSource; #endif import net.minecraft.world.level.ColorResolver; @@ -39,7 +39,7 @@ import java.util.Random; * @author Ran */ public interface LodForgeMethodCaller { - #if PRE_MC_1_19 + #if PRE_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/wrappers/VersionConstants.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/VersionConstants.java index f8b76d06f..5a60af01b 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 @@ -58,7 +58,7 @@ public class VersionConstants implements IVersionConstants @Override public String getMinecraftVersion() { - #if PRE_MC_1_19 + #if PRE_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/block/BiomeWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/block/BiomeWrapper.java index b9004fe55..a8abb0e6e 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 @@ -30,7 +30,7 @@ import com.seibel.distanthorizons.core.wrapperInterfaces.world.IBiomeWrapper; import net.minecraft.client.Minecraft; import net.minecraft.core.Holder; -#if POST_MC_1_19 +#if POST_MC_1_19_2 import net.minecraft.data.worldgen.biome.EndBiomes; import net.minecraft.data.worldgen.biome.NetherBiomes; #endif 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 9836e24cc..e080f600e 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 @@ -19,7 +19,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 +#if POST_MC_1_19_2 import net.minecraft.util.RandomSource; #endif import net.minecraft.world.level.block.state.BlockState; @@ -37,7 +37,7 @@ public class ClientBlockStateCache private static final Logger LOGGER = DhLoggerBuilder.getLogger(); - #if PRE_MC_1_19 + #if PRE_MC_1_19_2 public static final Random random = new Random(0); #else public static final RandomSource random = RandomSource.create(); 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 3d2778a20..0184ce1da 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 @@ -144,7 +144,7 @@ public class ChunkWrapper implements IChunkWrapper #if PRE_MC_1_17_1 return BiomeWrapper.getBiomeWrapper(chunk.getBiomes().getNoiseBiome( x >> 2, y >> 2, z >> 2)); - #elif PRE_MC_1_18_1 + #elif PRE_MC_1_18_2 return BiomeWrapper.getBiomeWrapper(chunk.getBiomes().getNoiseBiome( QuartPos.fromBlock(x), QuartPos.fromBlock(y), QuartPos.fromBlock(z))); #elif PRE_MC_1_18_2 @@ -176,7 +176,7 @@ public class ChunkWrapper implements IChunkWrapper @Override public boolean isLightCorrect() { - #if PRE_MC_1_18_1 + #if PRE_MC_1_18_2 return true; #else if (this.chunk instanceof LevelChunk) @@ -399,7 +399,7 @@ public class ChunkWrapper implements IChunkWrapper public static void syncedUpdateClientLightStatus() { - #if PRE_MC_1_18_1 + #if PRE_MC_1_18_2 // TODO: Check what to do in 1.18.1, or in other versions #else weakMapLock.writeLock().lock(); 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 965042b16..dda593bd2 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 @@ -53,7 +53,7 @@ import net.minecraft.client.resources.language.I18n; // translation #if POST_MC_1_17_1 import net.minecraft.client.gui.narration.NarratableEntry; #endif -#if PRE_MC_1_19 +#if PRE_MC_1_19_2 import net.minecraft.network.chat.TextComponent; import net.minecraft.network.chat.TranslatableComponent; #endif 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 7c9035097..de2449be0 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 +#if PRE_MC_1_19_2 import net.minecraft.network.chat.TextComponent; import net.minecraft.network.chat.TranslatableComponent; #endif @@ -15,7 +15,7 @@ public class GuiHelper { * Helper static methods for versional compat */ public static Button MakeBtn(Component base, int a, int b, int c, int d, Button.OnPress action) { - #if PRE_MC_1_19 + #if PRE_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(); @@ -23,7 +23,7 @@ public class GuiHelper { } public static MutableComponent TextOrLiteral(String text) { - #if PRE_MC_1_19 + #if PRE_MC_1_19_2 return new TextComponent(text); #else return Component.literal(text); @@ -31,7 +31,7 @@ public class GuiHelper { } public static MutableComponent TextOrTranslatable(String text) { - #if PRE_MC_1_19 + #if PRE_MC_1_19_2 return new TextComponent(text); #else return Component.translatable(text); @@ -39,7 +39,7 @@ public class GuiHelper { } public static MutableComponent Translatable(String text, Object... args) { - #if PRE_MC_1_19 + #if PRE_MC_1_19_2 return new TranslatableComponent(text, args); #else return Component.translatable(text, args); @@ -47,7 +47,7 @@ public class GuiHelper { } public static void SetX(AbstractWidget w, int x) { - #if PRE_MC_1_19 + #if PRE_MC_1_19_4 w.x = x; #else w.setX(x); @@ -55,7 +55,7 @@ public class GuiHelper { } public static void SetY(AbstractWidget w, int y) { - #if PRE_MC_1_19 + #if PRE_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 15da5d970..bcc1bd3f9 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 @@ -25,7 +25,7 @@ public class MinecraftScreen { private AbstractScreen screen; - #if PRE_MC_1_19 + #if PRE_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); } 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 dded7822a..ba32ae88d 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 @@ -21,7 +21,7 @@ import net.minecraft.client.gui.components.events.GuiEventListener; import net.minecraft.client.gui.narration.NarratableEntry; import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.Component; -#if PRE_MC_1_19 +#if PRE_MC_1_19_2 import net.minecraft.network.chat.TextComponent; #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 a892f1be1..402b10ac5 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 @@ -43,7 +43,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 +#if PRE_MC_1_19_2 import net.minecraft.network.chat.TextComponent; #endif import net.minecraft.server.level.ServerLevel; @@ -223,7 +223,7 @@ public class MinecraftClientWrapper implements IMinecraftClientWrapper, IMinecra { LocalPlayer p = getPlayer(); if (p == null) return; - #if PRE_MC_1_19 + #if PRE_MC_1_19_2 p.sendMessage(new TextComponent(string), getPlayer().getUUID()); #else p.sendSystemMessage(net.minecraft.network.chat.Component.translatable(string)); 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 32fef12a8..6ddc93225 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 @@ -138,7 +138,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper @Override public double getGamma() { - #if PRE_MC_1_19 + #if PRE_MC_1_19_2 return MC.options.gamma; #else return MC.options.gamma().get(); @@ -186,7 +186,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper @Override public int getRenderDistance() { - #if PRE_MC_1_18_1 + #if PRE_MC_1_18_2 //FIXME: How to resolve this? return MC.options.renderDistance; #else @@ -278,7 +278,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper try { LevelRenderer levelRenderer = MC.levelRenderer; Collection chunks = - #if PRE_MC_1_18_1 levelRenderer.renderChunks; + #if PRE_MC_1_18_2 levelRenderer.renderChunks; #else levelRenderer.renderChunkStorage.get().renderChunks; #endif return (chunks.stream().map((chunk) -> { 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 bb9ccf27e..228ef9e64 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 @@ -55,7 +55,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 +#if POST_MC_1_19_4 import net.minecraft.core.registries.Registries; #endif @@ -309,7 +309,7 @@ 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_1, level.registryAccess().registryOrThrow( + #if POST_MC_1_18_2, level.registryAccess().registryOrThrow( #if PRE_MC_1_19_4 Registry.BIOME_REGISTRY #else @@ -394,7 +394,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv { target = new ProtoChunk(chunkPos, UpgradeData.EMPTY #if POST_MC_1_17_1 , params.level #endif - #if POST_MC_1_18_1 , params.biomes, null #endif + #if POST_MC_1_18_2 , params.biomes, null #endif ); } return target; @@ -433,7 +433,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv } boolean isFull = target.getStatus() == ChunkStatus.FULL || target instanceof LevelChunk; - #if POST_MC_1_18_1 + #if POST_MC_1_18_2 boolean isPartial = target.isOldNoiseGeneration(); #endif if (isFull) @@ -441,7 +441,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_1 + #if POST_MC_1_18_2 else if (isPartial) { LOAD_LOGGER.info("Detected old existing chunk at {}", target.getPos()); @@ -582,7 +582,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv // that though is no longer needed... } - #if POST_MC_1_18_1 + #if POST_MC_1_18_2 if (chunk instanceof LevelChunk) { LevelChunk levelChunk = (LevelChunk) chunk; 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 1e585a64c..aabf8c6ff 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_1 +#if POST_MC_1_18_2 import net.minecraft.world.level.chunk.storage.ChunkScanAccess; #endif import net.minecraft.world.level.levelgen.WorldGenSettings; -#if PRE_MC_1_19 +#if PRE_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 POST_MC_1_19 +#if POST_MC_1_19_4 import net.minecraft.world.level.levelgen.WorldOptions; import net.minecraft.core.registries.Registries; #endif @@ -50,7 +50,7 @@ import net.minecraft.world.level.storage.WorldData; public final class GlobalParameters { public final ChunkGenerator generator; - #if PRE_MC_1_19 + #if PRE_MC_1_19_2 public final StructureManager structures; #else public final StructureTemplateManager structures; @@ -68,7 +68,7 @@ public final class GlobalParameters public final RegistryAccess registry; public final long worldSeed; public final DataFixer fixerUpper; - #if POST_MC_1_18_1 + #if POST_MC_1_18_2 public final BiomeManager biomeManager; public final ChunkScanAccess chunkScanner; // FIXME: Figure out if this is actually needed #endif @@ -92,14 +92,14 @@ public final class GlobalParameters biomes = registry.registryOrThrow(Registries.BIOME); worldSeed = worldOptions.seed(); #endif - #if POST_MC_1_18_1 + #if POST_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 POST_MC_1_19 + #if POST_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 7df0e1f2c..2c20b551d 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_1 +#if POST_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 POST_MC_1_18_1 + #if POST_MC_1_18_2 public StructureCheck structCheck; #endif boolean isValid = true; @@ -63,7 +63,7 @@ public final class ThreadedParameters previousGlobalParameters = param; this.level = param.level; - #if PRE_MC_1_18_1 + #if PRE_MC_1_18_2 this.structFeat = new WorldGenStructFeatManager(param.worldGenSettings, level); #elif PRE_MC_1_19 this.structCheck = this.createStructureCheck(param); @@ -81,14 +81,14 @@ 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_1, structCheck #endif); + structFeat = new WorldGenStructFeatManager(param.worldGenSettings, genLevel #if POST_MC_1_18_2, structCheck #endif); #else structFeat = new WorldGenStructFeatManager(param.worldOptions, genLevel, structCheck); #endif } - #if PRE_MC_1_19 + #if PRE_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 9ae23696c..8ffbb17d0 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 @@ -54,9 +54,9 @@ 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_1 +#if POST_MC_1_18_2 import net.minecraft.world.level.levelgen.blending.BlendingData; -#if PRE_MC_1_19 +#if PRE_MC_1_19_2 import net.minecraft.world.level.levelgen.feature.StructureFeature; #endif import net.minecraft.world.level.levelgen.structure.StructureStart; @@ -66,7 +66,7 @@ import net.minecraft.world.ticks.LevelChunkTicks; #if POST_MC_1_18_2 import net.minecraft.core.Holder; import net.minecraft.core.RegistryAccess; -#if PRE_MC_1_19 +#if PRE_MC_1_19_2 import net.minecraft.world.level.levelgen.feature.ConfiguredStructureFeature; #endif #endif @@ -78,9 +78,9 @@ import org.apache.logging.log4j.Logger; public class ChunkLoader { - #if POST_MC_1_19 + #if POST_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 POST_MC_1_18_1 + #elif POST_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"; @@ -90,7 +90,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_1 + #if POST_MC_1_18_2 private static BlendingData readBlendingData(CompoundTag chunkData) { BlendingData blendingData = null; @@ -106,7 +106,7 @@ public class ChunkLoader private static LevelChunkSection[] readSections(LevelAccessor level, LevelLightEngine lightEngine, ChunkPos chunkPos, CompoundTag chunkData) { - #if POST_MC_1_18_1 + #if POST_MC_1_18_2 #if PRE_MC_1_19_4 Registry biomes = level.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY); #else @@ -136,7 +136,7 @@ public class ChunkLoader CompoundTag tagSection = tagSections.getCompound(j); int sectionYPos = tagSection.getByte("Y"); - #if PRE_MC_1_18_1 + #if PRE_MC_1_18_2 if (tagSection.contains("Palette", 9) && tagSection.contains("BlockStates", 12)) { LevelChunkSection levelChunkSection = new LevelChunkSection(sectionYPos << 4); levelChunkSection.getStates().read(tagSection.getList("Palette", 10), @@ -225,7 +225,7 @@ public class ChunkLoader public static LevelChunk read(WorldGenLevel level, LevelLightEngine lightEngine, ChunkPos chunkPos, CompoundTag chunkData) { - #if PRE_MC_1_18_1 + #if PRE_MC_1_18_2 CompoundTag tagLevel = chunkData.getCompound("Level"); #else CompoundTag tagLevel = chunkData; @@ -238,12 +238,12 @@ public class ChunkLoader } ChunkStatus.ChunkType chunkType = readChunkType(tagLevel); - #if PRE_MC_1_18_1 + #if PRE_MC_1_18_2 if (chunkType != ChunkStatus.ChunkType.LEVELCHUNK) return null; #else BlendingData blendingData = readBlendingData(tagLevel); - #if PRE_MC_1_19 + #if PRE_MC_1_19_2 if (chunkType == ChunkStatus.ChunkType.PROTOCHUNK && (blendingData == null || !blendingData.oldNoise())) return null; #else @@ -261,7 +261,7 @@ public class ChunkLoader boolean isLightOn = tagLevel.getBoolean("isLightOn"); if (isLightOn) lightEngine.retainData(chunkPos, true); - #if PRE_MC_1_18_1 + #if PRE_MC_1_18_2 ChunkBiomeContainer chunkBiomeContainer = new ChunkBiomeContainer( level.getLevel().registryAccess().registryOrThrow(Registry.BIOME_REGISTRY)#if POST_MC_1_17_1, level #endif, chunkPos, level.getLevel().getChunkSource().getGenerator().getBiomeSource(), @@ -293,7 +293,7 @@ public class ChunkLoader LevelChunkSection[] levelChunkSections = readSections(level, lightEngine, chunkPos, tagLevel); // ====================== Make the chunk ========================= - #if PRE_MC_1_18_1 + #if PRE_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/LightedWorldGenRegion.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/LightedWorldGenRegion.java index 9d7a306cd..315ac4e42 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/LightedWorldGenRegion.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/LightedWorldGenRegion.java @@ -66,7 +66,7 @@ public class LightedWorldGenRegion extends WorldGenRegion private final List cache; Long2ObjectOpenHashMap chunkMap = new Long2ObjectOpenHashMap(); - #if PRE_MC_1_18_1 + #if PRE_MC_1_18_2 private ChunkPos overrideCenterPos = null; public void setOverrideCenter(ChunkPos pos) {overrideCenterPos = pos;} @@ -114,7 +114,7 @@ public class LightedWorldGenRegion extends WorldGenRegion if (k > this.writeRadius || l > this.writeRadius) { return false; } - #if POST_MC_1_18_1 + #if POST_MC_1_18_2 if (center.isUpgrading()) { LevelHeightAccessor levelHeightAccessor = center.getHeightAccessorForGeneration(); if (blockPos.getY() < levelHeightAccessor.getMinBuildHeight() || blockPos.getY() >= levelHeightAccessor.getMaxBuildHeight()) { @@ -220,7 +220,7 @@ public class LightedWorldGenRegion extends WorldGenRegion public ChunkAccess getChunk(int i, int j, ChunkStatus chunkStatus, boolean bl) { ChunkAccess chunk = getChunkAccess(i, j, chunkStatus, bl); if (chunk instanceof LevelChunk) { - chunk = new ImposterProtoChunk((LevelChunk) chunk #if POST_MC_1_18_1, true #endif); + chunk = new ImposterProtoChunk((LevelChunk) chunk #if POST_MC_1_18_2, true #endif); } return chunk; } @@ -284,7 +284,7 @@ public class LightedWorldGenRegion extends WorldGenRegion public int calculateBlockTint(BlockPos blockPos, ColorResolver colorResolver) { - #if PRE_MC_1_19 + #if PRE_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/WorldGenLevelLightEngine.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/WorldGenLevelLightEngine.java index 420bb78ad..f28ab6451 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/WorldGenLevelLightEngine.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/mimicObject/WorldGenLevelLightEngine.java @@ -221,7 +221,7 @@ public class WorldGenLevelLightEngine extends LevelLightEngine { if (!LevelChunkSection.isEmpty(levelChunkSection)) { updateSectionStatus(SectionPos.of(chunkPos, i), false); } - #elif PRE_MC_1_18_1 + #elif PRE_MC_1_18_2 if (!LevelChunkSection.isEmpty(levelChunkSection)) { int j = this.levelHeightAccessor.getSectionYFromSectionIndex(i); updateSectionStatus(SectionPos.of(chunkPos, j), 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 6dfab19f9..dbf5a0a86 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,41 +37,43 @@ 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 +#if PRE_MC_1_19_2 import net.minecraft.world.level.levelgen.feature.ConfiguredStructureFeature; import net.minecraft.world.level.StructureFeatureManager; #else +#if POST_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 POST_MC_1_18_1 +#if POST_MC_1_18_2 import net.minecraft.world.level.levelgen.structure.StructureCheck; #endif import net.minecraft.world.level.levelgen.structure.StructureStart; -#if PRE_MC_1_19 +#if PRE_MC_1_19_2 public class WorldGenStructFeatManager extends StructureFeatureManager { #else public class WorldGenStructFeatManager extends StructureManager { #endif final WorldGenLevel genLevel; - #if PRE_MC_1_19 + #if PRE_MC_1_19_4 WorldGenSettings worldGenSettings; #else WorldOptions worldOptions; #endif - #if POST_MC_1_18_1 + #if POST_MC_1_18_2 StructureCheck structureCheck; #endif - #if PRE_MC_1_19 + #if PRE_MC_1_19_4 public WorldGenStructFeatManager(WorldGenSettings worldGenSettings, - WorldGenLevel genLevel #if POST_MC_1_18_1 , StructureCheck structureCheck #endif ) { + WorldGenLevel genLevel #if POST_MC_1_18_2 , StructureCheck structureCheck #endif ) { - super(genLevel, worldGenSettings #if POST_MC_1_18_1 , structureCheck #endif ); + super(genLevel, worldGenSettings #if POST_MC_1_18_2 , structureCheck #endif ); this.genLevel = genLevel; this.worldGenSettings = worldGenSettings; } @@ -89,8 +91,8 @@ public class WorldGenStructFeatManager extends StructureManager { public WorldGenStructFeatManager forWorldGenRegion(WorldGenRegion worldGenRegion) { if (worldGenRegion == genLevel) return this; - #if PRE_MC_1_19 - return new WorldGenStructFeatManager(worldGenSettings, worldGenRegion #if POST_MC_1_18_1 , structureCheck #endif ); + #if PRE_MC_1_19_4 + return new WorldGenStructFeatManager(worldGenSettings, worldGenRegion #if POST_MC_1_18_2 , structureCheck #endif ); #else return new WorldGenStructFeatManager(worldOptions, worldGenRegion, structureCheck); #endif @@ -101,7 +103,7 @@ public class WorldGenStructFeatManager extends StructureManager { return genLevel.getChunk(x, z, status, false); } - #if PRE_MC_1_18_1 + #if PRE_MC_1_18_2 @Override public Stream> startsForFeature(SectionPos sectionPos2, StructureFeature structureFeature) { @@ -149,7 +151,7 @@ public class WorldGenStructFeatManager extends StructureManager { return builder.build(); } #else - #if PRE_MC_1_19 + #if PRE_MC_1_19_2 @Override public List startsForFeature(SectionPos sectionPos, Predicate> predicate) { ChunkAccess chunk = _getChunk(sectionPos.x(), sectionPos.z(), ChunkStatus.STRUCTURE_REFERENCES); 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 a2d4592fc..274d23bc4 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 @@ -26,12 +26,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 +#if PRE_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 POST_MC_1_18_1 +#if POST_MC_1_18_2 import net.minecraft.world.level.levelgen.blending.Blender; #endif @@ -64,12 +64,12 @@ public final class StepBiomes { for (ChunkAccess chunk : chunksToDo) { // System.out.println("StepBiomes: "+chunk.getPos()); - #if PRE_MC_1_18_1 + #if PRE_MC_1_18_2 environment.params.generator.createBiomes(environment.params.biomes, chunk); #elif PRE_MC_1_19 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_3 + #elif PRE_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 d543c36ea..7c1dd8857 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 @@ -31,7 +31,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_1 +#if POST_MC_1_18_2 #endif public final class StepFeatures { @@ -62,7 +62,7 @@ public final class StepFeatures { for (ChunkAccess chunk : chunksToDo) { try { - #if PRE_MC_1_18_1 + #if PRE_MC_1_18_2 worldGenRegion.setOverrideCenter(chunk.getPos()); environment.params.generator.applyBiomeDecoration(worldGenRegion, tParams.structFeat); Heightmap.primeHeightmaps(chunk, STATUS.heightmapsAfter()); diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepLight.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepLight.java index 0a0e6feff..5b232cf4c 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepLight.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/step/StepLight.java @@ -72,7 +72,7 @@ public final class StepLight { } catch (Exception e) { e.printStackTrace(); } - #if POST_MC_1_18_1 && PRE_MC_1_20_1 + #if POST_MC_1_18_2 && PRE_MC_1_20_1 if (chunk instanceof LevelChunk) ((LevelChunk)chunk).setClientLightReady(true); #elif POST_MC_1_20_1 lightEngine.setLightEnabled(chunk.getPos(), true); 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 708e2df1e..a10d3aaa7 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 @@ -29,12 +29,12 @@ import com.seibel.distanthorizons.core.util.objects.UncheckedInterruptedExceptio import net.minecraft.server.level.WorldGenRegion; #if POST_MC_1_17_1 #endif -#if PRE_MC_1_19 +#if PRE_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 POST_MC_1_18_1 +#if POST_MC_1_18_2 import net.minecraft.world.level.levelgen.blending.Blender; #endif @@ -69,7 +69,7 @@ public final class StepNoise { // System.out.println("StepNoise: "+chunk.getPos()); #if PRE_MC_1_17_1 environment.params.generator.fillFromNoise(worldGenRegion, tParams.structFeat, chunk); - #elif PRE_MC_1_18_1 + #elif PRE_MC_1_18_2 chunk = environment.joinSync(environment.params.generator.fillFromNoise(Runnable::run, tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk)); #elif PRE_MC_1_19 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 398a3a2e0..3d44e6e86 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 @@ -26,7 +26,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 +#if PRE_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 ec54401e3..ec22126a9 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 @@ -72,18 +72,20 @@ public final class StepStructureStart } } - #if PRE_MC_1_19 + #if PRE_MC_1_19_2 if (environment.params.worldGenSettings.generateFeatures()) { - #elif POST_MC_1_19 + #elif PRE_MC_1_19_4 + if (environment.params.worldGenSettings.generateStructures()) { + #else if (environment.params.worldOptions.generateStructures()) { #endif for (ChunkAccess chunk : chunksToDo) { // System.out.println("StepStructureStart: "+chunk.getPos()); - #if PRE_MC_1_19 + #if PRE_MC_1_19_2 environment.params.generator.createStructures(environment.params.registry, tParams.structFeat, chunk, environment.params.structures, environment.params.worldSeed); - #elif PRE_MC_1_19_3 + #elif PRE_MC_1_19_4 environment.params.generator.createStructures(environment.params.registry, environment.params.randomState, tParams.structFeat, chunk, environment.params.structures, environment.params.worldSeed); #else @@ -91,7 +93,7 @@ public final class StepStructureStart environment.params.level.getChunkSource().getGeneratorState(), tParams.structFeat, chunk, environment.params.structures); #endif - #if POST_MC_1_18_1 + #if POST_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 8ad23bad3..112969c5e 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 @@ -58,7 +58,7 @@ public final class StepSurface { for (ChunkAccess chunk : chunksToDo) { // System.out.println("StepSurface: "+chunk.getPos()); - #if PRE_MC_1_18_1 + #if PRE_MC_1_18_2 environment.params.generator.buildSurfaceAndBedrock(worldGenRegion, chunk); #elif PRE_MC_1_19 environment.params.generator.buildSurface(worldGenRegion, tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk); diff --git a/common/src/main/resources/1_19_2.distanthorizons.accesswidener b/common/src/main/resources/1_19_2.distanthorizons.accesswidener new file mode 100644 index 000000000..bd847717b --- /dev/null +++ b/common/src/main/resources/1_19_2.distanthorizons.accesswidener @@ -0,0 +1,39 @@ +accessWidener v1 named + +# used when determining where to save files to +accessible field net/minecraft/world/level/storage/DimensionDataStorage dataFolder Ljava/io/File; + +# used when rendering +accessible method net/minecraft/client/renderer/GameRenderer getFov (Lnet/minecraft/client/Camera;FZ)D + +# used for grabbing vanilla rendered chunks +accessible field net/minecraft/client/renderer/LevelRenderer renderChunkStorage Ljava/util/concurrent/atomic/AtomicReference; +accessible class net/minecraft/client/renderer/LevelRenderer$RenderChunkStorage +accessible class net/minecraft/client/renderer/LevelRenderer$RenderChunkInfo +accessible field net/minecraft/client/renderer/LevelRenderer$RenderChunkInfo chunk Lnet/minecraft/client/renderer/chunk/ChunkRenderDispatcher$RenderChunk; + +# world generation +accessible method net/minecraft/world/level/lighting/LayerLightEngine queueSectionData (JLnet/minecraft/world/level/chunk/DataLayer;Z)V +accessible field net/minecraft/world/level/chunk/LevelChunk loaded Z + +# lod generation from save file +accessible field net/minecraft/world/level/chunk/storage/ChunkStorage worker Lnet/minecraft/world/level/chunk/storage/IOWorker; +accessible field net/minecraft/world/level/chunk/storage/IOWorker storage Lnet/minecraft/world/level/chunk/storage/RegionFileStorage; +accessible field net/minecraft/world/level/chunk/storage/RegionFileStorage regionCache Lit/unimi/dsi/fastutil/longs/Long2ObjectLinkedOpenHashMap; +accessible field net/minecraft/world/level/chunk/storage/RegionFileStorage folder Ljava/nio/file/Path; + +# grabbing textures +accessible field net/minecraft/client/renderer/texture/TextureAtlasSprite animatedTexture Lnet/minecraft/client/renderer/texture/TextureAtlasSprite$AnimatedTexture; +accessible field net/minecraft/client/renderer/texture/TextureAtlasSprite width I +accessible field net/minecraft/client/renderer/texture/TextureAtlasSprite height I +accessible field net/minecraft/client/renderer/texture/TextureAtlasSprite mainImage [Lcom/mojang/blaze3d/platform/NativeImage; +accessible class net/minecraft/client/renderer/texture/TextureAtlasSprite$AnimatedTexture +accessible method net/minecraft/client/renderer/texture/TextureAtlasSprite$AnimatedTexture getFrameX (I)I +accessible method net/minecraft/client/renderer/texture/TextureAtlasSprite$AnimatedTexture getFrameY (I)I +extendable class com/mojang/math/Matrix4f + + +# hacky stuff +accessible field net/minecraft/util/ThreadingDetector lock Ljava/util/concurrent/Semaphore; +mutable field net/minecraft/util/ThreadingDetector lock Ljava/util/concurrent/Semaphore; +accessible field net/minecraft/client/gui/components/AbstractSelectionList scrollAmount D # Hack to bypass vanilla's setScrollAmount's clamp diff --git a/common/src/main/resources/1_19.distanthorizons.accesswidener b/common/src/main/resources/1_19_4.distanthorizons.accesswidener similarity index 100% rename from common/src/main/resources/1_19.distanthorizons.accesswidener rename to common/src/main/resources/1_19_4.distanthorizons.accesswidener diff --git a/coreSubProjects b/coreSubProjects index 98634e2a0..e2a3f23e9 160000 --- a/coreSubProjects +++ b/coreSubProjects @@ -1 +1 @@ -Subproject commit 98634e2a0b3f965f57b7fc886c38e895554be06d +Subproject commit e2a3f23e9172cf947e12ba0df82b91861f2b7280 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 17818f2c3..4e67240bb 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricClientProxy.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricClientProxy.java @@ -97,7 +97,7 @@ public class FabricClientProxy // ClientChunkLoadEvent // TODO: Is using setClientLightReady one still better? - //#if PRE_MC_1_18_1 // in 1.18+, we use mixin hook in setClientLightReady(true) + //#if PRE_MC_1_18_2 // in 1.18+, we use mixin hook in setClientLightReady(true) ClientChunkEvents.CHUNK_LOAD.register((level, chunk) -> { ClientLevelWrapper wrappedLevel = ClientLevelWrapper.getWrapper(level); 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 0ff222d21..cee606b3f 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 @@ -44,13 +44,13 @@ public class MixinClientLevel // @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_1 int j, #endif Supplier supplier, LevelRenderer levelRenderer, boolean bl, long l, CallbackInfo ci) +// #if POST_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 POST_MC_1_18_1 && PRE_MC_1_20_1 // Only the setLightReady is only available after 1.18. This ensures the light data is ready. + #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. @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 240029c97..7a282532b 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 @@ -40,7 +40,7 @@ public class MixinClientPacketListener @Inject(method = "handleRespawn", at = @At("RETURN")) void onHandleRespawnEnd(CallbackInfo ci) { ClientApi.INSTANCE.clientLevelLoadEvent(ClientLevelWrapper.getWrapper(level)); } - #if PRE_MC_1_19 + #if PRE_MC_1_19_4 @Inject(method = "cleanup", at = @At("HEAD")) #else @Inject(method = "close", at = @At("HEAD")) 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 a9f0d2b72..e38c60e89 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 @@ -47,7 +47,7 @@ public class MixinFogRenderer { private static final float A_EVEN_LARGER_VALUE = 42069420694206942069.F; @Inject(at = @At("RETURN"), method = "setupFog") - #if PRE_MC_1_19 + #if PRE_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) { 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 3391a5547..acd8f5d81 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 +#if PRE_MC_1_19_2 import net.minecraft.network.chat.TranslatableComponent; #endif import net.minecraft.resources.ResourceLocation; @@ -68,7 +68,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 + #if PRE_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/server/MixinChunkGenerator.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinChunkGenerator.java index 6d7e961d9..5d70059d7 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_1 +#if PRE_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/MixinUtilBackgroundThread.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/server/MixinUtilBackgroundThread.java index eb1d2e055..0d11a7f9d 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 @@ -61,7 +61,7 @@ public class MixinUtilBackgroundThread } } #endif - #if POST_MC_1_18_1 + #if POST_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 22f0ad6c7..dd05d29f4 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_1 +#if POST_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 33c13c956..f3b4c1e55 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 @@ -64,7 +64,7 @@ public class SodiumAccessor implements ISodiumAccessor { SodiumWorldRenderer renderer = SodiumWorldRenderer.instance(); LevelHeightAccessor height = Minecraft.getInstance().level; - #if POST_MC_1_18_1 + #if POST_MC_1_18_2 // 0b11 = Lighted chunk & loaded chunk return renderer.getChunkTracker().getChunks(0b00).filter( (long l) -> { 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 1ba0a8356..d1e184feb 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeClientProxy.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeClientProxy.java @@ -27,7 +27,7 @@ import com.seibel.distanthorizons.core.wrapperInterfaces.chunk.IChunkWrapper; import net.minecraft.world.level.LevelAccessor; import net.minecraft.client.multiplayer.ClientLevel; -#if PRE_MC_1_19 +#if PRE_MC_1_19_2 import net.minecraftforge.event.world.ChunkEvent; import net.minecraftforge.event.world.WorldEvent; #else @@ -54,7 +54,7 @@ import net.minecraftforge.eventbus.api.SubscribeEvent; */ public class ForgeClientProxy { - #if PRE_MC_1_19 + #if PRE_MC_1_19_2 private static LevelAccessor GetLevel(WorldEvent e) { return e.getWorld(); } #else private static LevelAccessor GetLevel(LevelEvent e) { return e.getLevel(); } @@ -117,7 +117,7 @@ public class ForgeClientProxy // Register KeyBindings @SubscribeEvent - public void registerKeyBindings(#if PRE_MC_1_19 InputEvent.KeyInputEvent #else InputEvent.Key #endif event) + public void registerKeyBindings(#if PRE_MC_1_19_2 InputEvent.KeyInputEvent #else InputEvent.Key #endif event) { if (Minecraft.getInstance().player == null) return; if (event.getAction() != GLFW.GLFW_PRESS) return; 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 44934ff0b..de7048ba1 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeMain.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeMain.java @@ -38,7 +38,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 +#if POST_MC_1_19_2 import net.minecraft.util.RandomSource; #endif import net.minecraft.world.level.ColorResolver; @@ -63,7 +63,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 +#if PRE_MC_1_19_2 import net.minecraftforge.client.model.data.ModelDataMap; import java.util.Random; #else @@ -168,13 +168,13 @@ public class ForgeMain implements LodForgeMethodCaller #endif @Override - #if PRE_MC_1_19 + #if PRE_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); } #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, RenderType.solid() #endif); + return mc.getModelManager().getBlockModelShaper().getBlockModel(block.defaultBlockState()).getQuads(blockState, direction, random, modelData #if POST_MC_1_19_2, RenderType.solid() #endif); } #endif 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 cd93deb36..05011d444 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeServerProxy.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/ForgeServerProxy.java @@ -17,7 +17,7 @@ import net.minecraft.world.level.LevelAccessor; import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.server.ServerAboutToStartEvent; import net.minecraftforge.event.server.ServerStoppingEvent; -#if PRE_MC_1_19 +#if PRE_MC_1_19_2 import net.minecraftforge.event.world.ChunkEvent; import net.minecraftforge.event.world.WorldEvent; #else @@ -31,7 +31,7 @@ import java.util.function.Supplier; public class ForgeServerProxy { - #if PRE_MC_1_19 + #if PRE_MC_1_19_2 private static LevelAccessor GetLevel(WorldEvent e) { return e.getWorld(); } #else private static LevelAccessor GetLevel(LevelEvent e) { return e.getLevel(); } 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 f52d5e66d..c3e956bf3 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 @@ -38,7 +38,7 @@ public class MixinClientPacketListener @Inject(method = "handleRespawn", at = @At("RETURN")) void onHandleRespawnEnd(CallbackInfo ci) { ClientApi.INSTANCE.clientLevelLoadEvent(ClientLevelWrapper.getWrapper(level)); } - #if PRE_MC_1_19 + #if PRE_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/MixinOptionsScreen.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinOptionsScreen.java index 58a2ffa13..0116bf190 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 +#if PRE_MC_1_19_2 import net.minecraft.network.chat.TranslatableComponent; #endif import net.minecraft.resources.ResourceLocation; @@ -68,7 +68,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 + #if PRE_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 5c6b295a9..86229a7b0 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_1 +#if PRE_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/MixinUtilBackgroundThread.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/server/MixinUtilBackgroundThread.java index 59606495d..fc3ae6dee 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 @@ -61,7 +61,7 @@ public class MixinUtilBackgroundThread } } #endif - #if POST_MC_1_18_1 + #if POST_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 09115940a..4f25ddfb1 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 @@ -19,7 +19,7 @@ package com.seibel.distanthorizons.forge.mixins.server.unsafe; import org.spongepowered.asm.mixin.Mixin; -#if POST_MC_1_18_1 +#if POST_MC_1_18_2 import net.minecraft.util.ThreadingDetector; import org.spongepowered.asm.mixin.Mutable; diff --git a/gradle.properties b/gradle.properties index b9a94aac6..ee05a65ce 100644 --- a/gradle.properties +++ b/gradle.properties @@ -33,4 +33,4 @@ versionStr= # This defines what MC version Intellij will use for the preprocessor # and what version is used automatically by build and run commands -mcVer=1.18.2 +mcVer=1.19.2 diff --git a/versionProperties/1.18.1.properties b/versionProperties/1.18.1.properties deleted file mode 100644 index ad70e49b4..000000000 --- a/versionProperties/1.18.1.properties +++ /dev/null @@ -1,50 +0,0 @@ -# @Depricated -# Support will be removed soon - -# 1.18.1 version - - - -#java_version = 17 -#minecraft_version=1.18.1 -#parchment_version=2022.03.06 -#compatible_minecraft_versions=["1.18", "1.18.1"] -#accessWidenerVersion=1_18 -#builds_for=fabric,forge -# -## Fabric loader -#fabric_loader_version=0.13.3 -#fabric_api_version=0.46.6+1.18 -# # Fabric mod versions -# modmenu_version=3.0.1 -# starlight_version_fabric=3554912 -# phosphor_version_fabric=3573395 -# lithium_version=mc1.18.1-0.7.7 -# sodium_version=mc1.18.1-0.4.0-alpha6 -# iris_version=1.18.x-v1.2.5 -# bclib_version=1.2.5 -# immersive_portals_version=v1.0.4-1.18 -# -# # 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=0 -# enable_bclib=0 -# -## Forge loader -#forge_version=39.1.2 -# # Forge mod versions -# starlight_version_forge=3559934 -# 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 diff --git a/versionProperties/1.19.2.properties b/versionProperties/1.19.2.properties index 4a5b258fd..136714073 100644 --- a/versionProperties/1.19.2.properties +++ b/versionProperties/1.19.2.properties @@ -3,7 +3,7 @@ java_version = 17 minecraft_version=1.19.2 parchment_version=1.19.2:2022.11.27 compatible_minecraft_versions=["1.19.2"] -accessWidenerVersion=1_19 +accessWidenerVersion=1_19_2 builds_for=fabric,forge # Fabric loader diff --git a/versionProperties/1.19.4.properties b/versionProperties/1.19.4.properties index 33bcf8e31..0b9afab72 100644 --- a/versionProperties/1.19.4.properties +++ b/versionProperties/1.19.4.properties @@ -3,7 +3,7 @@ java_version = 17 minecraft_version=1.19.4 parchment_version=1.19.3:2023.03.12 compatible_minecraft_versions=["1.19.4"] -accessWidenerVersion=1_19 +accessWidenerVersion=1_19_4 builds_for=fabric,forge # Fabric loader diff --git a/versionProperties/1.19.properties b/versionProperties/1.19.properties deleted file mode 100644 index 94a8eed32..000000000 --- a/versionProperties/1.19.properties +++ /dev/null @@ -1,47 +0,0 @@ -# 1.19 version -java_version = 17 -minecraft_version=1.19 -parchment_version=1.19.2:2022.11.27 -compatible_minecraft_versions=["1.19"] -accessWidenerVersion=1_19 -builds_for=fabric,forge - -# Fabric loader -fabric_loader_version=0.14.21 -fabric_api_version=0.58.0+1.19 - # Fabric mod versions - modmenu_version=4.0.4 - starlight_version_fabric= - phosphor_version_fabric= - lithium_version= - sodium_version=mc1.19.2-0.4.4 - iris_version=1.6.4+1.19.2 - bclib_version=2.1.6 - immersive_portals_version= - canvas_version=mc119-1.0.2453 - - # 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=0 - enable_bclib=1 - enable_immersive_portals=0 - enable_canvas=0 - -# Forge loader -forge_version=41.1.0 - # 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