update fabric/neo api methods
This commit is contained in:
@@ -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());
|
||||
|
||||
-1
@@ -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;
|
||||
|
||||
+9
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user