Interface IBlockGetterExtension
- All Known Subinterfaces:
BlockAndTintGetter,BlockGetter,CollisionGetter,CommonLevelAccessor,LevelAccessor,LevelReader,LevelTimeAccess,LightChunk,ServerLevelAccessor,SignalGetter,WorldGenLevel
- All Known Implementing Classes:
ChunkAccess,ClientLevel,EmptyBlockAndTintGetter,EmptyBlockGetter,EmptyLevelChunk,FallingBlockRenderState,ImposterProtoChunk,Level,LevelChunk,PathNavigationRegion,ProtoChunk,RenderChunkRegion,ServerLevel,WorldGenRegion
public interface IBlockGetterExtension
-
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable AuxiliaryLightManagerGet theAuxiliaryLightManagerof the chunk containing the givenBlockPos.default @Nullable AuxiliaryLightManagerGet theAuxiliaryLightManagerof the chunk at the givenChunkPos.default ModelDatagetModelData(BlockPos pos) Retrieves model data for a block at the given position.
-
Method Details
-
getAuxLightManager
Get theAuxiliaryLightManagerof the chunk containing the givenBlockPos.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.- Parameters:
pos- The position for whose containing chunk 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 implementgetAuxLightManager(ChunkPos)
-
getAuxLightManager
Get 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.- 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
-
getModelData
Retrieves model data for a block at the given position.- Parameters:
pos- the position to query- Returns:
- the model data at this position, or
ModelData.EMPTYif none exists
-