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 pGraphEvents, ChunkPos pChunkPos) void
addSectionsInFrustum
(Frustum pFrustum, List<SectionRenderDispatcher.RenderSection> pSections) boolean
protected SectionOcclusionGraph.Node
getNode
(SectionRenderDispatcher.RenderSection pSection) getRelativeFrom
(BlockPos pPos, SectionRenderDispatcher.RenderSection pSection, Direction pDirection) private void
initializeQueueForFullUpdate
(Camera pCamera, Queue<SectionOcclusionGraph.Node> pNodeQueue) void
private boolean
isInViewDistance
(BlockPos pPos, BlockPos pOrigin) void
onChunkLoaded
(ChunkPos pChunkPos) void
private void
private void
runPartialUpdate
(boolean pSmartCull, Frustum pFrustum, List<SectionRenderDispatcher.RenderSection> pSections, Vec3 pCameraPosition) private void
runUpdates
(SectionOcclusionGraph.GraphStorage pGraphStorage, Vec3 pCameraPosition, Queue<SectionOcclusionGraph.Node> pNodeQueue, boolean pSmartCull, Consumer<SectionRenderDispatcher.RenderSection> pSections) private void
scheduleFullUpdate
(boolean pSmartCull, Camera pCamera, Vec3 pCameraPosition) void
update
(boolean pSmartCull, Camera pCamera, Frustum pFrustum, List<SectionRenderDispatcher.RenderSection> pSections) void
waitAndReset
(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:
-
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> pSections) -
consumeFrustumUpdate
public boolean consumeFrustumUpdate() -
onChunkLoaded
-
onSectionCompiled
-
update
public void update(boolean pSmartCull, Camera pCamera, Frustum pFrustum, List<SectionRenderDispatcher.RenderSection> pSections) -
scheduleFullUpdate
-
runPartialUpdate
private void runPartialUpdate(boolean pSmartCull, Frustum pFrustum, List<SectionRenderDispatcher.RenderSection> pSections, Vec3 pCameraPosition) -
queueSectionsWithNewNeighbors
-
addNeighbors
-
initializeQueueForFullUpdate
private void initializeQueueForFullUpdate(Camera pCamera, Queue<SectionOcclusionGraph.Node> pNodeQueue) -
runUpdates
private void runUpdates(SectionOcclusionGraph.GraphStorage pGraphStorage, Vec3 pCameraPosition, Queue<SectionOcclusionGraph.Node> pNodeQueue, boolean pSmartCull, Consumer<SectionRenderDispatcher.RenderSection> pSections) -
isInViewDistance
-
getRelativeFrom
@Nullable private SectionRenderDispatcher.RenderSection getRelativeFrom(BlockPos pPos, SectionRenderDispatcher.RenderSection pSection, Direction pDirection) -
getNode
@Nullable protected SectionOcclusionGraph.Node getNode(SectionRenderDispatcher.RenderSection pSection)
-