Package net.minecraft.world.level
Class Level
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.Level
- All Implemented Interfaces:
AutoCloseable,BiomeManager.NoiseBiomeSource,BlockAndTintGetter,BlockGetter,CollisionGetter,CommonLevelAccessor,UUIDLookup<Entity>,EntityGetter,LevelAccessor,LevelHeightAccessor,LevelReader,LevelSimulatedReader,LevelSimulatedRW,LevelTimeAccess,LevelWriter,ScheduledTickAccess,SignalGetter,IAttachmentHolder,IBlockAndTintGetterExtension,IBlockGetterExtension,ILevelExtension,ILevelReaderExtension
- Direct Known Subclasses:
ClientLevel,ServerLevel
public abstract class Level
extends AttachmentHolder
implements LevelAccessor, UUIDLookup<Entity>, AutoCloseable, ILevelExtension
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsFieldNested classes/interfaces inherited from interface net.minecraft.world.level.BlockGetter
BlockGetter.BlockStepVisitor -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprivate final BiomeManagerprotected final List<TickingBlockEntity> booleanprivate final DamageSourcesprivate final ResourceKey<Level> private final Holder<DimensionType> static final ResourceKey<Level> private final ArrayList<BlockEntity> final booleanprivate final booleanprotected final WritableLevelDatastatic final intstatic final intstatic final intstatic final intprivate doublestatic final intprotected final NeighborUpdaterstatic final ResourceKey<Level> floatfloatstatic final ResourceKey<Level> private final List<TickingBlockEntity> private final ArrayList<BlockEntity> floatfinal RandomSourceprotected intContains the current Linear Congruential Generator seed for block updates.private final RegistryAccessstatic final com.mojang.serialization.Codec<ResourceKey<Level>> booleanstatic final intprivate intprivate longprivate final Threadprivate final RandomSourceDeprecated.floatprivate booleanstatic final intprivate final WorldBorderFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEYFields inherited from interface net.minecraft.world.level.BlockGetter
MAX_BLOCK_ITERATIONS_ALONG_TRAVELFields inherited from interface net.neoforged.neoforge.common.extensions.ILevelExtension
TRANSLATION_PREFIXFields inherited from interface net.minecraft.world.level.SignalGetter
DIRECTIONS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLevel(WritableLevelData levelData, ResourceKey<Level> dimension, RegistryAccess registryAccess, Holder<DimensionType> dimensionTypeRegistration, boolean isClientSide, boolean isDebug, long biomeZoomSeed, int maxChainedNeighborUpdates) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAlwaysVisibleParticle(ParticleOptions particle, boolean ignoreRange, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) voidaddAlwaysVisibleParticle(ParticleOptions particle, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) voidvoidaddDestroyBlockEffect(BlockPos pos, BlockState state) voidaddFreshBlockEntities(Collection<BlockEntity> beList) voidaddParticle(ParticleOptions particle, boolean overrideLimiter, boolean alwaysShow, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) voidaddParticle(ParticleOptions particleData, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) protected longvoidvoidblockEvent(BlockPos pos, Block block, int eventID, int eventParam) voidbroadcastDamageEvent(Entity entity, DamageSource damageSource) voidbroadcastEntityEvent(Entity entity, byte state) Sends aClientboundEntityEventPacketto all tracked players of that entity.private booleanvoidclose()voidcreateFireworks(double x, double y, double z, double xSpeed, double ySpeed, double zSpeed, List<FireworkExplosion> explosions) booleandestroyBlock(BlockPos pos, boolean dropBlock, Entity entity, int recursionLeft) abstract voiddestroyBlockProgress(int breakerId, BlockPos pos, int progress) voidabstract Collection<PartEntity<?>> voidexplode(Entity source, double x, double y, double z, float radius, boolean fire, Level.ExplosionInteraction explosionInteraction) voidexplode(Entity source, double x, double y, double z, float radius, Level.ExplosionInteraction explosionInteraction) voidexplode(Entity source, DamageSource damageSource, ExplosionDamageCalculator damageCalculator, double x, double y, double z, float radius, boolean fire, Level.ExplosionInteraction explosionInteraction) abstract voidexplode(Entity source, DamageSource damageSource, ExplosionDamageCalculator damageCalculator, double x, double y, double z, float radius, boolean fire, Level.ExplosionInteraction explosionInteraction, ParticleOptions smallExplosionParticles, ParticleOptions largeExplosionParticles, Holder<SoundEvent> explosionSound) voidexplode(Entity source, DamageSource damageSource, ExplosionDamageCalculator damageCalculator, Vec3 pos, float radius, boolean fire, Level.ExplosionInteraction explosionInteraction) fillReportDetails(CrashReport report) Adds some basic stats of the world to the given crash report.abstract FuelValuesabstract StringgetBlockEntity(BlockPos pos) getBlockRandomPos(int x, int y, int z, int yMask) getBlockState(BlockPos pos) getChunk(int chunkX, int chunkZ) getChunk(int p_46502_, int p_46503_, ChunkStatus p_331611_, boolean p_46505_) getChunkAt(BlockPos pos) getChunkForCollisions(int chunkX, int chunkZ) intlongabstract floatabstract floatReturns the current ratio between game ticks and clock ticks.protected abstract LevelEntityGetter<Entity> getEntities(Entity entity, AABB boundingBox, Predicate<? super Entity> predicate) Gets all entities within the specified AABB excluding the one passed into it.getEntities(EntityTypeTest<Entity, T> p_151528_, AABB p_151529_, Predicate<? super T> p_151530_) <T extends Entity>
voidgetEntities(EntityTypeTest<Entity, T> entityTypeTest, AABB bounds, Predicate<? super T> predicate, List<? super T> output) <T extends Entity>
voidgetEntities(EntityTypeTest<Entity, T> entityTypeTest, AABB bounds, Predicate<? super T> predicate, List<? super T> output, int maxResults) abstract EntitygetEntity(int id) Returns the Entity with the given ID, or null if it doesn't exist in this Level.getFluidState(BlockPos pos) longintgetHeight(Heightmap.Types heightmapType, int x, int z) abstract MapItemSavedDatagetMapData(MapId mapId) doubleThe maximum radius to scan for entities when trying to check bounding boxes.getPushableEntities(Entity entity, AABB boundingBox) floatgetRainLevel(float partialTick) Returns rain strength.abstract ScoreboardfloatintfloatgetSunAngle(float partialTick) Return getCelestialAngle()*2*PIfloatgetThunderLevel(float partialTick) voidglobalLevelEvent(int id, BlockPos pos, int data) <T extends Entity>
voidguardEntityTick(Consumer<T> consumerEntity, T entity) doubleincreaseMaxEntityRadius(double value) Increases the max entity radius, this is safe to call with any value.booleanbooleanbooleanfinal booleanisDebug()booleanisFluidAtPosition(BlockPos p_151541_, Predicate<FluidState> p_151542_) static booleanbooleanisInWorldBounds(BlockPos pos) Check if the given BlockPos has valid coordinatesprivate static booleanbooleanbooleanprivate static booleanisOutsideSpawnableHeight(int y) booleanbooleanisRainingAt(BlockPos pos) Check if precipitation is currently happening at a positionbooleanisStateAtPosition(BlockPos pos, Predicate<BlockState> state) booleanbooleanloadedAndEntityCanStandOn(BlockPos pos, Entity entity) booleanloadedAndEntityCanStandOnFace(BlockPos pos, Entity entity, Direction direction) voidmarkAndNotifyBlock(BlockPos p_46605_, LevelChunk levelchunk, BlockState blockstate, BlockState p_46606_, int p_46607_, int p_46608_) booleanmayInteract(Entity entity, BlockPos pos) voidneighborChanged(BlockPos pos, Block block, Orientation orientation) voidneighborChanged(BlockState state, BlockPos pos, Block block, Orientation orientation, boolean movedByPiston) voidneighborShapeChanged(Direction p_220385_, BlockPos p_220387_, BlockPos p_220388_, BlockState p_220386_, int p_220389_, int p_220390_) longbooleannoSave()voidplayLocalSound(double x, double y, double z, SoundEvent sound, SoundSource source, float volume, float pitch, boolean distanceDelay) voidplayLocalSound(BlockPos pos, SoundEvent sound, SoundSource source, float volume, float pitch, boolean distanceDelay) voidplayLocalSound(Entity entity, SoundEvent sound, SoundSource source, float volume, float pitch) voidplayPlayerSound(SoundEvent sound, SoundSource source, float volume, float pitch) abstract voidplaySeededSound(Entity entity, double x, double y, double z, Holder<SoundEvent> sound, SoundSource source, float volume, float pitch, long seed) voidplaySeededSound(Entity entity, double x, double y, double z, SoundEvent sound, SoundSource source, float volume, float pitch, long seed) abstract voidplaySeededSound(Entity entity, Entity sourceEntity, Holder<SoundEvent> sound, SoundSource source, float volume, float pitch, long seed) voidplaySound(Entity entity, double x, double y, double z, Holder<SoundEvent> sound, SoundSource source, float volume, float pitch) voidplaySound(Entity entity, double x, double y, double z, SoundEvent sound, SoundSource source) voidplaySound(Entity entity, double x, double y, double z, SoundEvent sound, SoundSource source, float volume, float pitch) voidplaySound(Entity entity, BlockPos pos, SoundEvent sound, SoundSource category, float volume, float pitch) voidplaySound(Entity entity, Entity sourceEntity, SoundEvent sound, SoundSource source, float volume, float pitch) abstract PotionBrewingprotected voidabstract RecipeAccessbooleanremoveBlock(BlockPos pos, boolean isMoving) voidabstract voidsendBlockUpdated(BlockPos pos, BlockState oldState, BlockState newState, int flags) Flags are as in setBlockStatevoidsendPacketToServer(Packet<?> packet) booleansetBlock(BlockPos pos, BlockState newState, int flags) Sets a block state into this world.Flags are as follows: 1 will notify neighboring blocks throughupdates. 2 will send the change to clients. 4 will prevent the block from being re-rendered. 8 will force any re-renders to run on the main thread instead 16 will prevent neighbor reactions (e.g. fences connecting, observers pulsing). 32 will prevent neighbor reactions from spawning drops. 64 will signify the block is being moved.invalid reference
neighborChangedbooleansetBlock(BlockPos pos, BlockState state, int flags, int recursionLeft) booleansetBlockAndUpdate(BlockPos pos, BlockState state) Convenience method to update the block on both the client and servervoidsetBlockEntity(BlockEntity blockEntity) voidsetBlocksDirty(BlockPos blockPos, BlockState oldState, BlockState newState) abstract voidsetDayTimeFraction(float dayTimeFraction) abstract voidsetDayTimePerTick(float dayTimePerTick) DO NOT CALL.voidsetRainLevel(float strength) Sets the strength of the rain.voidsetSkyFlashTime(int timeFlash) voidsetSpawnSettings(boolean spawnSettings) voidsetThunderLevel(float strength) Sets the strength of the thunder.booleanshouldTickBlocksAt(long chunkPos) booleanbooleanshouldTickDeath(Entity entity) protected voidabstract TickRateManagervoidupdateNeighborsAt(BlockPos pos, Block block, Orientation orientation) voidupdateNeighborsAtExceptFromFacing(BlockPos pos, Block block, Direction facing, Orientation orientation) voidupdateNeighbourForOutputSignal(BlockPos pos, Block block) voidupdatePOIOnBlockStateChange(BlockPos pos, BlockState oldState, BlockState newState) voidMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, removeData, serializeAttachments, setDataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.BlockAndTintGetter
canSeeSky, getBrightness, getRawBrightness, getShadeMethods inherited from interface net.minecraft.world.level.BlockGetter
clip, clipWithInteractionOverride, getBlockFloorHeight, getBlockFloorHeight, getBlockStates, getLightEmission, isBlockInLineMethods inherited from interface net.minecraft.world.level.CollisionGetter
clipIncludingBorder, collidesWithSuffocatingBlock, findFreePosition, findSupportingBlock, getBlockAndLiquidCollisions, getBlockCollisions, getCollisions, getEntityCollisions, isUnobstructed, isUnobstructed, isUnobstructed, noBlockCollision, noCollision, noCollision, noCollision, noCollisionMethods inherited from interface net.minecraft.world.level.CommonLevelAccessor
getBlockEntity, getEntityCollisions, getHeightmapPos, isUnobstructedMethods inherited from interface net.minecraft.world.level.EntityGetter
getEntities, getEntitiesOfClass, getEntitiesOfClass, getNearestPlayer, getNearestPlayer, getNearestPlayer, getPlayerByUUID, hasNearbyAlivePlayer, playersMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setDataMethods 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.ILevelExtension
getCapability, getCapability, getCapability, getCapability, getDescription, getDescriptionKey, getModelDataManager, invalidateCapabilities, invalidateCapabilitiesMethods inherited from interface net.neoforged.neoforge.common.extensions.ILevelReaderExtension
holder, holderOrThrow, isAreaLoadedMethods inherited from interface net.minecraft.world.level.LevelAccessor
createTick, createTick, dayTime, gameEvent, gameEvent, gameEvent, gameEvent, gameEvent, getChunkSource, getDifficulty, hasChunk, levelEvent, levelEvent, playSound, updateNeighborsAtMethods inherited from interface net.minecraft.world.level.LevelHeightAccessor
getMaxSectionY, getMaxY, getMinSectionY, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isInsideBuildHeight, isOutsideBuildHeight, isOutsideBuildHeightMethods inherited from interface net.minecraft.world.level.LevelReader
canSeeSkyFromBelowWater, containsAnyLiquid, enabledFeatures, getBiome, getBlockStatesIfLoaded, getBlockTint, getChunk, getChunk, getHeight, getHeight, getLightLevelDependentMagicValue, getMaxLocalRawBrightness, getMaxLocalRawBrightness, getMinY, getNoiseBiome, getPathfindingCostFromLightLevels, getSeaLevel, getUncachedNoiseBiome, hasChunkAt, hasChunkAt, hasChunksAt, hasChunksAt, hasChunksAt, holderLookup, isEmptyBlock, isWaterAtMethods inherited from interface net.minecraft.world.level.LevelTimeAccess
getMoonBrightness, getMoonPhase, getTimeOfDayMethods inherited from interface net.minecraft.world.level.LevelWriter
addFreshEntity, destroyBlock, destroyBlockMethods inherited from interface net.minecraft.world.level.ScheduledTickAccess
getBlockTicks, getFluidTicks, scheduleTick, scheduleTick, scheduleTick, scheduleTickMethods inherited from interface net.minecraft.world.level.SignalGetter
getBestNeighborSignal, getControlInputSignal, getDirectSignal, getDirectSignalTo, getSignal, hasNeighborSignal, hasSignal
-
Field Details
-
RESOURCE_KEY_CODEC
-
OVERWORLD
-
NETHER
-
END
-
MAX_LEVEL_SIZE
public static final int MAX_LEVEL_SIZE- See Also:
-
LONG_PARTICLE_CLIP_RANGE
public static final int LONG_PARTICLE_CLIP_RANGE- See Also:
-
SHORT_PARTICLE_CLIP_RANGE
public static final int SHORT_PARTICLE_CLIP_RANGE- See Also:
-
MAX_BRIGHTNESS
public static final int MAX_BRIGHTNESS- See Also:
-
TICKS_PER_DAY
public static final int TICKS_PER_DAY- See Also:
-
MAX_ENTITY_SPAWN_Y
public static final int MAX_ENTITY_SPAWN_Y- See Also:
-
MIN_ENTITY_SPAWN_Y
public static final int MIN_ENTITY_SPAWN_Y- See Also:
-
blockEntityTickers
-
neighborUpdater
-
pendingBlockEntityTickers
-
tickingBlockEntities
private boolean tickingBlockEntities -
thread
-
isDebug
private final boolean isDebug -
skyDarken
private int skyDarken -
randValue
protected int randValueContains the current Linear Congruential Generator seed for block updates. Used with an A value of 3 and a C value of 0x3c6ef35f, producing a highly planar series of values ill-suited for choosing random blocks in a 16x128x16 field. -
addend
protected final int addend- See Also:
-
oRainLevel
public float oRainLevel -
rainLevel
public float rainLevel -
oThunderLevel
public float oThunderLevel -
thunderLevel
public float thunderLevel -
random
-
threadSafeRandom
Deprecated. -
dimensionTypeRegistration
-
levelData
-
isClientSide
public final boolean isClientSide -
worldBorder
-
biomeManager
-
dimension
-
registryAccess
-
damageSources
-
subTickCount
private long subTickCount -
restoringBlockSnapshots
public boolean restoringBlockSnapshots -
captureBlockSnapshots
public boolean captureBlockSnapshots -
capturedBlockSnapshots
-
freshBlockEntities
-
pendingFreshBlockEntities
-
maxEntityRadius
private double maxEntityRadius
-
-
Constructor Details
-
Level
protected Level(WritableLevelData levelData, ResourceKey<Level> dimension, RegistryAccess registryAccess, Holder<DimensionType> dimensionTypeRegistration, boolean isClientSide, boolean isDebug, long biomeZoomSeed, int maxChainedNeighborUpdates)
-
-
Method Details
-
isClientSide
public boolean isClientSide()- Specified by:
isClientSidein interfaceLevelReader
-
getServer
- Specified by:
getServerin interfaceLevelAccessor
-
isInWorldBounds
Check if the given BlockPos has valid coordinates -
isInSpawnableBounds
-
isInWorldBoundsHorizontal
-
isOutsideSpawnableHeight
private static boolean isOutsideSpawnableHeight(int y) -
getChunkAt
-
getChunk
- Specified by:
getChunkin interfaceLevelReader
-
getChunk
@Nullable public ChunkAccess getChunk(int p_46502_, int p_46503_, ChunkStatus p_331611_, boolean p_46505_) - Specified by:
getChunkin interfaceLevelReader
-
setBlock
Sets a block state into this world.Flags are as follows: 1 will notify neighboring blocks throughupdates. 2 will send the change to clients. 4 will prevent the block from being re-rendered. 8 will force any re-renders to run on the main thread instead 16 will prevent neighbor reactions (e.g. fences connecting, observers pulsing). 32 will prevent neighbor reactions from spawning drops. 64 will signify the block is being moved. Flags can be OR-edinvalid reference
neighborChanged- Specified by:
setBlockin interfaceLevelWriter
-
setBlock
- Specified by:
setBlockin interfaceLevelWriter
-
markAndNotifyBlock
public void markAndNotifyBlock(BlockPos p_46605_, @Nullable LevelChunk levelchunk, BlockState blockstate, BlockState p_46606_, int p_46607_, int p_46608_) -
updatePOIOnBlockStateChange
-
removeBlock
- Specified by:
removeBlockin interfaceLevelWriter
-
destroyBlock
public boolean destroyBlock(BlockPos pos, boolean dropBlock, @Nullable Entity entity, int recursionLeft) - Specified by:
destroyBlockin interfaceLevelWriter
-
addDestroyBlockEffect
-
setBlockAndUpdate
Convenience method to update the block on both the client and server -
sendBlockUpdated
public abstract void sendBlockUpdated(BlockPos pos, BlockState oldState, BlockState newState, int flags) Flags are as in setBlockState -
setBlocksDirty
-
updateNeighborsAt
-
updateNeighborsAtExceptFromFacing
public void updateNeighborsAtExceptFromFacing(BlockPos pos, Block block, Direction facing, @Nullable Orientation orientation) -
neighborChanged
-
neighborChanged
public void neighborChanged(BlockState state, BlockPos pos, Block block, @Nullable Orientation orientation, boolean movedByPiston) -
neighborShapeChanged
public void neighborShapeChanged(Direction p_220385_, BlockPos p_220387_, BlockPos p_220388_, BlockState p_220386_, int p_220389_, int p_220390_) - Specified by:
neighborShapeChangedin interfaceLevelAccessor
-
getHeight
- Specified by:
getHeightin interfaceLevelReader
-
getLightEngine
- Specified by:
getLightEnginein interfaceBlockAndTintGetter
-
getBlockState
- Specified by:
getBlockStatein interfaceBlockGetter
-
getFluidState
- Specified by:
getFluidStatein interfaceBlockGetter
-
isBrightOutside
public boolean isBrightOutside() -
isDarkOutside
public boolean isDarkOutside() -
isMoonVisible
public boolean isMoonVisible() -
playSound
public void playSound(@Nullable Entity entity, BlockPos pos, SoundEvent sound, SoundSource category, float volume, float pitch) - Specified by:
playSoundin interfaceLevelAccessor
-
playSeededSound
public abstract void playSeededSound(@Nullable Entity entity, double x, double y, double z, Holder<SoundEvent> sound, SoundSource source, float volume, float pitch, long seed) -
playSeededSound
public void playSeededSound(@Nullable Entity entity, double x, double y, double z, SoundEvent sound, SoundSource source, float volume, float pitch, long seed) -
playSeededSound
public abstract void playSeededSound(@Nullable Entity entity, Entity sourceEntity, Holder<SoundEvent> sound, SoundSource source, float volume, float pitch, long seed) -
playSound
public void playSound(@Nullable Entity entity, double x, double y, double z, SoundEvent sound, SoundSource source) -
playSound
public void playSound(@Nullable Entity entity, double x, double y, double z, SoundEvent sound, SoundSource source, float volume, float pitch) -
playSound
public void playSound(@Nullable Entity entity, double x, double y, double z, Holder<SoundEvent> sound, SoundSource source, float volume, float pitch) -
playSound
public void playSound(@Nullable Entity entity, Entity sourceEntity, SoundEvent sound, SoundSource source, float volume, float pitch) -
playLocalSound
public void playLocalSound(BlockPos pos, SoundEvent sound, SoundSource source, float volume, float pitch, boolean distanceDelay) -
playLocalSound
public void playLocalSound(Entity entity, SoundEvent sound, SoundSource source, float volume, float pitch) -
playLocalSound
public void playLocalSound(double x, double y, double z, SoundEvent sound, SoundSource source, float volume, float pitch, boolean distanceDelay) -
playPlayerSound
-
addParticle
public void addParticle(ParticleOptions particleData, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) - Specified by:
addParticlein interfaceLevelAccessor
-
addParticle
public void addParticle(ParticleOptions particle, boolean overrideLimiter, boolean alwaysShow, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) -
addAlwaysVisibleParticle
public void addAlwaysVisibleParticle(ParticleOptions particle, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) -
addAlwaysVisibleParticle
public void addAlwaysVisibleParticle(ParticleOptions particle, boolean ignoreRange, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) -
getSunAngle
public float getSunAngle(float partialTick) Return getCelestialAngle()*2*PI -
addBlockEntityTicker
-
addFreshBlockEntities
-
tickBlockEntities
protected void tickBlockEntities() -
guardEntityTick
-
shouldTickDeath
-
shouldTickBlocksAt
public boolean shouldTickBlocksAt(long chunkPos) -
shouldTickBlocksAt
-
explode
public void explode(@Nullable Entity source, double x, double y, double z, float radius, Level.ExplosionInteraction explosionInteraction) -
explode
public void explode(@Nullable Entity source, double x, double y, double z, float radius, boolean fire, Level.ExplosionInteraction explosionInteraction) -
explode
public void explode(@Nullable Entity source, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator damageCalculator, Vec3 pos, float radius, boolean fire, Level.ExplosionInteraction explosionInteraction) -
explode
public void explode(@Nullable Entity source, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator damageCalculator, double x, double y, double z, float radius, boolean fire, Level.ExplosionInteraction explosionInteraction) -
explode
public abstract void explode(@Nullable Entity source, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator damageCalculator, double x, double y, double z, float radius, boolean fire, Level.ExplosionInteraction explosionInteraction, ParticleOptions smallExplosionParticles, ParticleOptions largeExplosionParticles, Holder<SoundEvent> explosionSound) -
gatherChunkSourceStats
-
getBlockEntity
- Specified by:
getBlockEntityin interfaceBlockGetter
-
setBlockEntity
-
removeBlockEntity
-
isLoaded
-
loadedAndEntityCanStandOnFace
-
loadedAndEntityCanStandOn
-
updateSkyBrightness
public void updateSkyBrightness() -
setSpawnSettings
public void setSpawnSettings(boolean spawnSettings) -
prepareWeather
protected void prepareWeather() -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
getChunkForCollisions
- Specified by:
getChunkForCollisionsin interfaceCollisionGetter- Specified by:
getChunkForCollisionsin interfaceLevelReader
-
getEntities
public List<Entity> getEntities(@Nullable Entity entity, AABB boundingBox, Predicate<? super Entity> predicate) Gets all entities within the specified AABB excluding the one passed into it.- Specified by:
getEntitiesin interfaceEntityGetter
-
getEntities
public <T extends Entity> List<T> getEntities(EntityTypeTest<Entity, T> p_151528_, AABB p_151529_, Predicate<? super T> p_151530_) - Specified by:
getEntitiesin interfaceEntityGetter
-
getEntities
-
getEntities
-
getPushableEntities
-
getEntity
Returns the Entity with the given ID, or null if it doesn't exist in this Level. -
getEntity
- Specified by:
getEntityin interfaceUUIDLookup<Entity>
-
dragonParts
-
blockEntityChanged
-
disconnect
public void disconnect() -
getGameTime
public long getGameTime() -
getDayTime
public long getDayTime() -
mayInteract
-
broadcastEntityEvent
Sends aClientboundEntityEventPacketto all tracked players of that entity. -
broadcastDamageEvent
-
blockEvent
-
getLevelData
- Specified by:
getLevelDatain interfaceLevelAccessor
-
tickRateManager
-
getThunderLevel
public float getThunderLevel(float partialTick) -
setThunderLevel
public void setThunderLevel(float strength) Sets the strength of the thunder. -
getRainLevel
public float getRainLevel(float partialTick) Returns rain strength. -
setRainLevel
public void setRainLevel(float strength) Sets the strength of the rain. -
canHaveWeather
private boolean canHaveWeather() -
isThundering
public boolean isThundering() -
isRaining
public boolean isRaining() -
isRainingAt
Check if precipitation is currently happening at a position -
getMapData
-
globalLevelEvent
-
fillReportDetails
Adds some basic stats of the world to the given crash report. -
destroyBlockProgress
-
createFireworks
public void createFireworks(double x, double y, double z, double xSpeed, double ySpeed, double zSpeed, List<FireworkExplosion> explosions) -
getScoreboard
-
updateNeighbourForOutputSignal
-
getCurrentDifficultyAt
- Specified by:
getCurrentDifficultyAtin interfaceLevelAccessor
-
getSkyDarken
public int getSkyDarken()- Specified by:
getSkyDarkenin interfaceLevelReader
-
setSkyFlashTime
public void setSkyFlashTime(int timeFlash) -
getWorldBorder
- Specified by:
getWorldBorderin interfaceCollisionGetter
-
sendPacketToServer
-
dimensionType
- Specified by:
dimensionTypein interfaceLevelReader
-
dimensionTypeRegistration
-
dimension
-
getRandom
- Specified by:
getRandomin interfaceLevelAccessor
-
isStateAtPosition
- Specified by:
isStateAtPositionin interfaceLevelSimulatedReader
-
isFluidAtPosition
- Specified by:
isFluidAtPositionin interfaceLevelSimulatedReader
-
recipeAccess
-
getBlockRandomPos
-
noSave
public boolean noSave() -
getBiomeManager
- Specified by:
getBiomeManagerin interfaceLevelReader
-
getMaxEntityRadius
public double getMaxEntityRadius()Description copied from interface:ILevelExtensionThe maximum radius to scan for entities when trying to check bounding boxes. Vanilla's default is 2.0D But mods that add larger entities may increase this.- Specified by:
getMaxEntityRadiusin interfaceILevelExtension
-
increaseMaxEntityRadius
public double increaseMaxEntityRadius(double value) Description copied from interface:ILevelExtensionIncreases the max entity radius, this is safe to call with any value. The setter will verify the input value is larger then the current setting.- Specified by:
increaseMaxEntityRadiusin interfaceILevelExtension- Parameters:
value- New max radius to set.- Returns:
- The new max radius
-
isDebug
public final boolean isDebug() -
getEntities
-
nextSubTickCount
public long nextSubTickCount()- Specified by:
nextSubTickCountin interfaceLevelAccessor
-
registryAccess
- Specified by:
registryAccessin interfaceLevelReader
-
damageSources
-
potionBrewing
-
fuelValues
-
getClientLeafTintColor
-
setDayTimeFraction
@Internal public abstract void setDayTimeFraction(float dayTimeFraction) -
getDayTimeFraction
@Internal public abstract float getDayTimeFraction() -
getDayTimePerTick
public abstract float getDayTimePerTick()Returns the current ratio between game ticks and clock ticks. If this value is negative, no speed has been set and those two are coupled 1:1 (i.e. vanilla mode). -
setDayTimePerTick
public abstract void setDayTimePerTick(float dayTimePerTick) DO NOT CALL.Use
ServerLevel.setDayTimePerTick(float)instead. -
advanceDaytime
@Internal protected long advanceDaytime()
-