Class RenderSectionRegion
java.lang.Object
net.minecraft.client.renderer.chunk.RenderSectionRegion
- All Implemented Interfaces:
BlockAndTintGetter, BlockAndLightGetter, BlockGetter, LevelHeightAccessor, IBlockGetterExtension
-
Nested Class Summary
Nested classes/interfaces inherited from interface BlockGetter
BlockGetter.BlockStepVisitor -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CardinalLightingprivate final ClientLevelprivate final LevelLightEngineprivate final intprivate final intprivate final intprivate final it.unimi.dsi.fastutil.longs.Long2ObjectFunction<ModelData> static final intprivate final SectionCopy[]static final intFields inherited from interface BlockAndTintGetter
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionRenderSectionRegion(ClientLevel level, int minSectionX, int minSectionY, int minSectionZ, SectionCopy[] sections) Deprecated.RenderSectionRegion(ClientLevel level, int minSectionX, int minSectionY, int minSectionZ, SectionCopy[] sections, it.unimi.dsi.fastutil.longs.Long2ObjectFunction<ModelData> modelDataSnapshot) -
Method Summary
Modifier and TypeMethodDescriptionGet theAuxiliaryLightManagerof the chunk at the givenChunkPos.@Nullable BlockEntitygetBlockEntity(BlockPos pos) getBlockState(BlockPos pos) intgetBlockTint(BlockPos pos, ColorResolver resolver) getFluidState(BlockPos pos) intintgetMinY()getModelData(BlockPos pos) Retrieves model data for a block at the given position.private SectionCopygetSection(int sectionX, int sectionY, int sectionZ) static intindex(int minSectionX, int minSectionY, int minSectionZ, int sectionX, int sectionY, int sectionZ) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BlockAndLightGetter
canSeeSky, getBrightness, getRawBrightnessMethods inherited from interface BlockGetter
clip, clipWithInteractionOverride, getBlockEntity, getBlockFloorHeight, getBlockFloorHeight, getBlockStates, getLightEmission, isBlockInLineMethods inherited from interface IBlockGetterExtension
getAuxLightManager
-
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
-
cardinalLighting
-
lightEngine
-
modelDataSnapshot
-
-
Constructor Details
-
RenderSectionRegion
@Deprecated RenderSectionRegion(ClientLevel level, int minSectionX, int minSectionY, int minSectionZ, SectionCopy[] sections) Deprecated. -
RenderSectionRegion
RenderSectionRegion(ClientLevel level, int minSectionX, int minSectionY, int minSectionZ, SectionCopy[] sections, it.unimi.dsi.fastutil.longs.Long2ObjectFunction<ModelData> modelDataSnapshot)
-
-
Method Details
-
getBlockState
- Specified by:
getBlockStatein interfaceBlockGetter
-
getFluidState
- Specified by:
getFluidStatein interfaceBlockGetter
-
cardinalLighting
- Specified by:
cardinalLightingin interfaceBlockAndTintGetter
-
getLightEngine
- Specified by:
getLightEnginein interfaceBlockAndLightGetter
-
getBlockEntity
- Specified by:
getBlockEntityin interfaceBlockGetter
-
getSection
-
getBlockTint
- Specified by:
getBlockTintin interfaceBlockAndTintGetter
-
getMinY
public int getMinY()- Specified by:
getMinYin interfaceLevelHeightAccessor
-
getHeight
public int getHeight()- Specified by:
getHeightin interfaceLevelHeightAccessor
-
getModelData
Description copied from interface:IBlockGetterExtensionRetrieves model data for a block at the given position.- Specified by:
getModelDatain interfaceIBlockGetterExtension- Parameters:
pos- the position to query- Returns:
- the model data at this position, or
ModelData.EMPTYif none exists
-
getAuxLightManager
Description copied from interface:IBlockGetterExtensionGet theAuxiliaryLightManagerof the chunk at the givenChunkPos.The light manager must be used to hold light values controlled by dynamic data from
BlockEntitys to ensure access to the light data is thread-safe and the data is available during chunk load from disk whereBlockEntitys are not yet added to the chunk.- Specified by:
getAuxLightManagerin interfaceIBlockGetterExtension- Parameters:
pos- The position of the chunk from which the light manager is requested- Returns:
- the light manager or
nullif the chunk is not accessible (ChunkSource.getChunkForLighting(int, int)returnednull) or the given implementation ofBlockGetterdoes not implement this method
-
index
public static int index(int minSectionX, int minSectionY, int minSectionZ, int sectionX, int sectionY, int sectionZ)
-
RenderSectionRegion(ClientLevel, int, int, int, SectionCopy[], it.unimi.dsi.fastutil.longs.Long2ObjectFunction)instead