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 TypeClassDescriptionclass
(package private) class
(package private) class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AABB
private boolean
final int
private boolean
(package private) final BlockPos.MutableBlockPos
final AtomicReference
<SectionMesh> (package private) long
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
compileSync
(RenderRegionCache pRegionCache) createCompileTask
(RenderRegionCache pRegionCache) (package private) VertexSorting
createVertexSorting
(SectionPos pSectionPos) private boolean
doesChunkExistAt
(long pPos) Returns the bounding box of the section.long
getNeighborSectionNode
(Direction pDirection) Returns the block position at the origin of the section.long
boolean
boolean
boolean
isDirty()
boolean
boolean
isEmpty()
Returns true if the compiled section contains no chunk render layers.void
rebuildSectionAsync
(RenderRegionCache pRegionCache) void
reset()
void
resortTransparency
(SectionRenderDispatcher pDispatcher) void
setDirty
(boolean pPlayerChanged) void
(package private) void
setSectionMesh
(SectionMesh pSectionMesh) void
setSectionNode
(long pSectionNode) boolean
upload
(Map<ChunkSectionLayer, MeshData> pRenderedLayers, CompiledSectionMesh pMesh) uploadSectionIndexBuffer
(CompiledSectionMesh pMesh, ByteBufferBuilder.Result pResult, ChunkSectionLayer pLayer)
-
Field Details
-
SIZE
public static final int SIZE- See Also:
-
index
public final int index -
sectionMesh
-
lastRebuildTask
-
lastResortTransparencyTask
@Nullable private SectionRenderDispatcher.RenderSection.ResortTransparencyTask lastResortTransparencyTask -
bb
-
dirty
private boolean dirty -
sectionNode
volatile long sectionNode -
renderOrigin
-
playerChanged
private boolean playerChanged
-
-
Constructor Details
-
RenderSection
public RenderSection(int pIndex, long pSectionNode)
-
-
Method Details
-
doesChunkExistAt
private boolean doesChunkExistAt(long pPos) -
hasAllNeighbors
public boolean hasAllNeighbors() -
getBoundingBox
Description copied from interface:IRenderableSection
Returns the bounding box of the section.- Specified by:
getBoundingBox
in interfaceIRenderableSection
- Returns:
- the bounding box of the section
-
upload
public CompletableFuture<Void> upload(Map<ChunkSectionLayer, MeshData> pRenderedLayers, CompiledSectionMesh pMesh) -
uploadSectionIndexBuffer
public CompletableFuture<Void> uploadSectionIndexBuffer(CompiledSectionMesh pMesh, ByteBufferBuilder.Result pResult, ChunkSectionLayer pLayer) -
setSectionNode
public void setSectionNode(long pSectionNode) -
getSectionMesh
-
reset
public void reset() -
getRenderOrigin
Description copied from interface:IRenderableSection
Returns the block position at the origin of the section.- Specified by:
getRenderOrigin
in interfaceIRenderableSection
- Returns:
- the block position at the origin of the section
-
getSectionNode
public long getSectionNode() -
setDirty
public void setDirty(boolean pPlayerChanged) -
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
public SectionRenderDispatcher.RenderSection.CompileTask createCompileTask(RenderRegionCache pRegionCache) -
rebuildSectionAsync
-
compileSync
-
setSectionMesh
-
createVertexSorting
-
isEmpty
public boolean isEmpty()Description copied from interface:IRenderableSection
Returns true if the compiled section contains no chunk render layers.- Specified by:
isEmpty
in interfaceIRenderableSection
- Returns:
- true if the compiled section contains no chunk render layers
-