类 LevelRenderer
java.lang.Object
net.minecraft.client.renderer.LevelRenderer
-
嵌套类概要
嵌套类修饰符和类型类说明(专用程序包) static class
(专用程序包) static class
(专用程序包) static class
static class
从接口继承的嵌套类/接口 net.minecraft.server.packs.resources.PreparableReloadListener
PreparableReloadListener.PreparationBarrier
-
字段概要
字段修饰符和类型字段说明private final BlockEntityRenderDispatcher
private Frustum
private boolean
private static final double
static final int
private ChunkRenderDispatcher
private VertexBuffer
private static final ResourceLocation
private RenderTarget
private int
private Frustum
private VertexBuffer
private final it.unimi.dsi.fastutil.ints.Int2ObjectMap<BlockDestructionProgress>
private final it.unimi.dsi.fastutil.longs.Long2ObjectMap<SortedSet<BlockDestructionProgress>>
static final Direction[]
private static final ResourceLocation
private PostChain
private final EntityRenderDispatcher
private RenderTarget
private static final ResourceLocation
private final RunningTrimmedMean
private final org.joml.Vector4f[]
private final org.joml.Vector3d
private boolean
private final Set<BlockEntity>
private static final int
private static final int
private RenderTarget
private int
private int
private int
private double
private double
private double
private Future<?>
private int
private ClientLevel
private static final org.slf4j.Logger
private static final int
private final Minecraft
private static final int
private static final ResourceLocation
private final AtomicBoolean
private boolean
private final AtomicLong
private RenderTarget
private final Map<BlockPos,
SoundInstance> private double
private double
private double
private double
private double
private Vec3
private CloudStatus
private int
private int
private int
private static final int
private static final ResourceLocation
private static final int
private final float[]
private final float[]
private int
private final BlockingQueue<ChunkRenderDispatcher.RenderChunk>
private final RenderBuffers
private final it.unimi.dsi.fastutil.objects.ObjectArrayList<LevelRenderer.RenderChunkInfo>
private final AtomicReference<LevelRenderer.RenderChunkStorage>
private int
private static final float
private VertexBuffer
private static final ResourceLocation
private VertexBuffer
private static final ResourceLocation
private int
private RenderTarget
private PostChain
private static final int
private ViewArea
private RenderTarget
private double
private double
private double
-
构造器概要
构造器构造器说明LevelRenderer
(Minecraft pMinecraft, EntityRenderDispatcher pEntityRenderDispatcher, BlockEntityRenderDispatcher pBlockEntityRenderDispatcher, RenderBuffers pRenderBuffers) -
方法概要
修饰符和类型方法说明static void
addChainedFilledBoxVertices
(PoseStack pPoseStack, VertexConsumer pConsumer, double pMinX, double pMinY, double pMinZ, double pMaxX, double pMaxY, double pMaxZ, float pRed, float pGreen, float pBlue, float pAlpha) static void
addChainedFilledBoxVertices
(PoseStack pPoseStack, VertexConsumer pConsumer, float pMinX, float pMinY, float pMinZ, float pMaxX, float pMaxY, float pMaxZ, float pRed, float pGreen, float pBlue, float pAlpha) private void
addFrustumQuad
(VertexConsumer pConsumer, org.joml.Matrix4f pMatrix, int pIndex1, int pIndex2, int pIndex3, int pIndex4, int pRed, int pGreen, int pBlue) private void
addFrustumVertex
(VertexConsumer pConsumer, org.joml.Matrix4f pMatrix, int pVertexIndex) void
addParticle
(ParticleOptions pOptions, boolean pForce, boolean pDecreased, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) void
addParticle
(ParticleOptions pOptions, boolean pForce, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) private <T extends ParticleOptions>
voidaddParticle
(T pOptions, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) private Particle
addParticleInternal
(ParticleOptions pOptions, boolean pForce, boolean pDecreased, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) private Particle
addParticleInternal
(ParticleOptions pOptions, boolean pForce, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) void
addRecentlyCompiledChunk
(ChunkRenderDispatcher.RenderChunk pRenderChunk) void
private void
applyFrustum
(Frustum pFrustum) void
blockChanged
(BlockGetter pLevel, BlockPos pPos, BlockState pOldState, BlockState pNewState, int pFlags) private BufferBuilder.RenderedBuffer
buildClouds
(BufferBuilder pBuilder, double pX, double pY, double pZ, Vec3 pCloudColor) private static BufferBuilder.RenderedBuffer
buildSkyDisc
(BufferBuilder pBuilder, float pY) private ParticleStatus
calculateParticleLevel
(boolean pDecreased) void
private void
captureFrustum
(org.joml.Matrix4f pViewMatrix, org.joml.Matrix4f pProjectionMatrix, double pCamX, double pCamY, double pCamZ, Frustum pCapturedFrustrum) private void
checkPoseStack
(PoseStack pPoseStack) void
clear()
void
close()
private boolean
closeToBorder
(BlockPos pPos, ChunkRenderDispatcher.RenderChunk pChunk) private void
compileChunks
(Camera pCamera) int
private void
private void
private void
private void
void
destroyBlockProgress
(int pBreakerId, BlockPos pPos, int pProgress) void
private boolean
doesMobEffectBlockSky
(Camera pCamera) private BufferBuilder.RenderedBuffer
drawStars
(BufferBuilder pBuilder) double
static int
getLightColor
(BlockAndTintGetter pLevel, BlockPos pPos) static int
getLightColor
(BlockAndTintGetter pLevel, BlockState pState, BlockPos pPos) getRelativeFrom
(BlockPos pCameraChunkPos, ChunkRenderDispatcher.RenderChunk pRenderChunk, Direction pFacing) int
getTicks()
double
void
globalLevelEvent
(int pType, BlockPos pPos, int pData) void
boolean
private void
initializeQueueForFullUpdate
(Camera pCamera, Queue<LevelRenderer.RenderChunkInfo> pInfoQueue) void
private void
boolean
isChunkCompiled
(BlockPos pPos) void
void
levelEvent
(int pType, BlockPos pPos, int pData) private static Vec3
mixColor
(float pHue) void
private void
notifyNearbyEntities
(Level pLevel, BlockPos pPos, boolean pPlaying) void
onResourceManagerReload
(ResourceManager pResourceManager) void
playStreamingMusic
(SoundEvent pSoundEvent, BlockPos pPos) 已过时。Forge: Use item aware function belowvoid
playStreamingMusic
(SoundEvent pSoundEvent, BlockPos pPos, RecordItem musicDiscItem) void
prepareCullFrustum
(PoseStack pPoseStack, Vec3 pCameraPos, org.joml.Matrix4f pProjectionMatrix) private void
removeProgress
(BlockDestructionProgress pProgress) private void
renderChunkLayer
(RenderType pRenderType, PoseStack pPoseStack, double pCamX, double pCamY, double pCamZ, org.joml.Matrix4f pProjectionMatrix) void
renderClouds
(PoseStack pPoseStack, org.joml.Matrix4f pProjectionMatrix, float pPartialTick, double pCamX, double pCamY, double pCamZ) private void
renderDebug
(PoseStack pPoseStack, MultiBufferSource pBuffer, Camera pCamera) private void
renderEndSky
(PoseStack pPoseStack) private void
renderEntity
(Entity pEntity, double pCamX, double pCamY, double pCamZ, float pPartialTick, PoseStack pPoseStack, MultiBufferSource pBufferSource) private void
renderHitOutline
(PoseStack pPoseStack, VertexConsumer pConsumer, Entity pEntity, double pCamX, double pCamY, double pCamZ, BlockPos pPos, BlockState pState) void
renderLevel
(PoseStack pPoseStack, float pPartialTick, long pFinishNanoTime, boolean pRenderBlockOutline, Camera pCamera, GameRenderer pGameRenderer, LightTexture pLightTexture, org.joml.Matrix4f pProjectionMatrix) static void
renderLineBox
(PoseStack pPoseStack, VertexConsumer pConsumer, double pMinX, double pMinY, double pMinZ, double pMaxX, double pMaxY, double pMaxZ, float pRed, float pGreen, float pBlue, float pAlpha) static void
renderLineBox
(PoseStack pPoseStack, VertexConsumer pConsumer, double pMinX, double pMinY, double pMinZ, double pMaxX, double pMaxY, double pMaxZ, float pRed, float pGreen, float pBlue, float pAlpha, float pRed2, float pGreen2, float pBlue2) static void
renderLineBox
(PoseStack pPoseStack, VertexConsumer pConsumer, AABB pBox, float pRed, float pGreen, float pBlue, float pAlpha) static void
renderLineBox
(VertexConsumer pConsumer, double pMinX, double pMinY, double pMinZ, double pMaxX, double pMaxY, double pMaxZ, float pRed, float pGreen, float pBlue, float pAlpha) private static void
renderShape
(PoseStack pPoseStack, VertexConsumer pConsumer, VoxelShape pShape, double pX, double pY, double pZ, float pRed, float pGreen, float pBlue, float pAlpha) void
renderSky
(PoseStack pPoseStack, org.joml.Matrix4f pProjectionMatrix, float pPartialTick, Camera pCamera, boolean pIsFoggy, Runnable pSkyFogSetup) private void
renderSnowAndRain
(LightTexture pLightTexture, float pPartialTick, double pCamX, double pCamY, double pCamZ) static void
renderVoxelShape
(PoseStack pPoseStack, VertexConsumer pConsumer, VoxelShape pShape, double pX, double pY, double pZ, float pRed, float pGreen, float pBlue, float pAlpha, boolean p_286443_) private void
renderWorldBorder
(Camera pCamera) void
resize
(int pWidth, int pHeight) private void
setBlockDirty
(BlockPos pPos, boolean pReRenderOnMainThread) void
setBlockDirty
(BlockPos pPos, BlockState pOldState, BlockState pNewState) void
setBlocksDirty
(int pMinX, int pMinY, int pMinZ, int pMaxX, int pMaxY, int pMaxZ) void
setLevel
(ClientLevel pLevel) void
setSectionDirty
(int pSectionX, int pSectionY, int pSectionZ) private void
setSectionDirty
(int pSectionX, int pSectionY, int pSectionZ, boolean pReRenderOnMainThread) void
setSectionDirtyWithNeighbors
(int pSectionX, int pSectionY, int pSectionZ) private void
setupRender
(Camera pCamera, Frustum pFrustum, boolean pHasCapturedFrustum, boolean pIsSpectator) private static Vec3
shiftHue
(float pRed, float pGreen, float pBlue, float pHue) boolean
void
tick()
void
void
updateGlobalBlockEntities
(Collection<BlockEntity> pBlockEntitiesToRemove, Collection<BlockEntity> pBlockEntitiesToAdd) private void
updateRenderChunks
(LinkedHashSet<LevelRenderer.RenderChunkInfo> pChunkInfos, LevelRenderer.RenderInfoMap pInfoMap, Vec3 pViewVector, Queue<LevelRenderer.RenderChunkInfo> pInfoQueue, boolean pShouldCull) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.minecraft.server.packs.resources.PreparableReloadListener
getName
从接口继承的方法 net.minecraft.server.packs.resources.ResourceManagerReloadListener
reload
-
字段详细资料
-
LOGGER
private static final org.slf4j.Logger LOGGER -
CHUNK_SIZE
public static final int CHUNK_SIZE- 另请参阅:
-
HALF_CHUNK_SIZE
private static final int HALF_CHUNK_SIZE- 另请参阅:
-
SKY_DISC_RADIUS
private static final float SKY_DISC_RADIUS- 另请参阅:
-
MINIMUM_ADVANCED_CULLING_DISTANCE
private static final int MINIMUM_ADVANCED_CULLING_DISTANCE- 另请参阅:
-
CEILED_SECTION_DIAGONAL
private static final double CEILED_SECTION_DIAGONAL -
MIN_FOG_DISTANCE
private static final int MIN_FOG_DISTANCE- 另请参阅:
-
RAIN_RADIUS
private static final int RAIN_RADIUS- 另请参阅:
-
RAIN_DIAMETER
private static final int RAIN_DIAMETER- 另请参阅:
-
TRANSPARENT_SORT_COUNT
private static final int TRANSPARENT_SORT_COUNT- 另请参阅:
-
HALF_A_SECOND_IN_MILLIS
private static final int HALF_A_SECOND_IN_MILLIS- 另请参阅:
-
MOON_LOCATION
-
SUN_LOCATION
-
CLOUDS_LOCATION
-
END_SKY_LOCATION
-
FORCEFIELD_LOCATION
-
RAIN_LOCATION
-
SNOW_LOCATION
-
DIRECTIONS
-
minecraft
-
entityRenderDispatcher
-
blockEntityRenderDispatcher
-
renderBuffers
-
level
-
recentlyCompiledChunks
-
renderChunkStorage
-
renderChunksInFrustum
private final it.unimi.dsi.fastutil.objects.ObjectArrayList<LevelRenderer.RenderChunkInfo> renderChunksInFrustum -
globalBlockEntities
-
lastFullRenderChunkUpdate
-
viewArea
-
starBuffer
-
skyBuffer
-
darkBuffer
-
generateClouds
private boolean generateClouds -
cloudBuffer
-
frameTimes
-
ticks
private int ticks -
destroyingBlocks
-
destructionProgress
private final it.unimi.dsi.fastutil.longs.Long2ObjectMap<SortedSet<BlockDestructionProgress>> 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
-
lastViewDistance
private int lastViewDistance -
renderedEntities
private int renderedEntities -
culledEntities
private int culledEntities -
cullingFrustum
-
captureFrustum
private boolean captureFrustum -
capturedFrustum
-
frustumPoints
private final org.joml.Vector4f[] frustumPoints -
frustumPos
private final org.joml.Vector3d frustumPos -
xTransparentOld
private double xTransparentOld -
yTransparentOld
private double yTransparentOld -
zTransparentOld
private double zTransparentOld -
needsFullRenderChunkUpdate
private boolean needsFullRenderChunkUpdate -
nextFullUpdateMillis
-
needsFrustumUpdate
-
rainSoundTime
private int rainSoundTime -
rainSizeX
private final float[] rainSizeX -
rainSizeZ
private final float[] rainSizeZ
-
-
构造器详细资料
-
LevelRenderer
public LevelRenderer(Minecraft pMinecraft, EntityRenderDispatcher pEntityRenderDispatcher, BlockEntityRenderDispatcher pBlockEntityRenderDispatcher, RenderBuffers pRenderBuffers)
-
-
方法详细资料
-
renderSnowAndRain
private void renderSnowAndRain(LightTexture pLightTexture, float pPartialTick, double pCamX, double pCamY, double pCamZ) -
tickRain
-
close
public void close()- 指定者:
close
在接口中AutoCloseable
-
onResourceManagerReload
-
initOutline
public void initOutline() -
initTransparency
private void initTransparency() -
deinitTransparency
private void deinitTransparency() -
doEntityOutline
public void doEntityOutline() -
shouldShowEntityOutlines
public boolean shouldShowEntityOutlines() -
createDarkSky
private void createDarkSky() -
createLightSky
private void createLightSky() -
buildSkyDisc
-
createStars
private void createStars() -
drawStars
-
setLevel
-
graphicsChanged
public void graphicsChanged() -
allChanged
public void allChanged() -
resize
public void resize(int pWidth, int pHeight) -
getChunkStatistics
-
getChunkRenderDispatcher
-
getTotalChunks
public double getTotalChunks() -
getLastViewDistance
public double getLastViewDistance() -
countRenderedChunks
public int countRenderedChunks() -
getEntityStatistics
-
setupRender
-
applyFrustum
-
initializeQueueForFullUpdate
private void initializeQueueForFullUpdate(Camera pCamera, Queue<LevelRenderer.RenderChunkInfo> pInfoQueue) -
addRecentlyCompiledChunk
-
updateRenderChunks
private void updateRenderChunks(LinkedHashSet<LevelRenderer.RenderChunkInfo> pChunkInfos, LevelRenderer.RenderInfoMap pInfoMap, Vec3 pViewVector, Queue<LevelRenderer.RenderChunkInfo> pInfoQueue, boolean pShouldCull) -
getRelativeFrom
@Nullable private ChunkRenderDispatcher.RenderChunk getRelativeFrom(BlockPos pCameraChunkPos, ChunkRenderDispatcher.RenderChunk pRenderChunk, Direction pFacing) -
closeToBorder
-
captureFrustum
private void captureFrustum(org.joml.Matrix4f pViewMatrix, org.joml.Matrix4f pProjectionMatrix, double pCamX, double pCamY, double pCamZ, Frustum pCapturedFrustrum) -
prepareCullFrustum
-
renderLevel
public void renderLevel(PoseStack pPoseStack, float pPartialTick, long pFinishNanoTime, boolean pRenderBlockOutline, Camera pCamera, GameRenderer pGameRenderer, LightTexture pLightTexture, org.joml.Matrix4f pProjectionMatrix) -
checkPoseStack
-
renderEntity
private void renderEntity(Entity pEntity, double pCamX, double pCamY, double pCamZ, float pPartialTick, PoseStack pPoseStack, MultiBufferSource pBufferSource) -
renderChunkLayer
private void renderChunkLayer(RenderType pRenderType, PoseStack pPoseStack, double pCamX, double pCamY, double pCamZ, org.joml.Matrix4f pProjectionMatrix) -
renderDebug
-
addFrustumVertex
private void addFrustumVertex(VertexConsumer pConsumer, org.joml.Matrix4f pMatrix, int pVertexIndex) -
addFrustumQuad
private void addFrustumQuad(VertexConsumer pConsumer, org.joml.Matrix4f pMatrix, int pIndex1, int pIndex2, int pIndex3, int pIndex4, int pRed, int pGreen, int pBlue) -
captureFrustum
public void captureFrustum() -
killFrustum
public void killFrustum() -
tick
public void tick() -
removeProgress
-
renderEndSky
-
renderSky
-
doesMobEffectBlockSky
-
renderClouds
public void renderClouds(PoseStack pPoseStack, org.joml.Matrix4f pProjectionMatrix, float pPartialTick, double pCamX, double pCamY, double pCamZ) -
buildClouds
private BufferBuilder.RenderedBuffer buildClouds(BufferBuilder pBuilder, double pX, double pY, double pZ, Vec3 pCloudColor) -
compileChunks
-
renderWorldBorder
-
renderHitOutline
private void renderHitOutline(PoseStack pPoseStack, VertexConsumer pConsumer, Entity pEntity, double pCamX, double pCamY, double pCamZ, BlockPos pPos, BlockState pState) -
mixColor
-
shiftHue
-
renderVoxelShape
public static void renderVoxelShape(PoseStack pPoseStack, VertexConsumer pConsumer, VoxelShape pShape, double pX, double pY, double pZ, float pRed, float pGreen, float pBlue, float pAlpha, boolean p_286443_) -
renderShape
private static void renderShape(PoseStack pPoseStack, VertexConsumer pConsumer, VoxelShape pShape, double pX, double pY, double pZ, float pRed, float pGreen, float pBlue, float pAlpha) -
renderLineBox
public static void renderLineBox(VertexConsumer pConsumer, double pMinX, double pMinY, double pMinZ, double pMaxX, double pMaxY, double pMaxZ, float pRed, float pGreen, float pBlue, float pAlpha) -
renderLineBox
public static void renderLineBox(PoseStack pPoseStack, VertexConsumer pConsumer, AABB pBox, float pRed, float pGreen, float pBlue, float pAlpha) -
renderLineBox
public static void renderLineBox(PoseStack pPoseStack, VertexConsumer pConsumer, double pMinX, double pMinY, double pMinZ, double pMaxX, double pMaxY, double pMaxZ, float pRed, float pGreen, float pBlue, float pAlpha) -
renderLineBox
public static void renderLineBox(PoseStack pPoseStack, VertexConsumer pConsumer, double pMinX, double pMinY, double pMinZ, double pMaxX, double pMaxY, double pMaxZ, float pRed, float pGreen, float pBlue, float pAlpha, float pRed2, float pGreen2, float pBlue2) -
addChainedFilledBoxVertices
public static void addChainedFilledBoxVertices(PoseStack pPoseStack, VertexConsumer pConsumer, double pMinX, double pMinY, double pMinZ, double pMaxX, double pMaxY, double pMaxZ, float pRed, float pGreen, float pBlue, float pAlpha) -
addChainedFilledBoxVertices
public static void addChainedFilledBoxVertices(PoseStack pPoseStack, VertexConsumer pConsumer, float pMinX, float pMinY, float pMinZ, float pMaxX, float pMaxY, float pMaxZ, float pRed, float pGreen, float pBlue, float pAlpha) -
blockChanged
public void blockChanged(BlockGetter pLevel, BlockPos pPos, BlockState pOldState, BlockState pNewState, int pFlags) -
setBlockDirty
-
setBlocksDirty
public void setBlocksDirty(int pMinX, int pMinY, int pMinZ, int pMaxX, int pMaxY, int pMaxZ) -
setBlockDirty
-
setSectionDirtyWithNeighbors
public void setSectionDirtyWithNeighbors(int pSectionX, int pSectionY, int pSectionZ) -
setSectionDirty
public void setSectionDirty(int pSectionX, int pSectionY, int pSectionZ) -
setSectionDirty
private void setSectionDirty(int pSectionX, int pSectionY, int pSectionZ, boolean pReRenderOnMainThread) -
getFrustum
-
getTicks
public int getTicks() -
playStreamingMusic
已过时。Forge: Use item aware function below -
playStreamingMusic
public void playStreamingMusic(@Nullable SoundEvent pSoundEvent, BlockPos pPos, @Nullable RecordItem musicDiscItem) -
notifyNearbyEntities
-
addParticle
public void addParticle(ParticleOptions pOptions, boolean pForce, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) -
addParticle
public void addParticle(ParticleOptions pOptions, boolean pForce, boolean pDecreased, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) -
addParticle
private <T extends ParticleOptions> void addParticle(T pOptions, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) -
addParticleInternal
@Nullable private Particle addParticleInternal(ParticleOptions pOptions, boolean pForce, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) -
addParticleInternal
@Nullable private Particle addParticleInternal(ParticleOptions pOptions, boolean pForce, boolean pDecreased, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) -
calculateParticleLevel
-
clear
public void clear() -
globalLevelEvent
-
levelEvent
-
destroyBlockProgress
-
hasRenderedAllChunks
public boolean hasRenderedAllChunks() -
needsUpdate
public void needsUpdate() -
updateGlobalBlockEntities
public void updateGlobalBlockEntities(Collection<BlockEntity> pBlockEntitiesToRemove, Collection<BlockEntity> pBlockEntitiesToAdd) -
getLightColor
-
getLightColor
-
isChunkCompiled
-
entityTarget
-
getTranslucentTarget
-
getItemEntityTarget
-
getParticlesTarget
-
getWeatherTarget
-
getCloudsTarget
-