update fabric/neo api methods

This commit is contained in:
James Seibel
2026-04-05 17:23:48 -05:00
parent 9b9e6b9179
commit cfd47adfda
5 changed files with 75 additions and 13 deletions
@@ -218,8 +218,13 @@ public class NeoforgeClientProxy implements AbstractModInitializer.IEventProxy
#else
#if MC_VER <= MC_1_21_11
@SubscribeEvent
public void afterLevelEntityRenderEvent(RenderLevelStageEvent.AfterEntities event)
#else
@SubscribeEvent
public void afterLevelEntityRenderEvent(RenderLevelStageEvent.AfterOpaqueFeatures event)
#endif
{
#if MC_VER < MC_1_21_9
ClientApi.RENDER_STATE.clientLevelWrapper = ClientLevelWrapper.getWrapperIfDifferent(ClientApi.RENDER_STATE.clientLevelWrapper, (ClientLevel)event.getLevel());
@@ -9,7 +9,6 @@ import com.seibel.distanthorizons.core.logging.DhLogger;
#else
import com.mojang.blaze3d.opengl.GlTexture;
import com.mojang.blaze3d.textures.GpuTexture;
import net.neoforged.neoforge.client.blaze3d.validation.ValidationGpuTexture;
#endif
import java.lang.invoke.MethodHandles;
@@ -7,7 +7,12 @@ public class NeoforgeTextureUnwrapper
import com.mojang.blaze3d.opengl.GlTexture;
import com.mojang.blaze3d.textures.GpuTexture;
#if MC_VER <= MC_1_21_11
import net.neoforged.neoforge.client.blaze3d.validation.ValidationGpuTexture;
#else
#endif
public class NeoforgeTextureUnwrapper
{
@@ -21,6 +26,7 @@ public class NeoforgeTextureUnwrapper
{
GlTexture glTexture;
#if MC_VER <= MC_1_21_11
if (gpuTexture instanceof ValidationGpuTexture)
{
ValidationGpuTexture validationTexture = (ValidationGpuTexture) gpuTexture;
@@ -30,6 +36,9 @@ public class NeoforgeTextureUnwrapper
{
glTexture = (GlTexture) gpuTexture;
}
#else
glTexture = (GlTexture) gpuTexture;
#endif
int id = glTexture.glId();
return id;