Package net.minecraft.world.level
Interface LevelAccessor
- All Superinterfaces:
BiomeManager.NoiseBiomeSource,BlockAndTintGetter,BlockGetter,CollisionGetter,CommonLevelAccessor,EntityGetter,IBlockAndTintGetterExtension,IBlockGetterExtension,ILevelReaderExtension,LevelHeightAccessor,LevelReader,LevelSimulatedReader,LevelSimulatedRW,LevelTimeAccess,LevelWriter,SignalGetter
- All Known Subinterfaces:
ServerLevelAccessor,WorldGenLevel
- All Known Implementing Classes:
ClientLevel,Level,ServerLevel,WorldGenRegion
-
Field Summary
Fields inherited from interface net.minecraft.world.level.SignalGetter
DIRECTIONS -
Method Summary
Modifier and TypeMethodDescriptionvoidaddParticle(ParticleOptions pParticleData, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) default voidblockUpdated(BlockPos pPos, Block pBlock) private <T> ScheduledTick<T> createTick(BlockPos pPos, T pType, int pDelay) private <T> ScheduledTick<T> createTick(BlockPos pPos, T pType, int pDelay, TickPriority pPriority) default longdayTime()default voidgameEvent(Holder<GameEvent> pGameEvent, BlockPos pPos, GameEvent.Context pContext) voidgameEvent(Holder<GameEvent> pGameEvent, Vec3 pPos, GameEvent.Context pContext) default voidgameEvent(ResourceKey<GameEvent> pGameEvent, BlockPos pPos, GameEvent.Context pContext) default voiddefault voiddefault Difficultydefault booleanhasChunk(int pChunkX, int pChunkZ) default voidlevelEvent(int pType, BlockPos pPos, int pData) voidlevelEvent(Player pPlayer, int pType, BlockPos pPos, int pData) default voidneighborShapeChanged(Direction pDirection, BlockState pQueried, BlockPos pPos, BlockPos pOffsetPos, int pFlags, int pRecursionLevel) longdefault voidplaySound(Player pPlayer, BlockPos pPos, SoundEvent pSound, SoundSource pSource) voidplaySound(Player pPlayer, BlockPos pPos, SoundEvent pSound, SoundSource pSource, float pVolume, float pPitch) Plays a sound.default voidscheduleTick(BlockPos pPos, Block pBlock, int pDelay) default voidscheduleTick(BlockPos pPos, Block pBlock, int pDelay, TickPriority pPriority) default voidscheduleTick(BlockPos pPos, Fluid pFluid, int pDelay) default voidscheduleTick(BlockPos pPos, Fluid pFluid, int pDelay, TickPriority pPriority) Methods inherited from interface net.minecraft.world.level.BlockAndTintGetter
canSeeSky, getBrightness, getLightEngine, getRawBrightness, getShadeMethods inherited from interface net.minecraft.world.level.BlockGetter
clip, clipWithInteractionOverride, getBlockEntity, getBlockFloorHeight, getBlockFloorHeight, getBlockState, getBlockStates, getFluidState, getLightEmission, getMaxLightLevel, isBlockInLineMethods inherited from interface net.minecraft.world.level.CollisionGetter
collidesWithSuffocatingBlock, findFreePosition, findSupportingBlock, getBlockCollisions, getCollisions, getEntityCollisions, getWorldBorder, isUnobstructed, isUnobstructed, isUnobstructed, noBlockCollision, noCollision, noCollision, noCollisionMethods inherited from interface net.minecraft.world.level.CommonLevelAccessor
getBlockEntity, getEntityCollisions, getHeightmapPos, isUnobstructedMethods inherited from interface net.minecraft.world.level.EntityGetter
getEntities, getEntities, getEntities, getEntitiesOfClass, getEntitiesOfClass, getNearbyEntities, getNearbyPlayers, getNearestEntity, getNearestEntity, getNearestPlayer, getNearestPlayer, getNearestPlayer, getNearestPlayer, getNearestPlayer, getNearestPlayer, getPlayerByUUID, hasNearbyAlivePlayer, playersMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockAndTintGetterExtension
getShadeMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockGetterExtension
getAuxLightManager, getAuxLightManager, getModelDataMethods inherited from interface net.neoforged.neoforge.common.extensions.ILevelReaderExtension
holder, holderOrThrow, isAreaLoadedMethods inherited from interface net.minecraft.world.level.LevelHeightAccessor
getMaxBuildHeight, getMaxSection, getMinSection, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isOutsideBuildHeight, isOutsideBuildHeightMethods inherited from interface net.minecraft.world.level.LevelReader
canSeeSkyFromBelowWater, containsAnyLiquid, dimensionType, enabledFeatures, getBiome, getBiomeManager, getBlockStatesIfLoaded, getBlockTint, getChunk, getChunk, getChunk, getChunk, getChunkForCollisions, getHeight, getHeight, getLightLevelDependentMagicValue, getMaxLocalRawBrightness, getMaxLocalRawBrightness, getMinBuildHeight, getNoiseBiome, getPathfindingCostFromLightLevels, getSeaLevel, getSkyDarken, getUncachedNoiseBiome, hasChunkAt, hasChunkAt, hasChunksAt, hasChunksAt, hasChunksAt, holderLookup, isClientSide, isEmptyBlock, isWaterAt, registryAccessMethods inherited from interface net.minecraft.world.level.LevelSimulatedReader
isFluidAtPosition, isStateAtPositionMethods inherited from interface net.minecraft.world.level.LevelTimeAccess
getMoonBrightness, getMoonPhase, getTimeOfDayMethods inherited from interface net.minecraft.world.level.LevelWriter
addFreshEntity, destroyBlock, destroyBlock, destroyBlock, removeBlock, setBlock, setBlockMethods inherited from interface net.minecraft.world.level.SignalGetter
getBestNeighborSignal, getControlInputSignal, getDirectSignal, getDirectSignalTo, getSignal, hasNeighborSignal, hasSignal
-
Method Details
-
dayTime
default long dayTime()- Specified by:
dayTimein interfaceLevelTimeAccess
-
nextSubTickCount
long nextSubTickCount() -
getBlockTicks
LevelTickAccess<Block> getBlockTicks() -
createTick
-
createTick
-
scheduleTick
-
scheduleTick
-
getFluidTicks
LevelTickAccess<Fluid> getFluidTicks() -
scheduleTick
-
scheduleTick
-
getLevelData
LevelData getLevelData() -
getCurrentDifficultyAt
-
getServer
-
getDifficulty
-
getChunkSource
ChunkSource getChunkSource() -
hasChunk
default boolean hasChunk(int pChunkX, int pChunkZ) - Specified by:
hasChunkin interfaceLevelReader
-
getRandom
RandomSource getRandom() -
blockUpdated
-
neighborShapeChanged
default void neighborShapeChanged(Direction pDirection, BlockState pQueried, BlockPos pPos, BlockPos pOffsetPos, int pFlags, int pRecursionLevel) - Parameters:
pQueried- The block state of the current blockpPos- The position of the neighbor blockpOffsetPos- The position of the current block
-
playSound
default void playSound(@Nullable Player pPlayer, BlockPos pPos, SoundEvent pSound, SoundSource pSource) -
playSound
void playSound(@Nullable Player pPlayer, BlockPos pPos, SoundEvent pSound, SoundSource pSource, float pVolume, float pPitch) Plays a sound. On the server, the sound is broadcast to all nearby except the given player. On the client, the sound only plays if the given player is the client player. Thus, this method is intended to be called from code running on both sides. The client plays it locally and the server plays it for everyone else. -
addParticle
void addParticle(ParticleOptions pParticleData, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) -
levelEvent
-
levelEvent
-
gameEvent
-
gameEvent
-
gameEvent
-
gameEvent
-
gameEvent
default void gameEvent(ResourceKey<GameEvent> pGameEvent, BlockPos pPos, GameEvent.Context pContext)
-