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