Class RenderChunkRegion
java.lang.Object
net.minecraft.client.renderer.chunk.RenderChunkRegion
- All Implemented Interfaces:
BlockAndTintGetter,BlockGetter,LevelHeightAccessor,IBlockAndTintGetterExtension,IBlockGetterExtension
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final intprotected final RenderChunk[][]protected final Levelprivate final it.unimi.dsi.fastutil.longs.Long2ObjectFunction<ModelData> -
Constructor Summary
ConstructorsConstructorDescriptionRenderChunkRegion(Level p_200456_, int p_200457_, int p_200458_, RenderChunk[][] p_200459_) Deprecated.RenderChunkRegion(Level p_200456_, int p_200457_, int p_200458_, RenderChunk[][] p_200459_, it.unimi.dsi.fastutil.longs.Long2ObjectFunction<ModelData> modelDataSnapshot) -
Method Summary
Modifier and TypeMethodDescriptionGet theAuxiliaryLightManagerof the chunk at the givenChunkPos.getBlockEntity(BlockPos p_112945_) getBlockState(BlockPos p_112947_) intgetBlockTint(BlockPos p_112937_, ColorResolver p_112938_) getFluidState(BlockPos p_112943_) intintgetModelData(BlockPos pos) Retrieves model data for a block at the given position.floatgetShade(float normalX, float normalY, float normalZ, boolean shade) Computes the shade for a given normal.floatMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.BlockAndTintGetter
canSeeSky, getBrightness, getRawBrightnessMethods inherited from interface net.minecraft.world.level.BlockGetter
clip, clipWithInteractionOverride, getBlockEntity, getBlockFloorHeight, getBlockFloorHeight, getBlockStates, getLightEmission, getMaxLightLevel, isBlockInLineMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockGetterExtension
getAuxLightManagerMethods inherited from interface net.minecraft.world.level.LevelHeightAccessor
getMaxBuildHeight, getMaxSection, getMinSection, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isOutsideBuildHeight, isOutsideBuildHeight
-
Field Details
-
centerX
private final int centerX -
centerZ
private final int centerZ -
chunks
-
level
-
modelDataSnapshot
-
-
Constructor Details
-
RenderChunkRegion
@Deprecated RenderChunkRegion(Level p_200456_, int p_200457_, int p_200458_, RenderChunk[][] p_200459_) Deprecated. -
RenderChunkRegion
RenderChunkRegion(Level p_200456_, int p_200457_, int p_200458_, RenderChunk[][] p_200459_, it.unimi.dsi.fastutil.longs.Long2ObjectFunction<ModelData> modelDataSnapshot)
-
-
Method Details
-
getBlockState
- Specified by:
getBlockStatein interfaceBlockGetter
-
getFluidState
- Specified by:
getFluidStatein interfaceBlockGetter
-
getShade
- Specified by:
getShadein interfaceBlockAndTintGetter
-
getLightEngine
- Specified by:
getLightEnginein interfaceBlockAndTintGetter
-
getBlockEntity
- Specified by:
getBlockEntityin interfaceBlockGetter
-
getBlockTint
- Specified by:
getBlockTintin interfaceBlockAndTintGetter
-
getMinBuildHeight
public int getMinBuildHeight()- Specified by:
getMinBuildHeightin interfaceLevelHeightAccessor
-
getHeight
public int getHeight()- Specified by:
getHeightin interfaceLevelHeightAccessor
-
getShade
public float getShade(float normalX, float normalY, float normalZ, boolean shade) Description copied from interface:IBlockAndTintGetterExtensionComputes the shade for a given normal. Alternate version of the vanilla method taking in aDirection.- Specified by:
getShadein interfaceIBlockAndTintGetterExtension
-
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
-