Class SectionOcclusionGraph
java.lang.Object
net.minecraft.client.renderer.SectionOcclusionGraph
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final recordprivate static final recordprivate static classstatic classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final doubleprivate final AtomicReference<@Nullable SectionOcclusionGraph.GraphState> private static final Direction[]private @Nullable Future<?> private static final org.slf4j.Loggerprivate static final intprivate static final intprivate final AtomicBooleanprivate booleanprivate final AtomicReference<@Nullable SectionOcclusionGraph.GraphEvents> private @Nullable ViewArea -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddNeighbors(SectionOcclusionGraph.GraphEvents events, ChunkPos pos) voidaddSectionsInFrustum(Frustum frustum, List<SectionRenderDispatcher.RenderSection> visibleSections, List<SectionRenderDispatcher.RenderSection> nearbyVisibleSection) boolean@Nullable SectionOcclusionGraph.Nodeprivate @Nullable SectionRenderDispatcher.RenderSectiongetRelativeFrom(long cameraSectionNode, SectionRenderDispatcher.RenderSection renderSection, Direction direction) private voidinitializeQueueForFullUpdate(Camera camera, Queue<SectionOcclusionGraph.Node> queue) voidprivate booleanisInViewDistance(long cameraSectionNode, long sectionNode) voidprivate voidprivate voidrunPartialUpdate(boolean smartCull, Frustum frustum, List<SectionRenderDispatcher.RenderSection> visibleSections, Vec3 cameraPos, it.unimi.dsi.fastutil.longs.LongOpenHashSet loadedEmptySections) private voidrunUpdates(SectionOcclusionGraph.GraphStorage storage, Vec3 cameraPos, Queue<SectionOcclusionGraph.Node> queue, boolean smartCull, Consumer<SectionRenderDispatcher.RenderSection> onSectionAdded, it.unimi.dsi.fastutil.longs.LongOpenHashSet emptySections) private voidscheduleFullUpdate(boolean smartCull, Camera camera, Vec3 cameraPos, 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(@Nullable 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> nearbyVisibleSection) -
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 cameraPos, it.unimi.dsi.fastutil.longs.LongOpenHashSet loadedEmptySections) -
queueSectionsWithNewNeighbors
-
addNeighbors
-
initializeQueueForFullUpdate
-
runUpdates
private void runUpdates(SectionOcclusionGraph.GraphStorage storage, Vec3 cameraPos, Queue<SectionOcclusionGraph.Node> queue, boolean smartCull, Consumer<SectionRenderDispatcher.RenderSection> onSectionAdded, it.unimi.dsi.fastutil.longs.LongOpenHashSet emptySections) -
isInViewDistance
private boolean isInViewDistance(long cameraSectionNode, long sectionNode) -
getRelativeFrom
private @Nullable SectionRenderDispatcher.RenderSection getRelativeFrom(long cameraSectionNode, SectionRenderDispatcher.RenderSection renderSection, Direction direction) -
getNode
-
getOctree
-