Class GameRenderer

java.lang.Object
net.minecraft.client.renderer.GameRenderer
All Implemented Interfaces:
AutoCloseable, TrackedWaypoint.Projector

public class GameRenderer extends Object implements TrackedWaypoint.Projector, AutoCloseable
  • Field Details

    • BLUR_POST_CHAIN_ID

      private static final ResourceLocation BLUR_POST_CHAIN_ID
    • MAX_BLUR_RADIUS

      public static final int MAX_BLUR_RADIUS
      See Also:
    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • PROJECTION_Z_NEAR

      public static final float PROJECTION_Z_NEAR
      See Also:
    • PROJECTION_3D_HUD_Z_FAR

      public static final float PROJECTION_3D_HUD_Z_FAR
      See Also:
    • PORTAL_SPINNING_SPEED

      private static final float PORTAL_SPINNING_SPEED
      See Also:
    • NAUSEA_SPINNING_SPEED

      private static final float NAUSEA_SPINNING_SPEED
      See Also:
    • minecraft

      private final Minecraft minecraft
    • random

      private final RandomSource random
    • renderDistance

      private float renderDistance
    • itemInHandRenderer

      public final ItemInHandRenderer itemInHandRenderer
    • screenEffectRenderer

      private final ScreenEffectRenderer screenEffectRenderer
    • renderBuffers

      private final RenderBuffers renderBuffers
    • spinningEffectTime

      private float spinningEffectTime
    • spinningEffectSpeed

      private float spinningEffectSpeed
    • fovModifier

      private float fovModifier
    • oldFovModifier

      private float oldFovModifier
    • darkenWorldAmount

      private float darkenWorldAmount
    • darkenWorldAmountO

      private float darkenWorldAmountO
    • renderBlockOutline

      private boolean renderBlockOutline
    • lastScreenshotAttempt

      private long lastScreenshotAttempt
    • hasWorldScreenshot

      private boolean hasWorldScreenshot
    • lastActiveTime

      private long lastActiveTime
    • lightTexture

      private final LightTexture lightTexture
    • overlayTexture

      private final OverlayTexture overlayTexture
    • panoramicMode

      private boolean panoramicMode
    • cubeMap

      protected final CubeMap cubeMap
    • panorama

      protected final PanoramaRenderer panorama
    • resourcePool

      private final CrossFrameResourcePool resourcePool
    • fogRenderer

      private final FogRenderer fogRenderer
    • guiRenderer

      private final GuiRenderer guiRenderer
    • guiRenderState

      private final GuiRenderState guiRenderState
    • postEffectId

      @Nullable private ResourceLocation postEffectId
    • effectActive

      private boolean effectActive
    • mainCamera

      private final Camera mainCamera
    • lighting

      private final Lighting lighting
    • globalSettingsUniform

      private final GlobalSettingsUniform globalSettingsUniform
    • levelProjectionMatrixBuffer

      private final PerspectiveProjectionMatrixBuffer levelProjectionMatrixBuffer
    • hud3dProjectionMatrixBuffer

      private final CachedPerspectiveProjectionMatrixBuffer hud3dProjectionMatrixBuffer
  • Constructor Details

  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • setRenderBlockOutline

      public void setRenderBlockOutline(boolean pRenderBlockOutline)
    • setPanoramicMode

      public void setPanoramicMode(boolean pPanoramicMode)
    • isPanoramicMode

      public boolean isPanoramicMode()
    • clearPostEffect

      public void clearPostEffect()
    • togglePostEffect

      public void togglePostEffect()
    • checkEntityPostEffect

      public void checkEntityPostEffect(@Nullable Entity pEntity)
      What shader to use when spectating this entity
    • setPostEffect

      public void setPostEffect(ResourceLocation pPostEffectId)
    • processBlurEffect

      public void processBlurEffect()
    • preloadUiShader

      public void preloadUiShader(ResourceProvider pResourceProvider)
    • tick

      public void tick()
    • currentPostEffect

      @Nullable public ResourceLocation currentPostEffect()
    • resize

      public void resize(int pWidth, int pHeight)
    • pick

      public void pick(float pPartialTicks)
      Gets the block or object that is being moused over.
    • pick

      private HitResult pick(Entity pEntity, double pBlockInteractionRange, double pEntityInteractionRange, float pPartialTick)
    • filterHitResult

      private static HitResult filterHitResult(HitResult pHitResult, Vec3 pPos, double pBlockInteractionRange)
    • tickFov

      private void tickFov()
    • getFov

      private float getFov(Camera pCamera, float pPartialTick, boolean pUseFovSetting)
    • bobHurt

      private void bobHurt(PoseStack pPoseStack, float pPartialTicks)
    • bobView

      private void bobView(PoseStack pPoseStack, float pPartialTicks)
    • renderItemInHand

      private void renderItemInHand(float p_109123_, boolean p_415631_, org.joml.Matrix4f p_333953_)
    • getProjectionMatrix

      public org.joml.Matrix4f getProjectionMatrix(float p_363849_)
    • getDepthFar

      public float getDepthFar()
    • getNightVisionScale

      public static float getNightVisionScale(LivingEntity pLivingEntity, float pNanoTime)
    • render

      public void render(DeltaTracker pDeltaTracker, boolean pRenderLevel)
    • tryTakeScreenshotIfNeeded

      private void tryTakeScreenshotIfNeeded()
    • takeAutoScreenshot

      private void takeAutoScreenshot(Path pPath)
    • shouldRenderBlockOutline

      private boolean shouldRenderBlockOutline()
    • renderLevel

      public void renderLevel(DeltaTracker pDeltaTracker)
    • resetData

      public void resetData()
    • displayItemActivation

      public void displayItemActivation(ItemStack pStack)
    • getMinecraft

      public Minecraft getMinecraft()
    • getDarkenWorldAmount

      public float getDarkenWorldAmount(float pPartialTicks)
    • getRenderDistance

      public float getRenderDistance()
    • getMainCamera

      public Camera getMainCamera()
    • lightTexture

      public LightTexture lightTexture()
    • overlayTexture

      public OverlayTexture overlayTexture()
    • projectPointToScreen

      public Vec3 projectPointToScreen(Vec3 pPoint)
      Specified by:
      projectPointToScreen in interface TrackedWaypoint.Projector
    • projectHorizonToScreen

      public double projectHorizonToScreen()
      Specified by:
      projectHorizonToScreen in interface TrackedWaypoint.Projector
    • getGlobalSettingsUniform

      public GlobalSettingsUniform getGlobalSettingsUniform()
    • getLighting

      public Lighting getLighting()
    • setLevel

      public void setLevel(@Nullable ClientLevel pLevel)
    • getPanorama

      public PanoramaRenderer getPanorama()