diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d58c6e3c6..c6c9452d3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,8 @@ image: gradle:eclipse-temurin # all stages need to be defined here stages: - # TODO: Make stages depending on what is in versionProperties + # TODO: Make stages depend on what is in versionProperties + - build_1_16_5 - build_1_18_2 - build_1_19_2 - build_1_19_4 @@ -54,6 +55,13 @@ variables: extends: .build_java +# 1.16.5 build +build_1_16_5: + stage: build_1_16_5 + variables: + MC_VER: "1.16.5" + extends: .build_mc + # 1.18.2 build build_1_18_2: stage: build_1_18_2 @@ -130,7 +138,7 @@ pages: -# ============================== Previos CI for future reference ============================== # +# ============================== Previous CI for future reference ============================== # ## all stages need to be defined here # # Don't build the standalone jar yet because it isn't done yet # # - build_standalone 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 694776769..2d86d91df 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 @@ -40,7 +40,7 @@ import net.minecraft.data.worldgen.biome.NetherBiomes; #if MC_1_16_5 import net.minecraft.core.Registry; -#elif MC_1_18_2 +#elif MC_1_18_2 || MC_1_19_2 import net.minecraft.core.Holder; import net.minecraft.core.Registry; import net.minecraft.core.RegistryAccess; @@ -110,7 +110,7 @@ public class BiomeWrapper implements IBiomeWrapper ResourceLocation resourceLocation; #if MC_1_16_5 resourceLocation = registryAccess.registryOrThrow(Registry.BIOME_REGISTRY).getKey(this.biome); - #elif MC_1_18_2 + #elif MC_1_18_2 || MC_1_19_2 resourceLocation = registryAccess.registryOrThrow(Registry.BIOME_REGISTRY).getKey(this.biome.value()); #else resourceLocation = registryAccess.registryOrThrow(Registries.BIOME).getKey(this.biome.value()); @@ -152,7 +152,7 @@ public class BiomeWrapper implements IBiomeWrapper #if MC_1_16_5 Biome biome = registryAccess.registryOrThrow(Registry.BIOME_REGISTRY).get(resourceLocation); - #elif MC_1_18_2 + #elif MC_1_18_2 || MC_1_19_2 Biome unwrappedBiome = registryAccess.registryOrThrow(Registry.BIOME_REGISTRY).get(resourceLocation); Holder biome = new Holder.Direct<>(unwrappedBiome); #else 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 65397f3bb..db4237fc9 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 @@ -16,7 +16,7 @@ import java.util.concurrent.ConcurrentHashMap; #if MC_1_16_5 import net.minecraft.core.Registry; -#elif MC_1_18_2 +#elif MC_1_18_2 || MC_1_19_2 import net.minecraft.client.Minecraft; import net.minecraft.core.BlockPos; import net.minecraft.core.Registry; @@ -103,7 +103,7 @@ public class BlockStateWrapper implements IBlockStateWrapper ResourceLocation resourceLocation; #if MC_1_16_5 resourceLocation = Registry.BLOCK.getKey(this.blockState.getBlock()); - #elif MC_1_18_2 + #elif MC_1_18_2 || MC_1_19_2 net.minecraft.core.RegistryAccess registryAccess = Minecraft.getInstance().level.registryAccess(); resourceLocation = registryAccess.registryOrThrow(Registry.BLOCK_REGISTRY).getKey(this.blockState.getBlock()); #else @@ -150,7 +150,7 @@ public class BlockStateWrapper implements IBlockStateWrapper Block block; #if MC_1_16_5 block = Registry.BLOCK.get(resourceLocation); - #elif MC_1_18_2 + #elif MC_1_18_2 || MC_1_19_2 net.minecraft.core.RegistryAccess registryAccess = Minecraft.getInstance().level.registryAccess(); block = registryAccess.registryOrThrow(Registry.BLOCK_REGISTRY).get(resourceLocation); #else