Skip to content

Commit

Permalink
fix potential null crash because of race conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
fayer3 committed Jan 13, 2025
1 parent 4d754cf commit 40f437b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public abstract class GameRendererVRMixin
private Matrix4f vivecraft$customProjectionMatrix(
Matrix4f instance, float fovy, float aspect, float zNear, float zFar, Operation<Matrix4f> original)
{
if (VRState.VR_RUNNING) {
if (!RenderPassType.isVanilla()) {
zNear = vivecraft$MIN_CLIP_DISTANCE;
if (MethodHolder.isInMenuRoom()) {
// use 16 Chunks as minimum, to have no issues with clipping in the menuworld
Expand Down Expand Up @@ -273,7 +273,7 @@ public abstract class GameRendererVRMixin
GameRenderer instance, DeltaTracker deltaTracker, Operation<Void> original)
{
original.call(instance, deltaTracker);
if (VRState.VR_RUNNING && vivecraft$DATA_HOLDER.currentPass != RenderPass.THIRD &&
if (!RenderPassType.isVanilla() && vivecraft$DATA_HOLDER.currentPass != RenderPass.THIRD &&
vivecraft$DATA_HOLDER.currentPass != RenderPass.CAMERA)
{
VREffectsHelper.renderFaceOverlay(deltaTracker.getGameTimeDeltaPartialTick(false));
Expand Down

0 comments on commit 40f437b

Please sign in to comment.