Class GameRenderer

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

public class GameRenderer extends Object implements AutoCloseable
  • Field Details

    • NAUSEA_LOCATION

      private static final ResourceLocation NAUSEA_LOCATION
    • LOGGER

      static final org.slf4j.Logger LOGGER
    • DEPTH_BUFFER_DEBUG

      private static final boolean DEPTH_BUFFER_DEBUG
      See Also:
    • PROJECTION_Z_NEAR

      public static final float PROJECTION_Z_NEAR
      See Also:
    • GUI_Z_NEAR

      private static final float GUI_Z_NEAR
      See Also:
    • minecraft

      final Minecraft minecraft
    • resourceManager

      private final ResourceManager resourceManager
    • random

      private final RandomSource random
    • renderDistance

      private float renderDistance
    • itemInHandRenderer

      public final ItemInHandRenderer itemInHandRenderer
    • mapRenderer

      private final MapRenderer mapRenderer
    • renderBuffers

      private final RenderBuffers renderBuffers
    • tick

      private int tick
    • fov

      private float fov
    • oldFov

      private float oldFov
    • darkenWorldAmount

      private float darkenWorldAmount
    • darkenWorldAmountO

      private float darkenWorldAmountO
    • renderHand

      private boolean renderHand
    • 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
    • zoom

      private float zoom
    • zoomX

      private float zoomX
    • zoomY

      private float zoomY
    • ITEM_ACTIVATION_ANIMATION_LENGTH

      public static final int ITEM_ACTIVATION_ANIMATION_LENGTH
      See Also:
    • itemActivationItem

      @Nullable private ItemStack itemActivationItem
    • itemActivationTicks

      private int itemActivationTicks
    • itemActivationOffX

      private float itemActivationOffX
    • itemActivationOffY

      private float itemActivationOffY
    • postEffect

      @Nullable PostChain postEffect
    • EFFECTS

      static final ResourceLocation[] EFFECTS
    • EFFECT_NONE

      public static final int EFFECT_NONE
    • effectIndex

      int effectIndex
    • effectActive

      private boolean effectActive
    • mainCamera

      private final Camera mainCamera
    • blitShader

      public ShaderInstance blitShader
    • shaders

      private final Map<String,ShaderInstance> shaders
    • positionShader

      @Nullable private static ShaderInstance positionShader
    • positionColorShader

      @Nullable private static ShaderInstance positionColorShader
    • positionColorTexShader

      @Nullable private static ShaderInstance positionColorTexShader
    • positionTexShader

      @Nullable private static ShaderInstance positionTexShader
    • positionTexColorShader

      @Nullable private static ShaderInstance positionTexColorShader
    • particleShader

      @Nullable private static ShaderInstance particleShader
    • positionColorLightmapShader

      @Nullable private static ShaderInstance positionColorLightmapShader
    • positionColorTexLightmapShader

      @Nullable private static ShaderInstance positionColorTexLightmapShader
    • positionTexColorNormalShader

      @Nullable private static ShaderInstance positionTexColorNormalShader
    • positionTexLightmapColorShader

      @Nullable private static ShaderInstance positionTexLightmapColorShader
    • rendertypeSolidShader

      @Nullable private static ShaderInstance rendertypeSolidShader
    • rendertypeCutoutMippedShader

      @Nullable private static ShaderInstance rendertypeCutoutMippedShader
    • rendertypeCutoutShader

      @Nullable private static ShaderInstance rendertypeCutoutShader
    • rendertypeTranslucentShader

      @Nullable private static ShaderInstance rendertypeTranslucentShader
    • rendertypeTranslucentMovingBlockShader

      @Nullable private static ShaderInstance rendertypeTranslucentMovingBlockShader
    • rendertypeTranslucentNoCrumblingShader

      @Nullable private static ShaderInstance rendertypeTranslucentNoCrumblingShader
    • rendertypeArmorCutoutNoCullShader

      @Nullable private static ShaderInstance rendertypeArmorCutoutNoCullShader
    • rendertypeEntitySolidShader

      @Nullable private static ShaderInstance rendertypeEntitySolidShader
    • rendertypeEntityCutoutShader

      @Nullable private static ShaderInstance rendertypeEntityCutoutShader
    • rendertypeEntityCutoutNoCullShader

      @Nullable private static ShaderInstance rendertypeEntityCutoutNoCullShader
    • rendertypeEntityCutoutNoCullZOffsetShader

      @Nullable private static ShaderInstance rendertypeEntityCutoutNoCullZOffsetShader
    • rendertypeItemEntityTranslucentCullShader

      @Nullable private static ShaderInstance rendertypeItemEntityTranslucentCullShader
    • rendertypeEntityTranslucentCullShader

      @Nullable private static ShaderInstance rendertypeEntityTranslucentCullShader
    • rendertypeEntityTranslucentShader

      @Nullable private static ShaderInstance rendertypeEntityTranslucentShader
    • rendertypeEntityTranslucentEmissiveShader

      @Nullable private static ShaderInstance rendertypeEntityTranslucentEmissiveShader
    • rendertypeEntitySmoothCutoutShader

      @Nullable private static ShaderInstance rendertypeEntitySmoothCutoutShader
    • rendertypeBeaconBeamShader

      @Nullable private static ShaderInstance rendertypeBeaconBeamShader
    • rendertypeEntityDecalShader

      @Nullable private static ShaderInstance rendertypeEntityDecalShader
    • rendertypeEntityNoOutlineShader

      @Nullable private static ShaderInstance rendertypeEntityNoOutlineShader
    • rendertypeEntityShadowShader

      @Nullable private static ShaderInstance rendertypeEntityShadowShader
    • rendertypeEntityAlphaShader

      @Nullable private static ShaderInstance rendertypeEntityAlphaShader
    • rendertypeEyesShader

      @Nullable private static ShaderInstance rendertypeEyesShader
    • rendertypeEnergySwirlShader

      @Nullable private static ShaderInstance rendertypeEnergySwirlShader
    • rendertypeLeashShader

      @Nullable private static ShaderInstance rendertypeLeashShader
    • rendertypeWaterMaskShader

      @Nullable private static ShaderInstance rendertypeWaterMaskShader
    • rendertypeOutlineShader

      @Nullable private static ShaderInstance rendertypeOutlineShader
    • rendertypeArmorGlintShader

      @Nullable private static ShaderInstance rendertypeArmorGlintShader
    • rendertypeArmorEntityGlintShader

      @Nullable private static ShaderInstance rendertypeArmorEntityGlintShader
    • rendertypeGlintTranslucentShader

      @Nullable private static ShaderInstance rendertypeGlintTranslucentShader
    • rendertypeGlintShader

      @Nullable private static ShaderInstance rendertypeGlintShader
    • rendertypeGlintDirectShader

      @Nullable private static ShaderInstance rendertypeGlintDirectShader
    • rendertypeEntityGlintShader

      @Nullable private static ShaderInstance rendertypeEntityGlintShader
    • rendertypeEntityGlintDirectShader

      @Nullable private static ShaderInstance rendertypeEntityGlintDirectShader
    • rendertypeTextShader

      @Nullable private static ShaderInstance rendertypeTextShader
    • rendertypeTextBackgroundShader

      @Nullable private static ShaderInstance rendertypeTextBackgroundShader
    • rendertypeTextIntensityShader

      @Nullable private static ShaderInstance rendertypeTextIntensityShader
    • rendertypeTextSeeThroughShader

      @Nullable private static ShaderInstance rendertypeTextSeeThroughShader
    • rendertypeTextBackgroundSeeThroughShader

      @Nullable private static ShaderInstance rendertypeTextBackgroundSeeThroughShader
    • rendertypeTextIntensitySeeThroughShader

      @Nullable private static ShaderInstance rendertypeTextIntensitySeeThroughShader
    • rendertypeLightningShader

      @Nullable private static ShaderInstance rendertypeLightningShader
    • rendertypeTripwireShader

      @Nullable private static ShaderInstance rendertypeTripwireShader
    • rendertypeEndPortalShader

      @Nullable private static ShaderInstance rendertypeEndPortalShader
    • rendertypeEndGatewayShader

      @Nullable private static ShaderInstance rendertypeEndGatewayShader
    • rendertypeLinesShader

      @Nullable private static ShaderInstance rendertypeLinesShader
    • rendertypeCrumblingShader

      @Nullable private static ShaderInstance rendertypeCrumblingShader
    • rendertypeGuiShader

      @Nullable private static ShaderInstance rendertypeGuiShader
    • rendertypeGuiOverlayShader

      @Nullable private static ShaderInstance rendertypeGuiOverlayShader
    • rendertypeGuiTextHighlightShader

      @Nullable private static ShaderInstance rendertypeGuiTextHighlightShader
    • rendertypeGuiGhostRecipeOverlayShader

      @Nullable private static ShaderInstance rendertypeGuiGhostRecipeOverlayShader
  • Constructor Details

  • Method Details

    • close

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

      public void setRenderHand(boolean p_172737_)
    • setRenderBlockOutline

      public void setRenderBlockOutline(boolean p_172776_)
    • setPanoramicMode

      public void setPanoramicMode(boolean p_172780_)
    • isPanoramicMode

      public boolean isPanoramicMode()
    • shutdownEffect

      public void shutdownEffect()
    • togglePostEffect

      public void togglePostEffect()
    • checkEntityPostEffect

      public void checkEntityPostEffect(@Nullable Entity p_109107_)
    • cycleEffect

      public void cycleEffect()
    • loadEffect

      public void loadEffect(ResourceLocation p_109129_)
    • createReloadListener

      public PreparableReloadListener createReloadListener()
    • preloadUiShader

      public void preloadUiShader(ResourceProvider p_172723_)
    • preloadShader

      private ShaderInstance preloadShader(ResourceProvider p_172725_, String p_172726_, VertexFormat p_172727_)
    • reloadShaders

      void reloadShaders(ResourceProvider p_250719_)
    • shutdownShaders

      private void shutdownShaders()
    • getShader

      @Nullable public ShaderInstance getShader(@Nullable String p_172735_)
    • tick

      public void tick()
    • currentEffect

      @Nullable public PostChain currentEffect()
    • resize

      public void resize(int p_109098_, int p_109099_)
    • pick

      public void pick(float p_109088_)
    • tickFov

      private void tickFov()
    • getFov

      private double getFov(Camera p_109142_, float p_109143_, boolean p_109144_)
    • bobHurt

      private void bobHurt(PoseStack p_109118_, float p_109119_)
    • bobView

      private void bobView(PoseStack p_109139_, float p_109140_)
    • renderZoomed

      public void renderZoomed(float p_172719_, float p_172720_, float p_172721_)
    • renderItemInHand

      private void renderItemInHand(PoseStack p_109121_, Camera p_109122_, float p_109123_)
    • resetProjectionMatrix

      public void resetProjectionMatrix(org.joml.Matrix4f p_253668_)
    • getProjectionMatrix

      public org.joml.Matrix4f getProjectionMatrix(double p_254507_)
    • getDepthFar

      public float getDepthFar()
    • getNightVisionScale

      public static float getNightVisionScale(LivingEntity p_109109_, float p_109110_)
    • render

      public void render(float p_109094_, long p_109095_, boolean p_109096_)
    • tryTakeScreenshotIfNeeded

      private void tryTakeScreenshotIfNeeded()
    • takeAutoScreenshot

      private void takeAutoScreenshot(Path p_182643_)
    • shouldRenderBlockOutline

      private boolean shouldRenderBlockOutline()
    • renderLevel

      public void renderLevel(float p_109090_, long p_109091_, PoseStack p_109092_)
    • resetData

      public void resetData()
    • getMapRenderer

      public MapRenderer getMapRenderer()
    • displayItemActivation

      public void displayItemActivation(ItemStack p_109114_)
    • renderItemActivationAnimation

      private void renderItemActivationAnimation(int p_109101_, int p_109102_, float p_109103_)
    • renderConfusionOverlay

      private void renderConfusionOverlay(GuiGraphics p_282460_, float p_282656_)
    • getMinecraft

      public Minecraft getMinecraft()
    • getDarkenWorldAmount

      public float getDarkenWorldAmount(float p_109132_)
    • getRenderDistance

      public float getRenderDistance()
    • getMainCamera

      public Camera getMainCamera()
    • lightTexture

      public LightTexture lightTexture()
    • overlayTexture

      public OverlayTexture overlayTexture()
    • getPositionShader

      @Nullable public static ShaderInstance getPositionShader()
    • getPositionColorShader

      @Nullable public static ShaderInstance getPositionColorShader()
    • getPositionColorTexShader

      @Nullable public static ShaderInstance getPositionColorTexShader()
    • getPositionTexShader

      @Nullable public static ShaderInstance getPositionTexShader()
    • getPositionTexColorShader

      @Nullable public static ShaderInstance getPositionTexColorShader()
    • getParticleShader

      @Nullable public static ShaderInstance getParticleShader()
    • getPositionColorLightmapShader

      @Nullable public static ShaderInstance getPositionColorLightmapShader()
    • getPositionColorTexLightmapShader

      @Nullable public static ShaderInstance getPositionColorTexLightmapShader()
    • getPositionTexColorNormalShader

      @Nullable public static ShaderInstance getPositionTexColorNormalShader()
    • getPositionTexLightmapColorShader

      @Nullable public static ShaderInstance getPositionTexLightmapColorShader()
    • getRendertypeSolidShader

      @Nullable public static ShaderInstance getRendertypeSolidShader()
    • getRendertypeCutoutMippedShader

      @Nullable public static ShaderInstance getRendertypeCutoutMippedShader()
    • getRendertypeCutoutShader

      @Nullable public static ShaderInstance getRendertypeCutoutShader()
    • getRendertypeTranslucentShader

      @Nullable public static ShaderInstance getRendertypeTranslucentShader()
    • getRendertypeTranslucentMovingBlockShader

      @Nullable public static ShaderInstance getRendertypeTranslucentMovingBlockShader()
    • getRendertypeTranslucentNoCrumblingShader

      @Nullable public static ShaderInstance getRendertypeTranslucentNoCrumblingShader()
    • getRendertypeArmorCutoutNoCullShader

      @Nullable public static ShaderInstance getRendertypeArmorCutoutNoCullShader()
    • getRendertypeEntitySolidShader

      @Nullable public static ShaderInstance getRendertypeEntitySolidShader()
    • getRendertypeEntityCutoutShader

      @Nullable public static ShaderInstance getRendertypeEntityCutoutShader()
    • getRendertypeEntityCutoutNoCullShader

      @Nullable public static ShaderInstance getRendertypeEntityCutoutNoCullShader()
    • getRendertypeEntityCutoutNoCullZOffsetShader

      @Nullable public static ShaderInstance getRendertypeEntityCutoutNoCullZOffsetShader()
    • getRendertypeItemEntityTranslucentCullShader

      @Nullable public static ShaderInstance getRendertypeItemEntityTranslucentCullShader()
    • getRendertypeEntityTranslucentCullShader

      @Nullable public static ShaderInstance getRendertypeEntityTranslucentCullShader()
    • getRendertypeEntityTranslucentShader

      @Nullable public static ShaderInstance getRendertypeEntityTranslucentShader()
    • getRendertypeEntityTranslucentEmissiveShader

      @Nullable public static ShaderInstance getRendertypeEntityTranslucentEmissiveShader()
    • getRendertypeEntitySmoothCutoutShader

      @Nullable public static ShaderInstance getRendertypeEntitySmoothCutoutShader()
    • getRendertypeBeaconBeamShader

      @Nullable public static ShaderInstance getRendertypeBeaconBeamShader()
    • getRendertypeEntityDecalShader

      @Nullable public static ShaderInstance getRendertypeEntityDecalShader()
    • getRendertypeEntityNoOutlineShader

      @Nullable public static ShaderInstance getRendertypeEntityNoOutlineShader()
    • getRendertypeEntityShadowShader

      @Nullable public static ShaderInstance getRendertypeEntityShadowShader()
    • getRendertypeEntityAlphaShader

      @Nullable public static ShaderInstance getRendertypeEntityAlphaShader()
    • getRendertypeEyesShader

      @Nullable public static ShaderInstance getRendertypeEyesShader()
    • getRendertypeEnergySwirlShader

      @Nullable public static ShaderInstance getRendertypeEnergySwirlShader()
    • getRendertypeLeashShader

      @Nullable public static ShaderInstance getRendertypeLeashShader()
    • getRendertypeWaterMaskShader

      @Nullable public static ShaderInstance getRendertypeWaterMaskShader()
    • getRendertypeOutlineShader

      @Nullable public static ShaderInstance getRendertypeOutlineShader()
    • getRendertypeArmorGlintShader

      @Nullable public static ShaderInstance getRendertypeArmorGlintShader()
    • getRendertypeArmorEntityGlintShader

      @Nullable public static ShaderInstance getRendertypeArmorEntityGlintShader()
    • getRendertypeGlintTranslucentShader

      @Nullable public static ShaderInstance getRendertypeGlintTranslucentShader()
    • getRendertypeGlintShader

      @Nullable public static ShaderInstance getRendertypeGlintShader()
    • getRendertypeGlintDirectShader

      @Nullable public static ShaderInstance getRendertypeGlintDirectShader()
    • getRendertypeEntityGlintShader

      @Nullable public static ShaderInstance getRendertypeEntityGlintShader()
    • getRendertypeEntityGlintDirectShader

      @Nullable public static ShaderInstance getRendertypeEntityGlintDirectShader()
    • getRendertypeTextShader

      @Nullable public static ShaderInstance getRendertypeTextShader()
    • getRendertypeTextBackgroundShader

      @Nullable public static ShaderInstance getRendertypeTextBackgroundShader()
    • getRendertypeTextIntensityShader

      @Nullable public static ShaderInstance getRendertypeTextIntensityShader()
    • getRendertypeTextSeeThroughShader

      @Nullable public static ShaderInstance getRendertypeTextSeeThroughShader()
    • getRendertypeTextBackgroundSeeThroughShader

      @Nullable public static ShaderInstance getRendertypeTextBackgroundSeeThroughShader()
    • getRendertypeTextIntensitySeeThroughShader

      @Nullable public static ShaderInstance getRendertypeTextIntensitySeeThroughShader()
    • getRendertypeLightningShader

      @Nullable public static ShaderInstance getRendertypeLightningShader()
    • getRendertypeTripwireShader

      @Nullable public static ShaderInstance getRendertypeTripwireShader()
    • getRendertypeEndPortalShader

      @Nullable public static ShaderInstance getRendertypeEndPortalShader()
    • getRendertypeEndGatewayShader

      @Nullable public static ShaderInstance getRendertypeEndGatewayShader()
    • getRendertypeLinesShader

      @Nullable public static ShaderInstance getRendertypeLinesShader()
    • getRendertypeCrumblingShader

      @Nullable public static ShaderInstance getRendertypeCrumblingShader()
    • getRendertypeGuiShader

      @Nullable public static ShaderInstance getRendertypeGuiShader()
    • getRendertypeGuiOverlayShader

      @Nullable public static ShaderInstance getRendertypeGuiOverlayShader()
    • getRendertypeGuiTextHighlightShader

      @Nullable public static ShaderInstance getRendertypeGuiTextHighlightShader()
    • getRendertypeGuiGhostRecipeOverlayShader

      @Nullable public static ShaderInstance getRendertypeGuiGhostRecipeOverlayShader()