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 graphEvents, ChunkPos chunkPos) voidaddSectionsInFrustum(Frustum frustum, List<SectionRenderDispatcher.RenderSection> visibleSections, List<SectionRenderDispatcher.RenderSection> nearbyVisibleSections) booleangetRelativeFrom(long sectionPos, SectionRenderDispatcher.RenderSection section, Direction direction) private voidinitializeQueueForFullUpdate(Camera camera, Queue<SectionOcclusionGraph.Node> nodeQueue) voidprivate booleanisInViewDistance(long centerPos, long pos) voidonChunkReadyToRender(ChunkPos chunkPos) private voidprivate voidrunPartialUpdate(boolean smartCull, Frustum frustum, List<SectionRenderDispatcher.RenderSection> visibleSections, Vec3 cameraPosition, it.unimi.dsi.fastutil.longs.LongOpenHashSet loadedEmptySections) private voidrunUpdates(SectionOcclusionGraph.GraphStorage storage, Vec3 cameraPosition, Queue<SectionOcclusionGraph.Node> queue, boolean smartCull, Consumer<SectionRenderDispatcher.RenderSection> visibleSectionConsumer, it.unimi.dsi.fastutil.longs.LongOpenHashSet loadedEmptySection) private voidscheduleFullUpdate(boolean smartCull, Camera camera, Vec3 cameraPosition, it.unimi.dsi.fastutil.longs.LongOpenHashSet loadedEmptySections) voidvoidupdate(boolean smartCull, Camera camera, Frustum frustum, List<SectionRenderDispatcher.RenderSection> visibleSections, it.unimi.dsi.fastutil.longs.LongOpenHashSet loadedEmptySections) voidwaitAndReset(ViewArea viewArea)
-
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 frustum, List<SectionRenderDispatcher.RenderSection> visibleSections, List<SectionRenderDispatcher.RenderSection> nearbyVisibleSections) -
consumeFrustumUpdate
public boolean consumeFrustumUpdate() -
onChunkReadyToRender
-
schedulePropagationFrom
-
update
public void update(boolean smartCull, Camera camera, Frustum frustum, List<SectionRenderDispatcher.RenderSection> visibleSections, it.unimi.dsi.fastutil.longs.LongOpenHashSet loadedEmptySections) -
scheduleFullUpdate
-
runPartialUpdate
private void runPartialUpdate(boolean smartCull, Frustum frustum, List<SectionRenderDispatcher.RenderSection> visibleSections, Vec3 cameraPosition, it.unimi.dsi.fastutil.longs.LongOpenHashSet loadedEmptySections) -
queueSectionsWithNewNeighbors
-
addNeighbors
-
initializeQueueForFullUpdate
private void initializeQueueForFullUpdate(Camera camera, Queue<SectionOcclusionGraph.Node> nodeQueue) -
runUpdates
private void runUpdates(SectionOcclusionGraph.GraphStorage storage, Vec3 cameraPosition, Queue<SectionOcclusionGraph.Node> queue, boolean smartCull, Consumer<SectionRenderDispatcher.RenderSection> visibleSectionConsumer, it.unimi.dsi.fastutil.longs.LongOpenHashSet loadedEmptySection) -
isInViewDistance
private boolean isInViewDistance(long centerPos, long pos) -
getRelativeFrom
@Nullable private SectionRenderDispatcher.RenderSection getRelativeFrom(long sectionPos, SectionRenderDispatcher.RenderSection section, Direction direction) -
getNode
-
getOctree
-