Package net.minecraft.client.renderer
Class LevelRenderer
java.lang.Object
net.minecraft.client.renderer.LevelRenderer
- All Implemented Interfaces:
AutoCloseable,PreparableReloadListener,ResourceManagerReloadListener
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
PreparableReloadListener.PreparationBarrier -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BlockEntityRenderDispatcherprivate Frustumprivate booleanprivate VertexBufferprotected static final ResourceLocationprivate RenderTargetprivate intprivate Frustumprivate VertexBufferprivate final it.unimi.dsi.fastutil.ints.Int2ObjectMap<BlockDestructionProgress> private final it.unimi.dsi.fastutil.longs.Long2ObjectMap<SortedSet<BlockDestructionProgress>> static final Direction[]private static final ResourceLocationprivate PostChainprivate final EntityRenderDispatcherprivate RenderTargetprivate static final ResourceLocationprivate final RunningTrimmedMeanprivate final org.joml.Vector4f[]private final org.joml.Vector3dprivate booleanprivate final Set<BlockEntity> Global block entities; these are always rendered, even if off-screen.static final intprivate RenderTargetprivate intprivate intprivate intprivate intprivate ClientLevelprivate static final org.slf4j.Loggerprivate static final intprivate final Minecraftprivate static final ResourceLocationprivate booleanNeo: Indicates whether outline effect post-processing was requested for the current frame outside of vanilla codepathsprivate RenderTargetprivate final Map<BlockPos, SoundInstance> private doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate Vec3private CloudStatusprivate intprivate intprivate intprivate static final intprivate static final ResourceLocationprivate static final intprivate final float[]private final float[]private intprivate final RenderBuffersprivate intstatic final intprivate final SectionOcclusionGraphprivate SectionRenderDispatcherprivate static final floatprivate VertexBufferprivate static final ResourceLocationprivate VertexBufferprivate static final ResourceLocationprivate intprivate RenderTargetprivate PostChainprivate static final intprivate ViewAreaprivate final it.unimi.dsi.fastutil.objects.ObjectArrayList<SectionRenderDispatcher.RenderSection> private RenderTargetprivate doubleprivate doubleprivate double -
Constructor Summary
ConstructorsConstructorDescriptionLevelRenderer(Minecraft pMinecraft, EntityRenderDispatcher pEntityRenderDispatcher, BlockEntityRenderDispatcher pBlockEntityRenderDispatcher, RenderBuffers pRenderBuffers) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddChainedFilledBoxVertices(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 voidaddChainedFilledBoxVertices(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 voidaddFrustumQuad(VertexConsumer pConsumer, org.joml.Matrix4f pMatrix, int pIndex1, int pIndex2, int pIndex3, int pIndex4, int pRed, int pGreen, int pBlue) private voidaddFrustumVertex(VertexConsumer pConsumer, org.joml.Matrix4f pMatrix, int pVertexIndex) voidaddParticle(ParticleOptions pOptions, boolean pForce, boolean pDecreased, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) voidaddParticle(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 ParticleaddParticleInternal(ParticleOptions pOptions, boolean pForce, boolean pDecreased, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) private ParticleaddParticleInternal(ParticleOptions pOptions, boolean pForce, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) voidaddRecentlyCompiledSection(SectionRenderDispatcher.RenderSection pRenderSection) voidprivate voidapplyFrustum(Frustum pFrustum) voidblockChanged(BlockGetter pLevel, BlockPos pPos, BlockState pOldState, BlockState pNewState, int pFlags) private MeshDatabuildClouds(Tesselator pTesselator, double pX, double pY, double pZ, Vec3 pCloudColor) private static MeshDatabuildSkyDisc(Tesselator pTesselator, float pY) private ParticleStatuscalculateParticleLevel(boolean pDecreased) Calculates the level of particles to use based on the particles option and the specifieddecreasedparameter.voidprivate voidcaptureFrustum(org.joml.Matrix4f pViewMatrix, org.joml.Matrix4f pProjectionMatrix, double pCamX, double pCamY, double pCamZ, Frustum pCapturedFrustrum) private voidcheckPoseStack(PoseStack pPoseStack) Asserts that the specifiedposeStackis clear.voidclear()voidclose()private voidcompileSections(Camera pCamera) intprivate voidprivate voidprivate voidprivate voidvoiddestroyBlockProgress(int pBreakerId, BlockPos pPos, int pProgress) voidprivate booleandoesMobEffectBlockSky(Camera pCamera) private MeshDatadrawStars(Tesselator pTesselator) doublestatic intgetLightColor(BlockAndTintGetter pLevel, BlockPos pPos) static intgetLightColor(BlockAndTintGetter pLevel, BlockState pState, BlockPos pPos) intgetTicks()doublevoidglobalLevelEvent(int pType, BlockPos pPos, int pData) Handles a global level event.voidbooleanvoidprivate voidbooleanisSectionCompiled(BlockPos pPos) voiditerateVisibleBlockEntities(Consumer<BlockEntity> blockEntityConsumer) voidvoidlevelEvent(int pType, BlockPos pPos, int pData) private static Vec3mixColor(float pHue) voidprivate voidnotifyNearbyEntities(Level pLevel, BlockPos pPos, boolean pPlaying) Notifies living entities in a 3 block range of the specifiedposthat a record is or isn't playing nearby, dependent on the specifiedplayingparameter.static FrustumoffsetFrustum(Frustum pFrustum) voidonChunkLoaded(ChunkPos pChunkPos) voidonResourceManagerReload(ResourceManager pResourceManager) voidplayJukeboxSong(Holder<JukeboxSong> pSong, BlockPos pPos) voidprepareCullFrustum(Vec3 pCameraPosition, org.joml.Matrix4f pFrustumMatrix, org.joml.Matrix4f pProjectionMatrix) private voidremoveProgress(BlockDestructionProgress pProgress) voidrenderClouds(PoseStack pPoseStack, org.joml.Matrix4f pFrustumMatrix, org.joml.Matrix4f pProjectionMatrix, float pPartialTick, double pCamX, double pCamY, double pCamZ) private voidrenderDebug(PoseStack pPoseStack, MultiBufferSource pBuffer, Camera pCamera) private voidrenderEndSky(PoseStack pPoseStack) private voidrenderEntity(Entity pEntity, double pCamX, double pCamY, double pCamZ, float pPartialTick, PoseStack pPoseStack, MultiBufferSource pBufferSource) static voidrenderFace(PoseStack pPoseStack, VertexConsumer pBuffer, Direction pFace, float pX1, float pY1, float pZ1, float pX2, float pY2, float pZ2, float pRed, float pGreen, float pBlue, float pAlpha) private voidrenderHitOutline(PoseStack pPoseStack, VertexConsumer pConsumer, Entity pEntity, double pCamX, double pCamY, double pCamZ, BlockPos pPos, BlockState pState) voidrenderLevel(DeltaTracker pDeltaTracker, boolean pRenderBlockOutline, Camera pCamera, GameRenderer pGameRenderer, LightTexture pLightTexture, org.joml.Matrix4f pFrustumMatrix, org.joml.Matrix4f pProjectionMatrix) static voidrenderLineBox(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 voidrenderLineBox(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 voidrenderLineBox(PoseStack pPoseStack, VertexConsumer pBuffer, AABB pBox, float pRed, float pGreen, float pBlue, float pAlpha) static voidrenderLineBox(VertexConsumer pConsumer, double pMinX, double pMinY, double pMinZ, double pMaxX, double pMaxY, double pMaxZ, float pRed, float pGreen, float pBlue, float pAlpha) private voidrenderSectionLayer(RenderType pRenderType, double pX, double pY, double pZ, org.joml.Matrix4f pFrustrumMatrix, org.joml.Matrix4f pProjectionMatrix) private static voidrenderShape(PoseStack pPoseStack, VertexConsumer pConsumer, VoxelShape pShape, double pX, double pY, double pZ, float pRed, float pGreen, float pBlue, float pAlpha) voidrenderSky(org.joml.Matrix4f pFrustumMatrix, org.joml.Matrix4f pProjectionMatrix, float pPartialTick, Camera pCamera, boolean pIsFoggy, Runnable pSkyFogSetup) private voidrenderSnowAndRain(LightTexture pLightTexture, float pPartialTick, double pCamX, double pCamY, double pCamZ) static voidrenderVoxelShape(PoseStack pPoseStack, VertexConsumer pConsumer, VoxelShape pShape, double pX, double pY, double pZ, float pRed, float pGreen, float pBlue, float pAlpha, boolean p_286443_) private voidrenderWorldBorder(Camera pCamera) voidNeo: Request outline effect post-processing to be enabled for the current frame.voidresize(int pWidth, int pHeight) private voidsetBlockDirty(BlockPos pPos, boolean pReRenderOnMainThread) voidsetBlockDirty(BlockPos pPos, BlockState pOldState, BlockState pNewState) voidsetBlocksDirty(int pMinX, int pMinY, int pMinZ, int pMaxX, int pMaxY, int pMaxZ) Re-renders all blocks in the specified range.voidsetLevel(ClientLevel pLevel) voidsetSectionDirty(int pSectionX, int pSectionY, int pSectionZ) private voidsetSectionDirty(int pSectionX, int pSectionY, int pSectionZ, boolean pReRenderOnMainThread) voidsetSectionDirtyWithNeighbors(int pSectionX, int pSectionY, int pSectionZ) private voidsetupRender(Camera pCamera, Frustum pFrustum, boolean pHasCapturedFrustum, boolean pIsSpectator) private static Vec3shiftHue(float pRed, float pGreen, float pBlue, float pHue) private voidshootParticles(int pDirection, BlockPos pPos, RandomSource pRandom, SimpleParticleType pParticleType) booleanprivate voidstopJukeboxSong(BlockPos pPos) voidvoidtick()voidvoidupdateGlobalBlockEntities(Collection<BlockEntity> pBlockEntitiesToRemove, Collection<BlockEntity> pBlockEntitiesToAdd) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
getNameMethods inherited from interface net.minecraft.server.packs.resources.ResourceManagerReloadListener
reload
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
SECTION_SIZE
public static final int SECTION_SIZE- See Also:
-
HALF_SECTION_SIZE
public static final int HALF_SECTION_SIZE- See Also:
-
SKY_DISC_RADIUS
private static final float SKY_DISC_RADIUS- See Also:
-
MIN_FOG_DISTANCE
private static final int MIN_FOG_DISTANCE- See Also:
-
RAIN_RADIUS
private static final int RAIN_RADIUS- See Also:
-
RAIN_DIAMETER
private static final int RAIN_DIAMETER- See Also:
-
TRANSPARENT_SORT_COUNT
private static final int TRANSPARENT_SORT_COUNT- See Also:
-
MOON_LOCATION
-
SUN_LOCATION
-
CLOUDS_LOCATION
-
END_SKY_LOCATION
-
FORCEFIELD_LOCATION
-
RAIN_LOCATION
-
SNOW_LOCATION
-
DIRECTIONS
-
minecraft
-
entityRenderDispatcher
-
blockEntityRenderDispatcher
-
renderBuffers
-
level
-
sectionOcclusionGraph
-
visibleSections
private final it.unimi.dsi.fastutil.objects.ObjectArrayList<SectionRenderDispatcher.RenderSection> visibleSections -
globalBlockEntities
Global block entities; these are always rendered, even if off-screen. Any block entity is added to this ifBlockEntityRenderer.shouldRenderOffScreen(net.minecraft.world.level.block.entity.BlockEntity)returnstrue. -
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 -
playingJukeboxSongs
-
entityTarget
-
entityEffect
-
translucentTarget
-
itemEntityTarget
-
particlesTarget
-
weatherTarget
-
cloudsTarget
-
transparencyChain
-
lastCameraSectionX
private int lastCameraSectionX -
lastCameraSectionY
private int lastCameraSectionY -
lastCameraSectionZ
private int lastCameraSectionZ -
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
-
sectionRenderDispatcher
-
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 -
rainSoundTime
private int rainSoundTime -
rainSizeX
private final float[] rainSizeX -
rainSizeZ
private final float[] rainSizeZ -
outlineEffectRequested
private boolean outlineEffectRequestedNeo: Indicates whether outline effect post-processing was requested for the current frame outside of vanilla codepaths
-
-
Constructor Details
-
LevelRenderer
public LevelRenderer(Minecraft pMinecraft, EntityRenderDispatcher pEntityRenderDispatcher, BlockEntityRenderDispatcher pBlockEntityRenderDispatcher, RenderBuffers pRenderBuffers)
-
-
Method Details
-
renderSnowAndRain
private void renderSnowAndRain(LightTexture pLightTexture, float pPartialTick, double pCamX, double pCamY, double pCamZ) -
tickRain
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
onResourceManagerReload
- Specified by:
onResourceManagerReloadin interfaceResourceManagerReloadListener
-
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
- Parameters:
pLevel- the level to set, ornullto clear
-
graphicsChanged
public void graphicsChanged() -
allChanged
public void allChanged() -
resize
public void resize(int pWidth, int pHeight) -
getSectionStatistics
-
getSectionRenderDispatcher
-
getTotalSections
public double getTotalSections() -
getLastViewDistance
public double getLastViewDistance() -
countRenderedSections
public int countRenderedSections() -
getEntityStatistics
-
setupRender
-
offsetFrustum
-
applyFrustum
-
addRecentlyCompiledSection
-
captureFrustum
private void captureFrustum(org.joml.Matrix4f pViewMatrix, org.joml.Matrix4f pProjectionMatrix, double pCamX, double pCamY, double pCamZ, Frustum pCapturedFrustrum) -
prepareCullFrustum
public void prepareCullFrustum(Vec3 pCameraPosition, org.joml.Matrix4f pFrustumMatrix, org.joml.Matrix4f pProjectionMatrix) -
renderLevel
public void renderLevel(DeltaTracker pDeltaTracker, boolean pRenderBlockOutline, Camera pCamera, GameRenderer pGameRenderer, LightTexture pLightTexture, org.joml.Matrix4f pFrustumMatrix, org.joml.Matrix4f pProjectionMatrix) -
checkPoseStack
Asserts that the specifiedposeStackis clear.- Throws:
IllegalStateException- if the specifiedposeStackis not clear
-
renderEntity
private void renderEntity(Entity pEntity, double pCamX, double pCamY, double pCamZ, float pPartialTick, PoseStack pPoseStack, MultiBufferSource pBufferSource) -
renderSectionLayer
private void renderSectionLayer(RenderType pRenderType, double pX, double pY, double pZ, org.joml.Matrix4f pFrustrumMatrix, 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 pFrustumMatrix, org.joml.Matrix4f pProjectionMatrix, float pPartialTick, double pCamX, double pCamY, double pCamZ) -
buildClouds
private MeshData buildClouds(Tesselator pTesselator, double pX, double pY, double pZ, Vec3 pCloudColor) -
compileSections
-
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 pBuffer, 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) -
renderFace
public static void renderFace(PoseStack pPoseStack, VertexConsumer pBuffer, Direction pFace, float pX1, float pY1, float pZ1, float pX2, float pY2, float pZ2, 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) Re-renders all blocks in the specified range. -
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() -
iterateVisibleBlockEntities
-
requestOutlineEffect
public void requestOutlineEffect()Neo: Request outline effect post-processing to be enabled for the current frame. Must be called before block entities are done rendering, ideally early during the frame -
playJukeboxSong
-
stopJukeboxSong
-
stopJukeboxSongAndNotifyNearby
-
notifyNearbyEntities
Notifies living entities in a 3 block range of the specifiedposthat a record is or isn't playing nearby, dependent on the specifiedplayingparameter. This is used to make parrots start or stop partying. -
addParticle
public void addParticle(ParticleOptions pOptions, boolean pForce, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) - Parameters:
pForce- iftrue, the particle will be created regardless of its distance from the camera and thecalculateParticleLevel(boolean) calculated particle level}invalid @linkplain
{@linkplain #
-
addParticle
public void addParticle(ParticleOptions pOptions, boolean pForce, boolean pDecreased, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) - Parameters:
pForce- iftrue, the particle will be created regardless of its distance from the camera and thecalculateParticleLevel(boolean) calculated particle level}invalid @linkplain
{@linkplain #pDecreased- iftrue, and the particles option is set to minimal, attempts to spawn the particle at a decreased level
-
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) - Parameters:
pForce- iftrue, the particle will be created regardless of its distance from the camera and thecalculateParticleLevel(boolean) calculated particle level}invalid @linkplain
{@linkplain #
-
addParticleInternal
@Nullable private Particle addParticleInternal(ParticleOptions pOptions, boolean pForce, boolean pDecreased, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) - Parameters:
pForce- iftrue, the particle will be created regardless of its distance from the camera and thecalculateParticleLevel(boolean) calculated particle level}invalid @linkplain
{@linkplain #pDecreased- iftrue, and the particles option is set to minimal, attempts to spawn the particle at a decreased level
-
calculateParticleLevel
Calculates the level of particles to use based on the particles option and the specifieddecreasedparameter. This leads to randomly generating more or less particles than the set option.- Parameters:
pDecreased- iftrue, and the particles option is set to minimal, has a 1 in 10 chance to return a decreased level and a further 1 in 3 chance to minimise it
-
clear
public void clear() -
globalLevelEvent
Handles a global level event. This includes playing sounds that should be heard by any player, regardless of position and dimension, such as the Wither spawning.- Parameters:
pType- the type of level event to handle. This method only handles invalid input: '{@' linkplain net.minecraft.world.level.block.LevelEvent# SOUND_WITHER_BOSS_SPAWN the wither boss spawn sound}, the dragon's death sound, and the end portal spawn sound.
-
levelEvent
-
destroyBlockProgress
-
hasRenderedAllSections
public boolean hasRenderedAllSections() -
onChunkLoaded
-
needsUpdate
public void needsUpdate() -
updateGlobalBlockEntities
public void updateGlobalBlockEntities(Collection<BlockEntity> pBlockEntitiesToRemove, Collection<BlockEntity> pBlockEntitiesToAdd) -
getLightColor
-
getLightColor
-
isSectionCompiled
-
entityTarget
-
getTranslucentTarget
-
getItemEntityTarget
-
getParticlesTarget
-
getWeatherTarget
-
getCloudsTarget
-
shootParticles
private void shootParticles(int pDirection, BlockPos pPos, RandomSource pRandom, SimpleParticleType pParticleType)
-