LevelAccessor
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
Implements
LevelAccessor
implements the following interfaces:
CommonLevelAccessor
,LevelReader
,BlockAndTintGetter
,BlockGetter
Undocumented Interfaces
LevelTimeAccess
,EntityGetter
,LevelSimulatedRW
,CollisionGetter
,SignalGetter
,NoiseBiomeSource
,IForgeBlockAndTintGetter
,LevelHeightAccessor
,IForgeBlockGetter
,LevelSimulatedReader
,LevelWriter
Members
Getter
Gets the difficulty setting for the world.
Return Type:
Difficulty
getBlockState(pos as BlockPos) as BlockState
Gets the block state at a given position.
Returns: The block state at the position.
Return Type:
BlockState
getCurrentDifficultyAt(position as BlockPos) as DifficultyInstance
Return Type:
DifficultyInstance
hasChunk(x as int, z as int) as bool
Parameters:
x: int
Type: int
z: int
Type: int
Return Type:
bool
Getter
Return Type:
bool
Getter
Gets the data for this level, holds information such as if it is raining, thundering, difficulty, etc
Return Type:
LevelData
levelEvent(excluded as Player, event as int, position as BlockPos, extra as int)
Triggers a predetermined event on the client. Using this on a server or integrated server will send the event to all nearby players.
Parameters:
levelEvent(event as int, position as BlockPos, extra as int)
Triggers a predetermined event on the client. Using this on a server or integrated server will send the event to all nearby players.
Getter
Return Type:
int
playSound(player as Player, position as BlockPos, event as SoundEvent, source as SoundSource)
Parameters:
event: SoundEvent
Type: SoundEvent
source: SoundSource
Type: SoundSource
playSound(player as Player, position as BlockPos, event as SoundEvent, source as SoundSource, volume as float, pitch as float)
Parameters:
event: SoundEvent
Type: SoundEvent
source: SoundSource
Type: SoundSource
volume: float
Type: float
pitch: float
Type: float
Getter
Return Type:
RandomSource
Getter
Gets the height of the sea level.
Return Type:
int
Getter
Return Type:
int