Package net.minecraft.client.render
Class GameRenderer
java.lang.Object
net.minecraft.client.render.GameRenderer
- All Implemented Interfaces:
AutoCloseable,ResourceReloader,SynchronousResourceReloader
@Environment(CLIENT) public class GameRenderer extends Object implements SynchronousResourceReloader, AutoCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.resource.ResourceReloader
ResourceReloader.Synchronizer -
Field Summary
-
Constructor Summary
Constructors Constructor Description GameRenderer(MinecraftClient client, ResourceManager resourceManager, BufferBuilderStorage buffers) -
Method Summary
Modifier and Type Method Description private voidbobView(MatrixStack matrices, float float2)private voidbobViewWhenHurt(MatrixStack matrices, float float2)voidclose()voiddisableShader()Matrix4fgetBasicProjectionMatrix(Camera camera, float float2, boolean bool)CameragetCamera()private doublegetFov(Camera camera, float tickDelta, boolean changingFov)LightmapTextureManagergetLightmapTextureManager()MapRenderergetMapRenderer()static floatgetNightVisionStrength(LivingEntity entity, float float2)OverlayTexturegetOverlayTexture()ShaderEffectgetShader()floatgetSkyDarkness(float tickDelta)floatgetViewDistance()voidloadProjectionMatrix(Matrix4f matrix4f)private voidloadShader(Identifier id)private voidmethod_31136(float float2)voidonCameraEntitySet(Entity entity)voidonResized(int width, int height)voidreload(ResourceManager manager)Performs the reload in the apply executor, or the game engine.voidrender(float tickDelta, long startTime, boolean tick)private voidrenderFloatingItem(int scaledWidth, int scaledHeight, float tickDelta)private voidrenderHand(MatrixStack matrices, Camera camera, float tickDelta)voidrenderWorld(float tickDelta, long limitTime, MatrixStack matrix)voidreset()private booleanshouldRenderBlockOutline()voidshowFloatingItem(ItemStack floatingItem)voidtick()voidtoggleShadersEnabled()private voidupdateMovementFovMultiplier()voidupdateTargetedEntity(float tickDelta)private voidupdateWorldIcon()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.resource.ResourceReloader
getNameMethods inherited from interface net.minecraft.resource.SynchronousResourceReloader
reload
-
Field Details
-
field_26730
-
LOGGER
-
SHADERS_LOCATIONS
-
SHADER_COUNT
public static final int SHADER_COUNT -
client
-
resourceManager
-
random
-
viewDistance
private float viewDistance -
firstPersonRenderer
-
mapRenderer
-
buffers
-
ticks
private int ticks -
movementFovMultiplier
private float movementFovMultiplier -
lastMovementFovMultiplier
private float lastMovementFovMultiplier -
skyDarkness
private float skyDarkness -
lastSkyDarkness
private float lastSkyDarkness -
renderHand
private boolean renderHand -
blockOutlineEnabled
private boolean blockOutlineEnabled -
lastWorldIconUpdate
private long lastWorldIconUpdate -
lastWindowFocusedTime
private long lastWindowFocusedTime -
lightmapTextureManager
-
overlayTexture
-
renderingPanorama
private boolean renderingPanorama -
zoom
private float zoom -
zoomX
private float zoomX -
zoomY
private float zoomY -
floatingItem
-
floatingItemTimeLeft
private int floatingItemTimeLeft -
floatingItemWidth
private float floatingItemWidth -
floatingItemHeight
private float floatingItemHeight -
shader
-
forcedShaderIndex
private int forcedShaderIndex -
shadersEnabled
private boolean shadersEnabled -
camera
-
-
Constructor Details
-
GameRenderer
public GameRenderer(MinecraftClient client, ResourceManager resourceManager, BufferBuilderStorage buffers)
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
disableShader
public void disableShader() -
toggleShadersEnabled
public void toggleShadersEnabled() -
onCameraEntitySet
-
loadShader
-
reload
Performs the reload in the apply executor, or the game engine.- Specified by:
reloadin interfaceSynchronousResourceReloader- Parameters:
manager- the resource manager
-
tick
public void tick() -
getShader
-
onResized
public void onResized(int width, int height) -
updateTargetedEntity
public void updateTargetedEntity(float tickDelta) -
updateMovementFovMultiplier
private void updateMovementFovMultiplier() -
getFov
-
bobViewWhenHurt
-
bobView
-
renderHand
-
loadProjectionMatrix
-
getBasicProjectionMatrix
-
getNightVisionStrength
-
render
public void render(float tickDelta, long startTime, boolean tick) -
updateWorldIcon
private void updateWorldIcon() -
shouldRenderBlockOutline
private boolean shouldRenderBlockOutline() -
renderWorld
-
reset
public void reset() -
getMapRenderer
-
showFloatingItem
-
renderFloatingItem
private void renderFloatingItem(int scaledWidth, int scaledHeight, float tickDelta) -
method_31136
private void method_31136(float float2) -
getSkyDarkness
public float getSkyDarkness(float tickDelta) -
getViewDistance
public float getViewDistance() -
getCamera
-
getLightmapTextureManager
-
getOverlayTexture
-