From 7f89a1a2cc86ccbd5fb8841cea55ef18a73669d4 Mon Sep 17 00:00:00 2001 From: coolGi Date: Sun, 24 Dec 2023 21:32:21 +1030 Subject: [PATCH] Fixed 1.16.5 & 1.17.1 compilation --- .../common/wrappers/WrapperFactory.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 a9074135f..2f922e3d8 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 @@ -39,7 +39,9 @@ import com.seibel.distanthorizons.core.wrapperInterfaces.world.IBiomeWrapper; import com.seibel.distanthorizons.core.wrapperInterfaces.world.ILevelWrapper; import com.seibel.distanthorizons.core.wrapperInterfaces.worldGeneration.AbstractBatchGenerationEnvironmentWrapper; import net.minecraft.client.multiplayer.ClientLevel; +#if MC_VER > MC_1_17_1 import net.minecraft.core.Holder; +#endif import net.minecraft.server.level.ServerLevel; import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelReader; @@ -298,11 +300,13 @@ public class WrapperFactory implements IWrapperFactory { String[] expectedClassNames; - #if MC_VER <= MC_1_20_4 + #if MC_VER == MC_1_16_5 || MC_VER == MC_1_17_1 + expectedClassNames = new String[] { Biome.class.getName() }; + #elif MC_VER <= MC_1_20_4 expectedClassNames = new String[] { Holder.class.getName()+"<"+Biome.class.getName()+">" }; #else - // See preprocessor comment in createChunkWrapper() for full documentation - not implemented for this version of Minecraft! + // See preprocessor comment in createChunkWrapper() for full documentation + not implemented for this version of Minecraft! #endif return createWrapperErrorMessage("BlockState wrapper", expectedClassNames, objectArray);