Package net.minecraft.client.renderer
Class SectionOcclusionGraph
java.lang.Object
net.minecraft.client.renderer.SectionOcclusionGraph
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final record(package private) static final record(package private) static classstatic class(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final doubleprivate final AtomicReference<SectionOcclusionGraph.GraphState> private static final Direction[]private Future<?> private static final org.slf4j.Loggerprivate static final intprivate static final intprivate final AtomicBooleanprivate booleanprivate final AtomicReference<SectionOcclusionGraph.GraphEvents> private ViewArea -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddNeighbors(SectionOcclusionGraph.GraphEvents pGraphEvents, ChunkPos pChunkPos) voidaddSectionsInFrustum(Frustum pFrustum, List<SectionRenderDispatcher.RenderSection> pVisibleSections, List<SectionRenderDispatcher.RenderSection> pNearbyVisibleSections) booleangetNode(SectionRenderDispatcher.RenderSection pSection) getRelativeFrom(long pSectionPos, SectionRenderDispatcher.RenderSection pSection, Direction pDirection) private voidinitializeQueueForFullUpdate(Camera pCamera, Queue<SectionOcclusionGraph.Node> pNodeQueue) voidprivate booleanisInViewDistance(long pCenterPos, long pPos) voidonChunkReadyToRender(ChunkPos pChunkPos) private voidprivate voidrunPartialUpdate(boolean pSmartCull, Frustum pFrustum, List<SectionRenderDispatcher.RenderSection> pVisibleSections, Vec3 pCameraPosition, it.unimi.dsi.fastutil.longs.LongOpenHashSet pLoadedEmptySections) private voidrunUpdates(SectionOcclusionGraph.GraphStorage pStorage, Vec3 pCameraPosition, Queue<SectionOcclusionGraph.Node> pQueue, boolean pSmartCull, Consumer<SectionRenderDispatcher.RenderSection> pVisibleSectionConsumer, it.unimi.dsi.fastutil.longs.LongOpenHashSet pLoadedEmptySection) private voidscheduleFullUpdate(boolean pSmartCull, Camera pCamera, Vec3 pCameraPosition, it.unimi.dsi.fastutil.longs.LongOpenHashSet pLoadedEmptySections) voidvoidupdate(boolean pSmartCull, Camera pCamera, Frustum pFrustum, List<SectionRenderDispatcher.RenderSection> pVisibleSections, it.unimi.dsi.fastutil.longs.LongOpenHashSet pLoadedEmptySections) voidwaitAndReset(ViewArea pViewArea)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
DIRECTIONS
-
MINIMUM_ADVANCED_CULLING_DISTANCE
private static final int MINIMUM_ADVANCED_CULLING_DISTANCE- See Also:
-
MINIMUM_ADVANCED_CULLING_SECTION_DISTANCE
private static final int MINIMUM_ADVANCED_CULLING_SECTION_DISTANCE -
CEILED_SECTION_DIAGONAL
private static final double CEILED_SECTION_DIAGONAL -
needsFullUpdate
private boolean needsFullUpdate -
fullUpdateTask
-
viewArea
-
currentGraph
-
nextGraphEvents
-
needsFrustumUpdate
-
-
Constructor Details
-
SectionOcclusionGraph
public SectionOcclusionGraph()
-
-
Method Details
-
waitAndReset
-
invalidate
public void invalidate() -
addSectionsInFrustum
public void addSectionsInFrustum(Frustum pFrustum, List<SectionRenderDispatcher.RenderSection> pVisibleSections, List<SectionRenderDispatcher.RenderSection> pNearbyVisibleSections) -
consumeFrustumUpdate
public boolean consumeFrustumUpdate() -
onChunkReadyToRender
-
schedulePropagationFrom
-
update
public void update(boolean pSmartCull, Camera pCamera, Frustum pFrustum, List<SectionRenderDispatcher.RenderSection> pVisibleSections, it.unimi.dsi.fastutil.longs.LongOpenHashSet pLoadedEmptySections) -
scheduleFullUpdate
-
runPartialUpdate
private void runPartialUpdate(boolean pSmartCull, Frustum pFrustum, List<SectionRenderDispatcher.RenderSection> pVisibleSections, Vec3 pCameraPosition, it.unimi.dsi.fastutil.longs.LongOpenHashSet pLoadedEmptySections) -
queueSectionsWithNewNeighbors
-
addNeighbors
-
initializeQueueForFullUpdate
private void initializeQueueForFullUpdate(Camera pCamera, Queue<SectionOcclusionGraph.Node> pNodeQueue) -
runUpdates
private void runUpdates(SectionOcclusionGraph.GraphStorage pStorage, Vec3 pCameraPosition, Queue<SectionOcclusionGraph.Node> pQueue, boolean pSmartCull, Consumer<SectionRenderDispatcher.RenderSection> pVisibleSectionConsumer, it.unimi.dsi.fastutil.longs.LongOpenHashSet pLoadedEmptySection) -
isInViewDistance
private boolean isInViewDistance(long pCenterPos, long pPos) -
getRelativeFrom
@Nullable private SectionRenderDispatcher.RenderSection getRelativeFrom(long pSectionPos, SectionRenderDispatcher.RenderSection pSection, Direction pDirection) -
getNode
-
getOctree
-