Fix a few compiler errors for old MC versions
This commit is contained in:
+8
-1
@@ -35,7 +35,14 @@ build:
|
|||||||
stage: build
|
stage: build
|
||||||
parallel:
|
parallel:
|
||||||
matrix:
|
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:
|
script:
|
||||||
# this both runs the unit tests and assembles the code
|
# 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/;
|
- ./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 net.minecraft.nbt.CompoundTag;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
|
||||||
#if MC_VER >= MC_1_19_4
|
#if MC_VER <= MC_1_17_1
|
||||||
import net.minecraft.core.registries.Registries;
|
#elif MC_VER <= MC_1_19_2
|
||||||
|
import net.minecraft.core.Registry;
|
||||||
#else
|
#else
|
||||||
|
import net.minecraft.core.registries.Registries;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if MC_VER <= MC_1_20_4
|
#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 com.seibel.distanthorizons.core.wrapperInterfaces.world.IClientLevelWrapper;
|
||||||
import net.minecraft.client.renderer.LightTexture;
|
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.Final;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
@@ -38,10 +37,14 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||||||
import com.mojang.blaze3d.platform.NativeImage;
|
import com.mojang.blaze3d.platform.NativeImage;
|
||||||
#elif MC_VER < MC_1_21_5
|
#elif MC_VER < MC_1_21_5
|
||||||
import com.mojang.blaze3d.pipeline.TextureTarget;
|
import com.mojang.blaze3d.pipeline.TextureTarget;
|
||||||
#else
|
#elif MC_VER < MC_1_21_9
|
||||||
import com.mojang.blaze3d.opengl.GlTexture;
|
import com.mojang.blaze3d.opengl.GlTexture;
|
||||||
import com.mojang.blaze3d.systems.RenderSystem;
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
import com.mojang.blaze3d.textures.GpuTexture;
|
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
|
#endif
|
||||||
|
|
||||||
@Mixin(LightTexture.class)
|
@Mixin(LightTexture.class)
|
||||||
|
|||||||
+6
-2
@@ -1,7 +1,5 @@
|
|||||||
package com.seibel.distanthorizons.neoforge.wrappers;
|
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.common.wrappers.minecraft.MinecraftRenderWrapper;
|
||||||
import com.seibel.distanthorizons.core.logging.DhLoggerBuilder;
|
import com.seibel.distanthorizons.core.logging.DhLoggerBuilder;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
@@ -9,6 +7,8 @@ import org.apache.logging.log4j.Logger;
|
|||||||
|
|
||||||
#if MC_VER < MC_1_21_9
|
#if MC_VER < MC_1_21_9
|
||||||
#else
|
#else
|
||||||
|
import com.mojang.blaze3d.opengl.GlTexture;
|
||||||
|
import com.mojang.blaze3d.textures.GpuTexture;
|
||||||
import net.neoforged.neoforge.client.blaze3d.validation.ValidationGpuTexture;
|
import net.neoforged.neoforge.client.blaze3d.validation.ValidationGpuTexture;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -54,6 +54,7 @@ public class NeoforgeMinecraftRenderWrapper extends MinecraftRenderWrapper
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getColorTextureId()
|
public int getColorTextureId()
|
||||||
{
|
{
|
||||||
@@ -85,4 +86,7 @@ public class NeoforgeMinecraftRenderWrapper extends MinecraftRenderWrapper
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user