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
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 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> pVisibleSections, List<SectionRenderDispatcher.RenderSection> pNearbyVisibleSections) boolean
getNode
(SectionRenderDispatcher.RenderSection pSection) getRelativeFrom
(long pSectionPos, SectionRenderDispatcher.RenderSection pSection, Direction pDirection) private void
initializeQueueForFullUpdate
(Camera pCamera, Queue<SectionOcclusionGraph.Node> pNodeQueue) void
private boolean
isInViewDistance
(long pCenterPos, long pPos) void
onChunkReadyToRender
(ChunkPos pChunkPos) private void
private void
runPartialUpdate
(boolean p_294795_, Frustum p_294341_, List<SectionRenderDispatcher.RenderSection> p_294796_, Vec3 p_295915_, it.unimi.dsi.fastutil.longs.LongOpenHashSet p_366753_) private void
runUpdates
(SectionOcclusionGraph.GraphStorage p_295507_, Vec3 p_294343_, Queue<SectionOcclusionGraph.Node> p_295598_, boolean p_295668_, Consumer<SectionRenderDispatcher.RenderSection> p_295393_, it.unimi.dsi.fastutil.longs.LongOpenHashSet p_366468_) private void
scheduleFullUpdate
(boolean p_294514_, Camera p_295663_, Vec3 p_295096_, it.unimi.dsi.fastutil.longs.LongOpenHashSet p_366772_) void
void
update
(boolean p_294298_, Camera p_294529_, Frustum p_294426_, List<SectionRenderDispatcher.RenderSection> p_295280_, it.unimi.dsi.fastutil.longs.LongOpenHashSet p_366410_) 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:
-
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 p_294298_, Camera p_294529_, Frustum p_294426_, List<SectionRenderDispatcher.RenderSection> p_295280_, it.unimi.dsi.fastutil.longs.LongOpenHashSet p_366410_) -
scheduleFullUpdate
-
runPartialUpdate
private void runPartialUpdate(boolean p_294795_, Frustum p_294341_, List<SectionRenderDispatcher.RenderSection> p_294796_, Vec3 p_295915_, it.unimi.dsi.fastutil.longs.LongOpenHashSet p_366753_) -
queueSectionsWithNewNeighbors
-
addNeighbors
-
initializeQueueForFullUpdate
private void initializeQueueForFullUpdate(Camera pCamera, Queue<SectionOcclusionGraph.Node> pNodeQueue) -
runUpdates
private void runUpdates(SectionOcclusionGraph.GraphStorage p_295507_, Vec3 p_294343_, Queue<SectionOcclusionGraph.Node> p_295598_, boolean p_295668_, Consumer<SectionRenderDispatcher.RenderSection> p_295393_, it.unimi.dsi.fastutil.longs.LongOpenHashSet p_366468_) -
isInViewDistance
private boolean isInViewDistance(long pCenterPos, long pPos) -
getRelativeFrom
@Nullable private SectionRenderDispatcher.RenderSection getRelativeFrom(long pSectionPos, SectionRenderDispatcher.RenderSection pSection, Direction pDirection) -
getNode
-
getOctree
-