Class SectionRenderDispatcher.RenderSection
java.lang.Object
net.minecraft.client.renderer.chunk.SectionRenderDispatcher.RenderSection
- All Implemented Interfaces:
IRenderableSection
- Enclosing class:
SectionRenderDispatcher
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassprivate classprivate class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AABBprivate booleanprivate longfinal intprivate @Nullable SectionRenderDispatcher.RenderSection.RebuildTaskprivate @Nullable SectionRenderDispatcher.RenderSection.ResortTransparencyTaskprivate booleanprivate final BlockPos.MutableBlockPosfinal AtomicReference<SectionMesh> private longstatic final intprivate longprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanaddSectionBuffersToUberBuffer(ChunkSectionLayer layer, CompiledSectionMesh key, @Nullable ByteBuffer vertexBuffer, @Nullable ByteBuffer indexBuffer) protected voidprivate voidcheckSectionMesh(CompiledSectionMesh compiledSectionMesh) voidcompileSync(RenderRegionCache cache) private VertexSortingcreateVertexSorting(SectionPos sectionPos, Vec3 cameraPos) private booleandoesChunkExistAt(long sectionNode) Returns the bounding box of the section.longgetNeighborSectionNode(Direction direction) Returns the block position at the origin of the section.longfloatgetVisibility(long now) booleanboolean(package private) voidindexBufferUploadCallback(SectionMesh sectionMesh, ChunkSectionLayer layer, boolean sortedIndexBuffer) booleanisDirty()booleanbooleanisEmpty()Returns true if the compiled section contains no chunk render layers.voidprivate voidreleaseSectionMesh(SectionMesh oldMesh) voidreset()voidresortTransparency(SectionRenderDispatcher dispatcher) voidsetDirty(boolean fromPlayer) voidsetFadeDuration(long fadeDuration) voidprivate SectionMeshsetSectionMesh(SectionMesh sectionMesh) voidsetSectionNode(long sectionNode) voidsetWasPreviouslyEmpty(boolean wasPreviouslyEmpty) boolean(package private) voidvertexBufferUploadCallback(SectionMesh sectionMesh, ChunkSectionLayer layer) boolean
-
Field Details
-
SIZE
public static final int SIZE- See Also:
-
index
public final int index -
sectionMesh
-
lastRebuildTask
-
lastResortTransparencyTask
private @Nullable SectionRenderDispatcher.RenderSection.ResortTransparencyTask lastResortTransparencyTask -
bb
-
dirty
private boolean dirty -
sectionNode
private volatile long sectionNode -
renderOrigin
-
playerChanged
private boolean playerChanged -
uploadedTime
private long uploadedTime -
fadeDuration
private long fadeDuration -
wasPreviouslyEmpty
private boolean wasPreviouslyEmpty
-
-
Constructor Details
-
RenderSection
public RenderSection(int index, long sectionNode)
-
-
Method Details
-
getVisibility
public float getVisibility(long now) -
setFadeDuration
public void setFadeDuration(long fadeDuration) -
setWasPreviouslyEmpty
public void setWasPreviouslyEmpty(boolean wasPreviouslyEmpty) -
wasPreviouslyEmpty
public boolean wasPreviouslyEmpty() -
doesChunkExistAt
private boolean doesChunkExistAt(long sectionNode) -
hasAllNeighbors
public boolean hasAllNeighbors() -
getBoundingBox
Description copied from interface:IRenderableSectionReturns the bounding box of the section.- Specified by:
getBoundingBoxin interfaceIRenderableSection- Returns:
- the bounding box of the section
-
setSectionNode
public void setSectionNode(long sectionNode) -
getSectionMesh
-
reset
public void reset() -
getRenderOrigin
Description copied from interface:IRenderableSectionReturns the block position at the origin of the section.- Specified by:
getRenderOriginin interfaceIRenderableSection- Returns:
- the block position at the origin of the section
-
getSectionNode
public long getSectionNode() -
setDirty
public void setDirty(boolean fromPlayer) -
setNotDirty
public void setNotDirty() -
isDirty
public boolean isDirty() -
isDirtyFromPlayer
public boolean isDirtyFromPlayer() -
getNeighborSectionNode
-
resortTransparency
-
hasTranslucentGeometry
public boolean hasTranslucentGeometry() -
transparencyResortingScheduled
public boolean transparencyResortingScheduled() -
cancelTasks
protected void cancelTasks() -
createCompileTask
-
rebuildSectionAsync
-
compileSync
-
setSectionMesh
-
releaseSectionMesh
-
createVertexSorting
-
checkSectionMesh
-
vertexBufferUploadCallback
-
indexBufferUploadCallback
void indexBufferUploadCallback(SectionMesh sectionMesh, ChunkSectionLayer layer, boolean sortedIndexBuffer) -
addSectionBuffersToUberBuffer
private boolean addSectionBuffersToUberBuffer(ChunkSectionLayer layer, CompiledSectionMesh key, @Nullable ByteBuffer vertexBuffer, @Nullable ByteBuffer indexBuffer) -
isEmpty
public boolean isEmpty()Description copied from interface:IRenderableSectionReturns true if the compiled section contains no chunk render layers.- Specified by:
isEmptyin interfaceIRenderableSection- Returns:
- true if the compiled section contains no chunk render layers
-