Package net.minecraft.client.renderer
Class WorldRenderer
java.lang.Object
net.minecraft.client.renderer.WorldRenderer
- All Implemented Interfaces:
AutoCloseable
,IFutureReloadListener
,IResourceManagerReloadListener
-
Nested Class Summary
Modifier and TypeClassDescription(package private) class
static class
Nested classes/interfaces inherited from interface net.minecraft.resources.IFutureReloadListener
IFutureReloadListener.IStage
-
Field Summary
Modifier and TypeFieldDescriptionprivate ClippingHelper
private boolean
private ChunkRenderDispatcher
private Set<ChunkRenderDispatcher.ChunkRender>
private VertexBuffer
private static final ResourceLocation
private Framebuffer
private int
private VertexBuffer
private final it.unimi.dsi.fastutil.ints.Int2ObjectMap<DestroyBlockProgress>
private final it.unimi.dsi.fastutil.longs.Long2ObjectMap<SortedSet<DestroyBlockProgress>>
static final Direction[]
private static final ResourceLocation
private ShaderGroup
private final EntityRendererManager
private Framebuffer
private static final ResourceLocation
private final VertexFormat
private int
private final RenderTimeManager
private final Vector4f[]
private final Tuple3d
private boolean
private final Set<TileEntity>
private Framebuffer
private int
private int
private int
private double
private double
private double
private int
private ClientWorld
private static final org.apache.logging.log4j.Logger
private final Minecraft
private static final ResourceLocation
private boolean
private Framebuffer
private double
private double
private double
private double
private double
private Vector3d
private CloudOption
private int
private int
private int
private static final ResourceLocation
private final float[]
private final float[]
private int
private final RenderTypeBuffers
private final it.unimi.dsi.fastutil.objects.ObjectList<WorldRenderer.LocalRenderInformationContainer>
private int
private VertexBuffer
private final VertexFormat
private static final ResourceLocation
private VertexBuffer
private static final ResourceLocation
private final TextureManager
private int
private Framebuffer
private ShaderGroup
private ViewFrustum
private Framebuffer
private double
private double
private double
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addChainedFilledBoxVertices
(BufferBuilder p_189693_0_, double p_189693_1_, double p_189693_3_, double p_189693_5_, double p_189693_7_, double p_189693_9_, double p_189693_11_, float p_189693_13_, float p_189693_14_, float p_189693_15_, float p_189693_16_) private void
addFrustumQuad
(IVertexBuilder p_228434_1_, int p_228434_2_, int p_228434_3_, int p_228434_4_, int p_228434_5_, int p_228434_6_, int p_228434_7_, int p_228434_8_) private void
addFrustumVertex
(IVertexBuilder p_228433_1_, int p_228433_2_) void
addParticle
(IParticleData p_195462_1_, boolean p_195462_2_, boolean p_195462_3_, double p_195462_4_, double p_195462_6_, double p_195462_8_, double p_195462_10_, double p_195462_12_, double p_195462_14_) void
addParticle
(IParticleData p_195461_1_, boolean p_195461_2_, double p_195461_3_, double p_195461_5_, double p_195461_7_, double p_195461_9_, double p_195461_11_, double p_195461_13_) private <T extends IParticleData>
voidaddParticle
(T p_195467_1_, double p_195467_2_, double p_195467_4_, double p_195467_6_, double p_195467_8_, double p_195467_10_, double p_195467_12_) private Particle
addParticleInternal
(IParticleData p_195469_1_, boolean p_195469_2_, boolean p_195469_3_, double p_195469_4_, double p_195469_6_, double p_195469_8_, double p_195469_10_, double p_195469_12_, double p_195469_14_) private Particle
addParticleInternal
(IParticleData p_195471_1_, boolean p_195471_2_, double p_195471_3_, double p_195471_5_, double p_195471_7_, double p_195471_9_, double p_195471_11_, double p_195471_13_) void
void
blockChanged
(IBlockReader p_184376_1_, BlockPos p_184376_2_, BlockState p_184376_3_, BlockState p_184376_4_, int p_184376_5_) private void
buildClouds
(BufferBuilder p_204600_1_, double p_204600_2_, double p_204600_4_, double p_204600_6_, Vector3d p_204600_8_) private ParticleStatus
calculateParticleLevel
(boolean p_215327_1_) private void
captureFrustum
(Matrix4f p_228419_1_, Matrix4f p_228419_2_, double p_228419_3_, double p_228419_5_, double p_228419_7_, ClippingHelper p_228419_9_) private void
checkPoseStack
(MatrixStack p_228423_1_) void
clear()
void
close()
private void
compileChunksUntil
(long p_174967_1_) protected int
private void
private void
private void
private void
void
destroyBlockProgress
(int p_180441_1_, BlockPos p_180441_2_, int p_180441_3_) void
private void
drawSkyHemisphere
(BufferBuilder p_174968_1_, float p_174968_2_, boolean p_174968_3_) private void
drawStars
(BufferBuilder p_180444_1_) static int
getLightColor
(IBlockDisplayReader p_228420_0_, BlockState p_228420_1_, BlockPos p_228420_2_) static int
getLightColor
(IBlockDisplayReader p_228421_0_, BlockPos p_228421_1_) getRelativeFrom
(BlockPos p_181562_1_, ChunkRenderDispatcher.ChunkRender p_181562_2_, Direction p_181562_3_) void
globalLevelEvent
(int p_180440_1_, BlockPos p_180440_2_, int p_180440_3_) boolean
void
private void
void
levelEvent
(PlayerEntity p_180439_1_, int p_180439_2_, BlockPos p_180439_3_, int p_180439_4_) void
private void
notifyNearbyEntities
(World p_193054_1_, BlockPos p_193054_2_, boolean p_193054_3_) void
onResourceManagerReload
(IResourceManager p_195410_1_) void
playRecord
(SoundEvent p_184377_1_, BlockPos p_184377_2_, MusicDiscItem musicDiscItem) void
playStreamingMusic
(SoundEvent p_184377_1_, BlockPos p_184377_2_) Deprecated.private void
removeProgress
(DestroyBlockProgress p_228442_1_) private void
renderChunkLayer
(RenderType p_228441_1_, MatrixStack p_228441_2_, double p_228441_3_, double p_228441_5_, double p_228441_7_) void
renderClouds
(MatrixStack p_228425_1_, float p_228425_2_, double p_228425_3_, double p_228425_5_, double p_228425_7_) private void
renderDebug
(ActiveRenderInfo p_228446_1_) private void
renderEndSky
(MatrixStack p_228444_1_) private void
renderEntity
(Entity p_228418_1_, double p_228418_2_, double p_228418_4_, double p_228418_6_, float p_228418_8_, MatrixStack p_228418_9_, IRenderTypeBuffer p_228418_10_) private void
renderHitOutline
(MatrixStack p_228429_1_, IVertexBuilder p_228429_2_, Entity p_228429_3_, double p_228429_4_, double p_228429_6_, double p_228429_8_, BlockPos p_228429_10_, BlockState p_228429_11_) void
renderLevel
(MatrixStack p_228426_1_, float p_228426_2_, long p_228426_3_, boolean p_228426_5_, ActiveRenderInfo p_228426_6_, GameRenderer p_228426_7_, LightTexture p_228426_8_, Matrix4f p_228426_9_) static void
renderLineBox
(MatrixStack p_228427_0_, IVertexBuilder p_228427_1_, double p_228427_2_, double p_228427_4_, double p_228427_6_, double p_228427_8_, double p_228427_10_, double p_228427_12_, float p_228427_14_, float p_228427_15_, float p_228427_16_, float p_228427_17_) static void
renderLineBox
(MatrixStack p_228428_0_, IVertexBuilder p_228428_1_, double p_228428_2_, double p_228428_4_, double p_228428_6_, double p_228428_8_, double p_228428_10_, double p_228428_12_, float p_228428_14_, float p_228428_15_, float p_228428_16_, float p_228428_17_, float p_228428_18_, float p_228428_19_, float p_228428_20_) static void
renderLineBox
(MatrixStack p_228430_0_, IVertexBuilder p_228430_1_, AxisAlignedBB p_228430_2_, float p_228430_3_, float p_228430_4_, float p_228430_5_, float p_228430_6_) private static void
renderShape
(MatrixStack p_228445_0_, IVertexBuilder p_228445_1_, VoxelShape p_228445_2_, double p_228445_3_, double p_228445_5_, double p_228445_7_, float p_228445_9_, float p_228445_10_, float p_228445_11_, float p_228445_12_) void
renderSky
(MatrixStack p_228424_1_, float p_228424_2_) private void
renderSnowAndRain
(LightTexture p_228438_1_, float p_228438_2_, double p_228438_3_, double p_228438_5_, double p_228438_7_) static void
renderVoxelShape
(MatrixStack p_228431_0_, IVertexBuilder p_228431_1_, VoxelShape p_228431_2_, double p_228431_3_, double p_228431_5_, double p_228431_7_, float p_228431_9_, float p_228431_10_, float p_228431_11_, float p_228431_12_) private void
renderWorldBounds
(ActiveRenderInfo p_228447_1_) protected void
void
resize
(int p_72720_1_, int p_72720_2_) private void
setBlockDirty
(BlockPos p_215324_1_, boolean p_215324_2_) void
setBlockDirty
(BlockPos p_224746_1_, BlockState p_224746_2_, BlockState p_224746_3_) void
setBlocksDirty
(int p_147585_1_, int p_147585_2_, int p_147585_3_, int p_147585_4_, int p_147585_5_, int p_147585_6_) void
setLevel
(ClientWorld p_72732_1_) void
setSectionDirty
(int p_215328_1_, int p_215328_2_, int p_215328_3_) private void
setSectionDirty
(int p_215319_1_, int p_215319_2_, int p_215319_3_, boolean p_215319_4_) void
setSectionDirtyWithNeighbors
(int p_215321_1_, int p_215321_2_, int p_215321_3_) private void
setupRender
(ActiveRenderInfo p_228437_1_, ClippingHelper p_228437_2_, boolean p_228437_3_, int p_228437_4_, boolean p_228437_5_) protected boolean
void
tick()
void
tickRain
(ActiveRenderInfo p_228436_1_) void
updateGlobalBlockEntities
(Collection<TileEntity> p_181023_1_, Collection<TileEntity> p_181023_2_) private void
vertex
(BufferBuilder p_228422_1_, double p_228422_2_, double p_228422_4_, double p_228422_6_, double p_228422_8_, int p_228422_10_, double p_228422_11_, float p_228422_13_, float p_228422_14_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.resources.IFutureReloadListener
getName
Methods inherited from interface net.minecraft.resources.IResourceManagerReloadListener
reload
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
MOON_LOCATION
-
SUN_LOCATION
-
CLOUDS_LOCATION
-
END_SKY_LOCATION
-
FORCEFIELD_LOCATION
-
RAIN_LOCATION
-
SNOW_LOCATION
-
DIRECTIONS
-
minecraft
-
textureManager
-
entityRenderDispatcher
-
renderBuffers
-
level
-
chunksToCompile
-
renderChunks
private final it.unimi.dsi.fastutil.objects.ObjectList<WorldRenderer.LocalRenderInformationContainer> renderChunks -
globalBlockEntities
-
viewArea
-
skyFormat
-
starBuffer
-
skyBuffer
-
darkBuffer
-
generateClouds
private boolean generateClouds -
cloudBuffer
-
frameTimes
-
ticks
private int ticks -
destroyingBlocks
-
destructionProgress
private final it.unimi.dsi.fastutil.longs.Long2ObjectMap<SortedSet<DestroyBlockProgress>> destructionProgress -
playingRecords
-
entityTarget
-
entityEffect
-
translucentTarget
-
itemEntityTarget
-
particlesTarget
-
weatherTarget
-
cloudsTarget
-
transparencyChain
-
lastCameraX
private double lastCameraX -
lastCameraY
private double lastCameraY -
lastCameraZ
private double lastCameraZ -
lastCameraChunkX
private int lastCameraChunkX -
lastCameraChunkY
private int lastCameraChunkY -
lastCameraChunkZ
private int lastCameraChunkZ -
prevCamX
private double prevCamX -
prevCamY
private double prevCamY -
prevCamZ
private double prevCamZ -
prevCamRotX
private double prevCamRotX -
prevCamRotY
private double prevCamRotY -
prevCloudX
private int prevCloudX -
prevCloudY
private int prevCloudY -
prevCloudZ
private int prevCloudZ -
prevCloudColor
-
prevCloudsType
-
chunkRenderDispatcher
-
format
-
lastViewDistance
private int lastViewDistance -
renderedEntities
private int renderedEntities -
culledEntities
private int culledEntities -
captureFrustum
private boolean captureFrustum -
capturedFrustum
-
frustumPoints
-
frustumPos
-
xTransparentOld
private double xTransparentOld -
yTransparentOld
private double yTransparentOld -
zTransparentOld
private double zTransparentOld -
needsUpdate
private boolean needsUpdate -
frameId
private int frameId -
rainSoundTime
private int rainSoundTime -
rainSizeX
private final float[] rainSizeX -
rainSizeZ
private final float[] rainSizeZ
-
-
Constructor Details
-
WorldRenderer
-
-
Method Details
-
renderSnowAndRain
private void renderSnowAndRain(LightTexture p_228438_1_, float p_228438_2_, double p_228438_3_, double p_228438_5_, double p_228438_7_) -
tickRain
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
onResourceManagerReload
- Specified by:
onResourceManagerReload
in interfaceIResourceManagerReloadListener
-
initOutline
public void initOutline() -
initTransparency
private void initTransparency() -
deinitTransparency
private void deinitTransparency() -
doEntityOutline
public void doEntityOutline() -
shouldShowEntityOutlines
protected boolean shouldShowEntityOutlines() -
createDarkSky
private void createDarkSky() -
createLightSky
private void createLightSky() -
drawSkyHemisphere
-
createStars
private void createStars() -
drawStars
-
setLevel
-
allChanged
public void allChanged() -
resetChunksToCompile
protected void resetChunksToCompile() -
resize
public void resize(int p_72720_1_, int p_72720_2_) -
getChunkStatistics
-
countRenderedChunks
protected int countRenderedChunks() -
getEntityStatistics
-
setupRender
private void setupRender(ActiveRenderInfo p_228437_1_, ClippingHelper p_228437_2_, boolean p_228437_3_, int p_228437_4_, boolean p_228437_5_) -
getRelativeFrom
@Nullable private ChunkRenderDispatcher.ChunkRender getRelativeFrom(BlockPos p_181562_1_, ChunkRenderDispatcher.ChunkRender p_181562_2_, Direction p_181562_3_) -
captureFrustum
private void captureFrustum(Matrix4f p_228419_1_, Matrix4f p_228419_2_, double p_228419_3_, double p_228419_5_, double p_228419_7_, ClippingHelper p_228419_9_) -
renderLevel
public void renderLevel(MatrixStack p_228426_1_, float p_228426_2_, long p_228426_3_, boolean p_228426_5_, ActiveRenderInfo p_228426_6_, GameRenderer p_228426_7_, LightTexture p_228426_8_, Matrix4f p_228426_9_) -
checkPoseStack
-
renderEntity
private void renderEntity(Entity p_228418_1_, double p_228418_2_, double p_228418_4_, double p_228418_6_, float p_228418_8_, MatrixStack p_228418_9_, IRenderTypeBuffer p_228418_10_) -
renderChunkLayer
private void renderChunkLayer(RenderType p_228441_1_, MatrixStack p_228441_2_, double p_228441_3_, double p_228441_5_, double p_228441_7_) -
renderDebug
-
addFrustumVertex
-
addFrustumQuad
private void addFrustumQuad(IVertexBuilder p_228434_1_, int p_228434_2_, int p_228434_3_, int p_228434_4_, int p_228434_5_, int p_228434_6_, int p_228434_7_, int p_228434_8_) -
tick
public void tick() -
removeProgress
-
renderEndSky
-
renderSky
-
renderClouds
public void renderClouds(MatrixStack p_228425_1_, float p_228425_2_, double p_228425_3_, double p_228425_5_, double p_228425_7_) -
buildClouds
private void buildClouds(BufferBuilder p_204600_1_, double p_204600_2_, double p_204600_4_, double p_204600_6_, Vector3d p_204600_8_) -
compileChunksUntil
private void compileChunksUntil(long p_174967_1_) -
renderWorldBounds
-
vertex
private void vertex(BufferBuilder p_228422_1_, double p_228422_2_, double p_228422_4_, double p_228422_6_, double p_228422_8_, int p_228422_10_, double p_228422_11_, float p_228422_13_, float p_228422_14_) -
renderHitOutline
private void renderHitOutline(MatrixStack p_228429_1_, IVertexBuilder p_228429_2_, Entity p_228429_3_, double p_228429_4_, double p_228429_6_, double p_228429_8_, BlockPos p_228429_10_, BlockState p_228429_11_) -
renderVoxelShape
public static void renderVoxelShape(MatrixStack p_228431_0_, IVertexBuilder p_228431_1_, VoxelShape p_228431_2_, double p_228431_3_, double p_228431_5_, double p_228431_7_, float p_228431_9_, float p_228431_10_, float p_228431_11_, float p_228431_12_) -
renderShape
private static void renderShape(MatrixStack p_228445_0_, IVertexBuilder p_228445_1_, VoxelShape p_228445_2_, double p_228445_3_, double p_228445_5_, double p_228445_7_, float p_228445_9_, float p_228445_10_, float p_228445_11_, float p_228445_12_) -
renderLineBox
public static void renderLineBox(MatrixStack p_228430_0_, IVertexBuilder p_228430_1_, AxisAlignedBB p_228430_2_, float p_228430_3_, float p_228430_4_, float p_228430_5_, float p_228430_6_) -
renderLineBox
public static void renderLineBox(MatrixStack p_228427_0_, IVertexBuilder p_228427_1_, double p_228427_2_, double p_228427_4_, double p_228427_6_, double p_228427_8_, double p_228427_10_, double p_228427_12_, float p_228427_14_, float p_228427_15_, float p_228427_16_, float p_228427_17_) -
renderLineBox
public static void renderLineBox(MatrixStack p_228428_0_, IVertexBuilder p_228428_1_, double p_228428_2_, double p_228428_4_, double p_228428_6_, double p_228428_8_, double p_228428_10_, double p_228428_12_, float p_228428_14_, float p_228428_15_, float p_228428_16_, float p_228428_17_, float p_228428_18_, float p_228428_19_, float p_228428_20_) -
addChainedFilledBoxVertices
public static void addChainedFilledBoxVertices(BufferBuilder p_189693_0_, double p_189693_1_, double p_189693_3_, double p_189693_5_, double p_189693_7_, double p_189693_9_, double p_189693_11_, float p_189693_13_, float p_189693_14_, float p_189693_15_, float p_189693_16_) -
blockChanged
public void blockChanged(IBlockReader p_184376_1_, BlockPos p_184376_2_, BlockState p_184376_3_, BlockState p_184376_4_, int p_184376_5_) -
setBlockDirty
-
setBlocksDirty
public void setBlocksDirty(int p_147585_1_, int p_147585_2_, int p_147585_3_, int p_147585_4_, int p_147585_5_, int p_147585_6_) -
setBlockDirty
-
setSectionDirtyWithNeighbors
public void setSectionDirtyWithNeighbors(int p_215321_1_, int p_215321_2_, int p_215321_3_) -
setSectionDirty
public void setSectionDirty(int p_215328_1_, int p_215328_2_, int p_215328_3_) -
setSectionDirty
private void setSectionDirty(int p_215319_1_, int p_215319_2_, int p_215319_3_, boolean p_215319_4_) -
playStreamingMusic
Deprecated. -
playRecord
public void playRecord(@Nullable SoundEvent p_184377_1_, BlockPos p_184377_2_, @Nullable MusicDiscItem musicDiscItem) -
notifyNearbyEntities
-
addParticle
public void addParticle(IParticleData p_195461_1_, boolean p_195461_2_, double p_195461_3_, double p_195461_5_, double p_195461_7_, double p_195461_9_, double p_195461_11_, double p_195461_13_) -
addParticle
public void addParticle(IParticleData p_195462_1_, boolean p_195462_2_, boolean p_195462_3_, double p_195462_4_, double p_195462_6_, double p_195462_8_, double p_195462_10_, double p_195462_12_, double p_195462_14_) -
addParticle
private <T extends IParticleData> void addParticle(T p_195467_1_, double p_195467_2_, double p_195467_4_, double p_195467_6_, double p_195467_8_, double p_195467_10_, double p_195467_12_) -
addParticleInternal
@Nullable private Particle addParticleInternal(IParticleData p_195471_1_, boolean p_195471_2_, double p_195471_3_, double p_195471_5_, double p_195471_7_, double p_195471_9_, double p_195471_11_, double p_195471_13_) -
addParticleInternal
@Nullable private Particle addParticleInternal(IParticleData p_195469_1_, boolean p_195469_2_, boolean p_195469_3_, double p_195469_4_, double p_195469_6_, double p_195469_8_, double p_195469_10_, double p_195469_12_, double p_195469_14_) -
calculateParticleLevel
-
clear
public void clear() -
globalLevelEvent
-
levelEvent
public void levelEvent(PlayerEntity p_180439_1_, int p_180439_2_, BlockPos p_180439_3_, int p_180439_4_) -
destroyBlockProgress
-
hasRenderedAllChunks
public boolean hasRenderedAllChunks() -
needsUpdate
public void needsUpdate() -
updateGlobalBlockEntities
public void updateGlobalBlockEntities(Collection<TileEntity> p_181023_1_, Collection<TileEntity> p_181023_2_) -
getLightColor
-
getLightColor
public static int getLightColor(IBlockDisplayReader p_228420_0_, BlockState p_228420_1_, BlockPos p_228420_2_) -
entityTarget
-
getTranslucentTarget
-
getItemEntityTarget
-
getParticlesTarget
-
getWeatherTarget
-
getCloudsTarget
-
getResourceType
- Specified by:
getResourceType
in interfaceIResourceManagerReloadListener
-