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 p_295866_, ChunkPos p_295968_) void
addSectionsInFrustum
(Frustum p_294180_, List<SectionRenderDispatcher.RenderSection> p_296160_, List<SectionRenderDispatcher.RenderSection> p_371751_) boolean
getNode
(SectionRenderDispatcher.RenderSection p_296364_) getRelativeFrom
(long p_366669_, SectionRenderDispatcher.RenderSection p_295211_, Direction p_294491_) private void
initializeQueueForFullUpdate
(Camera p_295148_, Queue<SectionOcclusionGraph.Node> p_294801_) void
private boolean
isInViewDistance
(long p_366544_, long p_366485_) void
onChunkReadyToRender
(ChunkPos p_294122_) 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 p_294431_)
-
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 p_294180_, List<SectionRenderDispatcher.RenderSection> p_296160_, List<SectionRenderDispatcher.RenderSection> p_371751_) -
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 p_295148_, Queue<SectionOcclusionGraph.Node> p_294801_) -
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 p_366544_, long p_366485_) -
getRelativeFrom
@Nullable private SectionRenderDispatcher.RenderSection getRelativeFrom(long p_366669_, SectionRenderDispatcher.RenderSection p_295211_, Direction p_294491_) -
getNode
@Nullable public SectionOcclusionGraph.Node getNode(SectionRenderDispatcher.RenderSection p_296364_) -
getOctree
-