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 class
protected static class
(package private) static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final double
private final AtomicReference
<SectionOcclusionGraph.GraphState> private static final Direction[]
private Future
<?> private static final org.slf4j.Logger
private static final int
private final AtomicBoolean
private boolean
private final AtomicReference
<SectionOcclusionGraph.GraphEvents> private ViewArea
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addNeighbors
(SectionOcclusionGraph.GraphEvents graphEvents, ChunkPos chunkPos) void
addSectionsInFrustum
(Frustum frustum, List<SectionRenderDispatcher.RenderSection> sections) boolean
protected SectionOcclusionGraph.Node
getRelativeFrom
(BlockPos pos, SectionRenderDispatcher.RenderSection section, Direction direction) private void
initializeQueueForFullUpdate
(Camera camera, Queue<SectionOcclusionGraph.Node> nodeQueue) void
private boolean
isInViewDistance
(BlockPos pos, BlockPos origin) void
onChunkLoaded
(ChunkPos chunkPos) void
private void
private void
runPartialUpdate
(boolean smartCull, Frustum p_frustum, List<SectionRenderDispatcher.RenderSection> sections, Vec3 cameraPosition) private void
runUpdates
(SectionOcclusionGraph.GraphStorage graphStorage, Vec3 cameraPosition, Queue<SectionOcclusionGraph.Node> nodeQueue, boolean smartCull, Consumer<SectionRenderDispatcher.RenderSection> sections) private void
scheduleFullUpdate
(boolean smartCull, Camera camera, Vec3 cameraPosition) void
update
(boolean smartCull, Camera camera, Frustum frustum, List<SectionRenderDispatcher.RenderSection> sections) void
waitAndReset
(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:
-
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> sections) -
consumeFrustumUpdate
public boolean consumeFrustumUpdate() -
onChunkLoaded
-
onSectionCompiled
-
update
public void update(boolean smartCull, Camera camera, Frustum frustum, List<SectionRenderDispatcher.RenderSection> sections) -
scheduleFullUpdate
-
runPartialUpdate
private void runPartialUpdate(boolean smartCull, Frustum p_frustum, List<SectionRenderDispatcher.RenderSection> sections, Vec3 cameraPosition) -
queueSectionsWithNewNeighbors
-
addNeighbors
-
initializeQueueForFullUpdate
private void initializeQueueForFullUpdate(Camera camera, Queue<SectionOcclusionGraph.Node> nodeQueue) -
runUpdates
private void runUpdates(SectionOcclusionGraph.GraphStorage graphStorage, Vec3 cameraPosition, Queue<SectionOcclusionGraph.Node> nodeQueue, boolean smartCull, Consumer<SectionRenderDispatcher.RenderSection> sections) -
isInViewDistance
-
getRelativeFrom
@Nullable private SectionRenderDispatcher.RenderSection getRelativeFrom(BlockPos pos, SectionRenderDispatcher.RenderSection section, Direction direction) -
getNode
@Nullable protected SectionOcclusionGraph.Node getNode(SectionRenderDispatcher.RenderSection section)
-