Interface IBlockGetterExtension
public interface IBlockGetterExtension
-
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable AuxiliaryLightManager
getAuxLightManager
(net.minecraft.core.BlockPos pos) Get theAuxiliaryLightManager
of the chunk containing the givenBlockPos
.default @Nullable AuxiliaryLightManager
getAuxLightManager
(net.minecraft.world.level.ChunkPos pos) Get theAuxiliaryLightManager
of the chunk at the givenChunkPos
.default ModelData
getModelData
(net.minecraft.core.BlockPos pos) Retrieves model data for a block at the given position.
-
Method Details
-
getAuxLightManager
@Nullable @NonExtendable default @Nullable AuxiliaryLightManager getAuxLightManager(net.minecraft.core.BlockPos pos) 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
@Nullable default @Nullable AuxiliaryLightManager getAuxLightManager(net.minecraft.world.level.ChunkPos pos) 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
-