fix compiling for MC 1.20 and older

This commit is contained in:
James Seibel
2026-05-18 07:21:34 -05:00
parent 0cb3716dc7
commit ab055f1a0e
6 changed files with 20 additions and 4 deletions
@@ -1,5 +1,9 @@
package com.seibel.distanthorizons.common.render.blaze.wrappers;
#if MC_VER <= MC_1_21_10
public class BlazeVertexFormatBuilder {}
#else
import com.mojang.blaze3d.vertex.VertexFormat;
import com.mojang.blaze3d.vertex.VertexFormatElement;
import com.seibel.distanthorizons.common.render.blaze.util.BlazeDhVertexFormatUtil;
@@ -51,3 +55,4 @@ public class BlazeVertexFormatBuilder
}
#endif
@@ -1,5 +1,9 @@
package com.seibel.distanthorizons.common.render.blaze.wrappers;
#if MC_VER <= MC_1_21_10
public class RenderPassWrapper {}
#else
import com.mojang.blaze3d.buffers.GpuBuffer;
import com.mojang.blaze3d.pipeline.RenderPipeline;
import com.mojang.blaze3d.systems.CommandEncoder;
@@ -155,3 +159,4 @@ public class RenderPassWrapper implements AutoCloseable
}
#endif
@@ -1,5 +1,9 @@
package com.seibel.distanthorizons.common.render.blaze.wrappers.texture;
#if MC_VER <= MC_1_21_10
public interface IDhBlazeTexture {}
#else
import com.mojang.blaze3d.textures.GpuSampler;
import com.mojang.blaze3d.textures.GpuTextureView;
@@ -10,3 +14,4 @@ public interface IDhBlazeTexture
GpuSampler getTextureSampler();
}
#endif
@@ -102,7 +102,7 @@ public class DependencySetup
renderingApiEnum = versionConstants.getDefaultRenderingApi();
}
LOGGER.info("Setting DH Rendering API to: ["+renderingApiEnum+"].");
LOGGER.info("Setting DH Rendering API to: ["+renderingApiEnum+"]...");
@@ -151,6 +151,7 @@ public class DependencySetup
renderDefinition.bindRenderers();
LOGGER.info("DH Rendering successfully bound to: ["+renderDefinition.getApiName()+"]...");
}