Class RenderSectionRegion
java.lang.Object
net.minecraft.client.renderer.chunk.RenderSectionRegion
- All Implemented Interfaces:
BlockAndTintGetter
,BlockGetter
,LevelHeightAccessor
,IBlockAndTintGetterExtension
,IBlockGetterExtension
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.level.BlockGetter
BlockGetter.BlockStepVisitor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Level
private final int
private final int
private final int
private final it.unimi.dsi.fastutil.longs.Long2ObjectFunction
<ModelData> static final int
private final SectionCopy[]
static final int
Fields inherited from interface net.minecraft.world.level.BlockGetter
MAX_BLOCK_ITERATIONS_ALONG_TRAVEL
-
Constructor Summary
ConstructorsConstructorDescriptionRenderSectionRegion
(Level pLevel, int pMinSectionX, int pMinSectionY, int pMinSectionZ, SectionCopy[] pSections) Deprecated.RenderSectionRegion
(Level pLevel, int pMinSectionX, int pMinSectionY, int pMinSectionZ, SectionCopy[] pSections, it.unimi.dsi.fastutil.longs.Long2ObjectFunction<ModelData> modelDataSnapshot) -
Method Summary
Modifier and TypeMethodDescriptionGet theAuxiliaryLightManager
of the chunk at the givenChunkPos
.getBlockEntity
(BlockPos pPos) getBlockState
(BlockPos pPos) int
getBlockTint
(BlockPos pBlockPos, ColorResolver pColorResolver) getFluidState
(BlockPos pPos) int
int
getMinY()
getModelData
(BlockPos pos) Retrieves model data for a block at the given position.private SectionCopy
getSection
(int pX, int pY, int pZ) float
getShade
(float normalX, float normalY, float normalZ, boolean shade) Computes the shade for a given normal.float
static int
index
(int pMinX, int pMinY, int pMinZ, int pX, int pY, int pZ) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.level.BlockAndTintGetter
canSeeSky, getBrightness, getRawBrightness
Methods inherited from interface net.minecraft.world.level.BlockGetter
clip, clipWithInteractionOverride, getBlockEntity, getBlockFloorHeight, getBlockFloorHeight, getBlockStates, getLightEmission, isBlockInLine
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockGetterExtension
getAuxLightManager
Methods inherited from interface net.minecraft.world.level.LevelHeightAccessor
getMaxSectionY, getMaxY, getMinSectionY, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isInsideBuildHeight, isOutsideBuildHeight, isOutsideBuildHeight
-
Field Details
-
RADIUS
public static final int RADIUS- See Also:
-
SIZE
public static final int SIZE- See Also:
-
minSectionX
private final int minSectionX -
minSectionY
private final int minSectionY -
minSectionZ
private final int minSectionZ -
sections
-
level
-
modelDataSnapshot
-
-
Constructor Details
-
RenderSectionRegion
@Deprecated RenderSectionRegion(Level pLevel, int pMinSectionX, int pMinSectionY, int pMinSectionZ, SectionCopy[] pSections) Deprecated. -
RenderSectionRegion
RenderSectionRegion(Level pLevel, int pMinSectionX, int pMinSectionY, int pMinSectionZ, SectionCopy[] pSections, it.unimi.dsi.fastutil.longs.Long2ObjectFunction<ModelData> modelDataSnapshot)
-
-
Method Details
-
getBlockState
- Specified by:
getBlockState
in interfaceBlockGetter
-
getFluidState
- Specified by:
getFluidState
in interfaceBlockGetter
-
getShade
- Specified by:
getShade
in interfaceBlockAndTintGetter
-
getLightEngine
- Specified by:
getLightEngine
in interfaceBlockAndTintGetter
-
getBlockEntity
- Specified by:
getBlockEntity
in interfaceBlockGetter
-
getSection
-
getBlockTint
- Specified by:
getBlockTint
in interfaceBlockAndTintGetter
-
getMinY
public int getMinY()- Specified by:
getMinY
in interfaceLevelHeightAccessor
-
getHeight
public int getHeight()- Specified by:
getHeight
in interfaceLevelHeightAccessor
-
getShade
public float getShade(float normalX, float normalY, float normalZ, boolean shade) Description copied from interface:IBlockAndTintGetterExtension
Computes the shade for a given normal. Alternate version of the vanilla method taking in aDirection
.- Specified by:
getShade
in interfaceIBlockAndTintGetterExtension
-
getModelData
Description copied from interface:IBlockGetterExtension
Retrieves model data for a block at the given position.- Specified by:
getModelData
in interfaceIBlockGetterExtension
- Parameters:
pos
- the position to query- Returns:
- the model data at this position, or
ModelData.EMPTY
if none exists
-
getAuxLightManager
Description copied from interface:IBlockGetterExtension
Get theAuxiliaryLightManager
of the chunk at the givenChunkPos
.The light manager must be used to hold light values controlled by dynamic data from
BlockEntity
s to ensure access to the light data is thread-safe and the data is available during chunk load from disk whereBlockEntity
s are not yet added to the chunk.- Specified by:
getAuxLightManager
in interfaceIBlockGetterExtension
- Parameters:
pos
- The position of the chunk from which the light manager is requested- Returns:
- the light manager or
null
if the chunk is not accessible (ChunkSource.getChunkForLighting(int, int)
returnednull
) or the given implementation ofBlockGetter
does not implement this method
-
index
public static int index(int pMinX, int pMinY, int pMinZ, int pX, int pY, int pZ)
-
RenderSectionRegion(Level, int, int, int, SectionCopy[], it.unimi.dsi.fastutil.longs.Long2ObjectFunction)
instead