Fix a few compiler errors for old MC versions
This commit is contained in:
+8
-1
@@ -35,7 +35,14 @@ 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", "1.20.4", "1.20.6", "1.21.1", "1.21.3", "1.21.4", "1.21.5", "1.21.6", "1.21.8", "1.21.9"]
|
||||
- MC_VER: [
|
||||
"1.21.9", "1.21.8", "1.21.6", "1.21.5", "1.21.4", "1.21.3", "1.21.1",
|
||||
"1.20.6", "1.20.4", "1.20.2", "1.20.1",
|
||||
"1.19.4", "1.19.2",
|
||||
"1.18.2",
|
||||
"1.17.1",
|
||||
"1.16.5"
|
||||
]
|
||||
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/;
|
||||
|
||||
+4
-2
@@ -76,9 +76,11 @@ import net.minecraft.world.level.levelgen.NoiseBasedChunkGenerator;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
||||
#if MC_VER >= MC_1_19_4
|
||||
import net.minecraft.core.registries.Registries;
|
||||
#if MC_VER <= MC_1_17_1
|
||||
#elif MC_VER <= MC_1_19_2
|
||||
import net.minecraft.core.Registry;
|
||||
#else
|
||||
import net.minecraft.core.registries.Registries;
|
||||
#endif
|
||||
|
||||
#if MC_VER <= MC_1_20_4
|
||||
|
||||
+5
-2
@@ -26,7 +26,6 @@ import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftRen
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.world.IClientLevelWrapper;
|
||||
import net.minecraft.client.renderer.LightTexture;
|
||||
|
||||
import net.neoforged.neoforge.client.blaze3d.validation.ValidationGpuTexture;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
@@ -38,10 +37,14 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import com.mojang.blaze3d.platform.NativeImage;
|
||||
#elif MC_VER < MC_1_21_5
|
||||
import com.mojang.blaze3d.pipeline.TextureTarget;
|
||||
#else
|
||||
#elif MC_VER < MC_1_21_9
|
||||
import com.mojang.blaze3d.opengl.GlTexture;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import com.mojang.blaze3d.textures.GpuTexture;
|
||||
#else
|
||||
import net.neoforged.neoforge.client.blaze3d.validation.ValidationGpuTexture;
|
||||
import com.mojang.blaze3d.opengl.GlTexture;
|
||||
import com.mojang.blaze3d.textures.GpuTexture;
|
||||
#endif
|
||||
|
||||
@Mixin(LightTexture.class)
|
||||
|
||||
+6
-2
@@ -1,7 +1,5 @@
|
||||
package com.seibel.distanthorizons.neoforge.wrappers;
|
||||
|
||||
import com.mojang.blaze3d.opengl.GlTexture;
|
||||
import com.mojang.blaze3d.textures.GpuTexture;
|
||||
import com.seibel.distanthorizons.common.wrappers.minecraft.MinecraftRenderWrapper;
|
||||
import com.seibel.distanthorizons.core.logging.DhLoggerBuilder;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -9,6 +7,8 @@ import org.apache.logging.log4j.Logger;
|
||||
|
||||
#if MC_VER < MC_1_21_9
|
||||
#else
|
||||
import com.mojang.blaze3d.opengl.GlTexture;
|
||||
import com.mojang.blaze3d.textures.GpuTexture;
|
||||
import net.neoforged.neoforge.client.blaze3d.validation.ValidationGpuTexture;
|
||||
#endif
|
||||
|
||||
@@ -54,6 +54,7 @@ public class NeoforgeMinecraftRenderWrapper extends MinecraftRenderWrapper
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColorTextureId()
|
||||
{
|
||||
@@ -85,4 +86,7 @@ public class NeoforgeMinecraftRenderWrapper extends MinecraftRenderWrapper
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user