mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 15:03:04 +00:00
Add projection matrix to RenderWorldLastEvent (#6536)
This commit is contained in:
1 parent
58e5f33fad
commit
202ae50820
3 files changed
+33
-1
No files matched your search
@@ -21,6 +21,7 @@ package net.minecraftforge.client.event;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
|
||||
import net.minecraft.client.renderer.Matrix4f;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
|
||||
public class RenderWorldLastEvent extends net.minecraftforge.eventbus.api.Event
|
||||
@@ -28,11 +29,26 @@ public class RenderWorldLastEvent extends net.minecraftforge.eventbus.api.Event
|
||||
private final WorldRenderer context;
|
||||
private final MatrixStack mat;
|
||||
private final float partialTicks;
|
||||
private final Matrix4f projectionMatrix;
|
||||
private final long finishTimeNano;
|
||||
|
||||
@Deprecated // TODO: Remove in 1.16
|
||||
public RenderWorldLastEvent(WorldRenderer context, MatrixStack mat, float partialTicks)
|
||||
{
|
||||
this.context = context;
|
||||
this.mat = mat;
|
||||
this.partialTicks = partialTicks;
|
||||
this.projectionMatrix = null;
|
||||
this.finishTimeNano = 0;
|
||||
}
|
||||
|
||||
public RenderWorldLastEvent(WorldRenderer context, MatrixStack mat, float partialTicks, Matrix4f projectionMatrix, long finishTimeNano)
|
||||
{
|
||||
this.context = context;
|
||||
this.mat = mat;
|
||||
this.partialTicks = partialTicks;
|
||||
this.projectionMatrix = projectionMatrix;
|
||||
this.finishTimeNano = finishTimeNano;
|
||||
}
|
||||
|
||||
public WorldRenderer getContext()
|
||||
@@ -49,4 +65,14 @@ public class RenderWorldLastEvent extends net.minecraftforge.eventbus.api.Event
|
||||
{
|
||||
return partialTicks;
|
||||
}
|
||||
|
||||
public Matrix4f getProjectionMatrix()
|
||||
{
|
||||
return projectionMatrix;
|
||||
}
|
||||
|
||||
public long getFinishTimeNano()
|
||||
{
|
||||
return finishTimeNano;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user