Package net.minecraft.client.multiplayer
Class ClientLevel
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.Level
net.minecraft.client.multiplayer.ClientLevel
- All Implemented Interfaces:
AutoCloseable,CacheSlot.Cleaner<ClientLevel>,BiomeManager.NoiseBiomeSource,BlockAndTintGetter,BlockGetter,CollisionGetter,CommonLevelAccessor,EntityGetter,LevelAccessor,LevelHeightAccessor,LevelReader,LevelSimulatedReader,LevelSimulatedRW,LevelWriter,ScheduledTickAccess,SignalGetter,IAttachmentHolder,IBlockAndTintGetterExtension,IBlockGetterExtension,ILevelExtension,ILevelReaderExtension
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class(package private) final classNested classes/interfaces inherited from class net.minecraft.world.level.Level
Level.ExplosionInteractionNested 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 TypeFieldDescriptionprivate final BlockStatePredictionHandlerprivate final ClientChunkCacheprivate final ClientLevel.ClientLevelDataprivate final ClientPacketListenerprivate floatprivate floatstatic final Component(package private) final List<PartEntity<?>> private final @Nullable EndFlashStateprivate final TransientEntitySectionManager<Entity> private final EnvironmentAttributeSystemprivate final ClientExplosionTrackerprivate static final doubleprivate final Set<BlockEntity> private final LevelEventHandlerprivate final LevelRendererprivate static final intprivate static final org.slf4j.Loggerprivate final Map<MapId, MapItemSavedData> private final Minecraftprivate final ModelDataManagerprivate static final int(package private) final List<AbstractClientPlayer> private final intprivate intprivate intprivate boolean(package private) final EntityTickListprivate final TickRateManagerprivate final it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap<ColorResolver, BlockTintCache> private final WorldBorderFields inherited from class net.minecraft.world.level.Level
addend, blockEntityTickers, captureBlockSnapshots, capturedBlockSnapshots, END, levelData, LONG_PARTICLE_CLIP_RANGE, MAX_BRIGHTNESS, MAX_ENTITY_SPAWN_Y, MAX_LEVEL_SIZE, MIN_ENTITY_SPAWN_Y, neighborUpdater, NETHER, oRainLevel, oThunderLevel, OVERWORLD, rainLevel, random, randValue, RESOURCE_KEY_CODEC, restoringBlockSnapshots, SHORT_PARTICLE_CLIP_RANGE, thunderLevelFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEYFields inherited from interface net.neoforged.neoforge.common.extensions.ILevelExtension
TRANSLATION_PREFIXFields inherited from interface net.minecraft.world.level.SignalGetter
DIRECTIONS -
Constructor Summary
ConstructorsConstructorDescriptionClientLevel(ClientPacketListener connection, ClientLevel.ClientLevelData levelData, ResourceKey<Level> dimension, Holder<DimensionType> dimensionTypeRegistration, int viewDistance, int serverSimulationDistance, LevelRenderer levelRenderer, boolean isDebug, long biomeZoomSeed, int seaLevel) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAlwaysVisibleParticle(ParticleOptions options, boolean overrideLimiter, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) voidaddAlwaysVisibleParticle(ParticleOptions options, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) voidaddBreakingBlockEffect(BlockPos pos, Direction direction) Deprecated.voidaddBreakingBlockEffect(BlockPos pos, Direction direction, @Nullable HitResult hitResult) voidaddDestroyBlockEffect(BlockPos p_171667_, BlockState p_171668_) voidprotected voidaddMapData(Map<MapId, MapItemSavedData> map) voidaddParticle(ParticleOptions p_104714_, boolean p_104715_, boolean p_383197_, double p_104716_, double p_104717_, double p_104718_, double p_104719_, double p_104720_, double p_104721_) voidaddParticle(ParticleOptions options, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) voidanimateTick(int posX, int posY, int posZ) intcalculateBlockTint(BlockPos pos, ColorResolver colorResolver) private ParticleStatuscalculateParticleLevel(boolean alwaysShow) voidvoidcreateFireworks(double p_104585_, double p_104586_, double p_104587_, double p_104588_, double p_104589_, double p_104590_, List<FireworkExplosion> p_330281_) voiddestroyBlockProgress(int breakerId, BlockPos pos, int progress) voiddisconnect(Component reason) private voiddoAddParticle(ParticleOptions particle, boolean overrideLimiter, boolean alwaysShow, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) voiddoAnimateTick(int posX, int posY, int posZ, int range, RandomSource random, @Nullable Block block, BlockPos.MutableBlockPos pos) List<PartEntity<?>> @Nullable EndFlashStatevoidexplode(@Nullable Entity p_363686_, @Nullable DamageSource p_365268_, @Nullable ExplosionDamageCalculator p_363795_, double p_360494_, double p_360591_, double p_364949_, float p_361233_, boolean p_364900_, Level.ExplosionInteraction p_365033_, ParticleOptions p_361889_, ParticleOptions p_361473_, WeightedList<ExplosionParticleInfo> p_437196_, Holder<SoundEvent> p_362359_) fillReportDetails(CrashReport report) Adds some basic stats of the world to the given crash report.voidgameEvent(Holder<GameEvent> p_316478_, Vec3 p_233640_, GameEvent.Context p_233641_) protected Map<MapId, MapItemSavedData> (package private) BlockStatePredictionHandlerintgetBlockTint(BlockPos pos, ColorResolver colorResolver) intgetClientLeafTintColor(BlockPos p_400248_) floatfloatReturns the current ratio between game ticks and clock ticks.protected LevelEntityGetter<Entity> @Nullable EntitygetEntity(int id) Returns the Entity with the given ID, ornullif it doesn't exist in this Level.int@Nullable MapItemSavedDatagetMapData(MapId p_323873_) private @Nullable BlockgetModelData(BlockPos pos) Retrieves model data for a block at the given position.Retrieves the model data manager for the given level.getPushableEntities(Entity p_393670_, AABB p_394410_) intintfloatgetShade(float normalX, float normalY, float normalZ, boolean shade) Computes the shade for a given normal.floatprivate intgetUncachedNoiseBiome(int p_205516_, int p_205517_, int p_205518_) voidglobalLevelEvent(int id, BlockPos pos, int data) voidhandleBlockChangedAck(int sequence) booleanhasChunk(int chunkX, int chunkZ) booleanisTickingEntity(Entity entity) voidlevelEvent(@Nullable Entity p_394519_, int p_104655_, BlockPos p_104656_, int p_104657_) voidonBlockEntityAdded(BlockEntity p_427306_) voidonChunkLoaded(ChunkPos chunkPos) voidonSectionBecomingNonEmpty(long sectionPos) voidoverrideMapData(MapId mapId, MapItemSavedData mapData) players()voidplayLocalSound(double x, double y, double z, SoundEvent sound, SoundSource source, float volume, float pitch, boolean distanceDelay) voidplayLocalSound(Entity p_312749_, SoundEvent p_312635_, SoundSource p_312007_, float p_312298_, float p_312772_) voidplayPlayerSound(SoundEvent p_401146_, SoundSource p_401176_, float p_401193_, float p_401050_) voidplaySeededSound(@Nullable Entity p_393665_, double p_263372_, double p_263404_, double p_263365_, Holder<SoundEvent> p_263335_, SoundSource p_263417_, float p_263416_, float p_263349_, long p_263408_) voidplaySeededSound(@Nullable Entity p_263536_, Entity p_394209_, Holder<SoundEvent> p_263518_, SoundSource p_263487_, float p_263538_, float p_263524_, long p_263509_) private voidplaySound(double x, double y, double z, SoundEvent sound, SoundSource source, float volume, float pitch, boolean distanceDelay, long seed) voidvoidqueueLightUpdate(Runnable task) voidregisterForCleaning(CacheSlot<ClientLevel, ?> p_399472_) voidremoveEntity(int entityId, Entity.RemovalReason reason) voidsendBlockUpdated(BlockPos pos, BlockState oldState, BlockState newState, @net.minecraft.world.level.block.Block.UpdateFlags int flags) Flags are as in setBlockvoidsendPacketToServer(Packet<?> packet) booleansetBlock(BlockPos p_233643_, BlockState p_233644_, @net.minecraft.world.level.block.Block.UpdateFlags int p_233645_, int p_233646_) Sets a block state into this world.voidsetBlocksDirty(BlockPos pos, BlockState oldState, BlockState newState) voidsetDayTimeFraction(float dayTimeFraction) voidsetDayTimePerTick(float dayTimePerTick) DO NOT CALL.voidsetRespawnData(LevelData.RespawnData p_451417_) voidsetSectionDirtyWithNeighbors(int sectionX, int sectionY, int sectionZ) voidsetSectionRangeDirty(int minY, int minX, int minZ, int maxY, int maxX, int maxZ) voidsetServerSimulationDistance(int serverSimulationDistance) voidsetServerVerifiedBlockState(BlockPos pos, BlockState state, @net.minecraft.world.level.block.Block.UpdateFlags int flags) voidsetSkyFlashTime(int timeFlash) voidsetTimeFromServer(long gameTime, long dayTime, boolean tickDayTime) booleanshouldTickDeath(Entity p_194185_) private voidspawnFluidParticle(double xStart, double xEnd, double zStart, double zEnd, double y, ParticleOptions options) private voidspawnParticle(BlockPos pos, ParticleOptions options, VoxelShape voxelShape, double y) voidsyncBlockState(BlockPos pos, BlockState state, Vec3 playerPos) voidtick(BooleanSupplier haveTime) Runs a single tick for the worldvoidvoidtickNonPassenger(Entity entity) private voidtickPassenger(Entity mount, Entity rider) private voidtickTime()toString()voidtrackExplosionEffects(Vec3 center, float radius, int blockCount, WeightedList<ExplosionParticleInfo> blockParticles) private voidtrySpawnDripParticles(BlockPos pos, BlockState state, ParticleOptions options, boolean shapeDownSolid) voidunload(LevelChunk chunk) Methods inherited from class net.minecraft.world.level.Level
addBlockEntityTicker, addFreshBlockEntities, advanceDaytime, blockEntityChanged, blockEvent, broadcastDamageEvent, broadcastEntityEvent, canHaveWeather, close, damageSources, destroyBlock, dimension, dimensionType, dimensionTypeRegistration, explode, explode, explode, explode, getBiomeManager, getBlockEntity, getBlockRandomPos, getBlockState, getChunk, getChunk, getChunkAt, getChunkForCollisions, getDayTime, getEntities, getEntities, getEntities, getEntities, getEntity, getEntityInAnyDimension, getFluidState, getHeight, getLightEngine, getMaxEntityRadius, getPlayerInAnyDimension, getRainLevel, getRandom, getServer, getSkyDarken, getThunderLevel, getWorldBorderAdjustedRespawnData, guardEntityTick, hasEntities, increaseMaxEntityRadius, isBrightOutside, isClientSide, isDarkOutside, isDebug, isFluidAtPosition, isInSpawnableBounds, isInValidBounds, isInWorldBounds, isLoaded, isRaining, isRainingAt, isStateAtPosition, isThundering, loadedAndEntityCanStandOn, loadedAndEntityCanStandOnFace, markAndNotifyBlock, mayInteract, neighborChanged, neighborChanged, neighborShapeChanged, nextSubTickCount, noSave, palettedContainerFactory, playLocalSound, playSeededSound, playSound, playSound, playSound, playSound, playSound, precipitationAt, prepareWeather, registryAccess, removeBlock, removeBlockEntity, setBlock, setBlockAndUpdate, setBlockEntity, setRainLevel, setSpawnSettings, setThunderLevel, shouldTickBlocksAt, shouldTickBlocksAt, tickBlockEntities, updateNeighborsAt, updateNeighborsAtExceptFromFacing, updateNeighbourForOutputSignal, updatePOIOnBlockStateChange, updateSkyBrightnessMethods 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, wait, wait, waitMethods inherited from interface net.minecraft.world.level.BlockAndTintGetter
canSeeSky, getBrightness, getRawBrightnessMethods 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, getPreMoveCollisions, isUnobstructed, isUnobstructed, isUnobstructed, noBlockCollision, noBlockCollision, noBorderCollision, noCollision, noCollision, noCollision, noCollision, noEntityCollisionMethods 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, hasNearbyAlivePlayerMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncData, syncDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockGetterExtension
getAuxLightManager, getAuxLightManagerMethods inherited from interface net.neoforged.neoforge.common.extensions.ILevelExtension
getCapability, getCapability, getCapability, getCapability, getDescription, getDescriptionKey, invalidateCapabilities, invalidateCapabilitiesMethods inherited from interface net.neoforged.neoforge.common.extensions.ILevelReaderExtension
holder, holderOrThrow, isAreaLoadedMethods inherited from interface net.minecraft.world.level.LevelAccessor
createTick, createTick, gameEvent, gameEvent, gameEvent, gameEvent, getDifficulty, getGameTime, 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, getBiome, getBlockStatesIfLoaded, getChunk, getChunk, getHeight, getHeight, getLightLevelDependentMagicValue, getMaxLocalRawBrightness, getMaxLocalRawBrightness, getMinY, getNoiseBiome, getPathfindingCostFromLightLevels, hasChunkAt, hasChunkAt, hasChunksAt, hasChunksAt, hasChunksAt, holderLookup, isEmptyBlock, isWaterAtMethods inherited from interface net.minecraft.world.level.LevelWriter
addFreshEntity, destroyBlock, destroyBlockMethods inherited from interface net.minecraft.world.level.ScheduledTickAccess
scheduleTick, scheduleTick, scheduleTick, scheduleTickMethods inherited from interface net.minecraft.world.level.SignalGetter
getBestNeighborSignal, getControlInputSignal, getDirectSignal, getDirectSignalTo, getSignal, hasNeighborSignal, hasSignal
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
DEFAULT_QUIT_MESSAGE
-
FLUID_PARTICLE_SPAWN_OFFSET
private static final double FLUID_PARTICLE_SPAWN_OFFSET- See Also:
-
NORMAL_LIGHT_UPDATES_PER_FRAME
private static final int NORMAL_LIGHT_UPDATES_PER_FRAME- See Also:
-
LIGHT_UPDATE_QUEUE_SIZE_THRESHOLD
private static final int LIGHT_UPDATE_QUEUE_SIZE_THRESHOLD- See Also:
-
tickingEntities
-
entityStorage
-
connection
-
levelRenderer
-
levelEventHandler
-
clientLevelData
-
tickRateManager
-
endFlashState
-
minecraft
-
players
-
dragonParts
-
mapData
-
skyFlashTime
private int skyFlashTime -
tintCaches
private final it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap<ColorResolver,BlockTintCache> tintCaches -
chunkSource
-
lightUpdateQueue
-
serverSimulationDistance
private int serverSimulationDistance -
blockStatePredictionHandler
-
globallyRenderedBlockEntities
-
explosionTracker
-
worldBorder
-
environmentAttributes
-
seaLevel
private final int seaLevel -
tickDayTime
private boolean tickDayTime -
MARKER_PARTICLE_ITEMS
-
modelDataManager
-
dayTimeFraction
private float dayTimeFraction -
dayTimePerTick
private float dayTimePerTick
-
-
Constructor Details
-
ClientLevel
public ClientLevel(ClientPacketListener connection, ClientLevel.ClientLevelData levelData, ResourceKey<Level> dimension, Holder<DimensionType> dimensionTypeRegistration, int viewDistance, int serverSimulationDistance, LevelRenderer levelRenderer, boolean isDebug, long biomeZoomSeed, int seaLevel)
-
-
Method Details
-
handleBlockChangedAck
public void handleBlockChangedAck(int sequence) -
onBlockEntityAdded
- Overrides:
onBlockEntityAddedin classLevel
-
getGloballyRenderedBlockEntities
-
setServerVerifiedBlockState
public void setServerVerifiedBlockState(BlockPos pos, BlockState state, @net.minecraft.world.level.block.Block.UpdateFlags int flags) -
syncBlockState
-
getBlockStatePredictionHandler
BlockStatePredictionHandler getBlockStatePredictionHandler() -
setBlock
public boolean setBlock(BlockPos p_233643_, BlockState p_233644_, @net.minecraft.world.level.block.Block.UpdateFlags int p_233645_, int p_233646_) Description copied from class:LevelSets a block state into this world. Flags are as follows:Block.UPDATE_NEIGHBORSwill notify neighboring block updates.Block.UPDATE_CLIENTSwill send the change to clients.Block.UPDATE_INVISIBLEwill prevent the block from being re-rendered.Block.UPDATE_IMMEDIATEwill force any re-renders to run on the main thread instead.Block.UPDATE_KNOWN_SHAPEwill prevent neighbor reactions (e.g. fences connecting, observers pulsing).Block.UPDATE_SUPPRESS_DROPSwill prevent neighbor reactions from spawning drops.Block.UPDATE_MOVE_BY_PISTONwill signify the block is being moved.Block.UPDATE_SKIP_SHAPE_UPDATE_ON_WIREwill skip shape update for redstone wire.Block.UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTSwill skip block entity removal side effects (BlockEntity#preRemoveSideEffects).Block.UPDATE_SKIP_ON_PLACEwill skip block placement post reaction (BlockBehaviour#onPlace).
- Specified by:
setBlockin interfaceLevelWriter- Overrides:
setBlockin classLevel
-
addEnvironmentAttributeLayers
private EnvironmentAttributeSystem.Builder addEnvironmentAttributeLayers(EnvironmentAttributeSystem.Builder builder) -
queueLightUpdate
-
pollLightUpdates
public void pollLightUpdates() -
endFlashState
-
tick
Runs a single tick for the world -
tickTime
private void tickTime() -
setTimeFromServer
public void setTimeFromServer(long gameTime, long dayTime, boolean tickDayTime) -
entitiesForRendering
-
tickEntities
public void tickEntities() -
isTickingEntity
-
shouldTickDeath
- Overrides:
shouldTickDeathin classLevel
-
tickNonPassenger
-
tickPassenger
-
unload
-
onChunkLoaded
-
onSectionBecomingNonEmpty
public void onSectionBecomingNonEmpty(long sectionPos) -
clearTintCaches
public void clearTintCaches() -
hasChunk
public boolean hasChunk(int chunkX, int chunkZ) - Specified by:
hasChunkin interfaceLevelAccessor- Specified by:
hasChunkin interfaceLevelReader
-
getEntityCount
public int getEntityCount() -
addEntity
-
removeEntity
-
getPushableEntities
- Overrides:
getPushableEntitiesin classLevel
-
getEntity
Returns the Entity with the given ID, ornullif it doesn't exist in this Level. -
disconnect
-
animateTick
public void animateTick(int posX, int posY, int posZ) -
getMarkerParticleTarget
-
doAnimateTick
public void doAnimateTick(int posX, int posY, int posZ, int range, RandomSource random, @Nullable Block block, BlockPos.MutableBlockPos pos) -
trySpawnDripParticles
private void trySpawnDripParticles(BlockPos pos, BlockState state, ParticleOptions options, boolean shapeDownSolid) -
spawnParticle
-
spawnFluidParticle
private void spawnFluidParticle(double xStart, double xEnd, double zStart, double zEnd, double y, ParticleOptions options) -
fillReportDetails
Adds some basic stats of the world to the given crash report.- Overrides:
fillReportDetailsin classLevel
-
playSeededSound
public void playSeededSound(@Nullable Entity p_393665_, double p_263372_, double p_263404_, double p_263365_, Holder<SoundEvent> p_263335_, SoundSource p_263417_, float p_263416_, float p_263349_, long p_263408_) - Specified by:
playSeededSoundin classLevel
-
playSeededSound
public void playSeededSound(@Nullable Entity p_263536_, Entity p_394209_, Holder<SoundEvent> p_263518_, SoundSource p_263487_, float p_263538_, float p_263524_, long p_263509_) - Specified by:
playSeededSoundin classLevel
-
playLocalSound
public void playLocalSound(Entity p_312749_, SoundEvent p_312635_, SoundSource p_312007_, float p_312298_, float p_312772_) - Overrides:
playLocalSoundin classLevel
-
playPlayerSound
public void playPlayerSound(SoundEvent p_401146_, SoundSource p_401176_, float p_401193_, float p_401050_) - Overrides:
playPlayerSoundin classLevel
-
playLocalSound
public void playLocalSound(double x, double y, double z, SoundEvent sound, SoundSource source, float volume, float pitch, boolean distanceDelay) - Overrides:
playLocalSoundin classLevel
-
playSound
private void playSound(double x, double y, double z, SoundEvent sound, SoundSource source, float volume, float pitch, boolean distanceDelay, long seed) -
createFireworks
public void createFireworks(double p_104585_, double p_104586_, double p_104587_, double p_104588_, double p_104589_, double p_104590_, List<FireworkExplosion> p_330281_) - Overrides:
createFireworksin classLevel
-
sendPacketToServer
- Overrides:
sendPacketToServerin classLevel
-
getWorldBorder
- Specified by:
getWorldBorderin interfaceCollisionGetter
-
recipeAccess
- Specified by:
recipeAccessin classLevel
-
tickRateManager
- Specified by:
tickRateManagerin classLevel
-
environmentAttributes
- Specified by:
environmentAttributesin interfaceLevelReader- Specified by:
environmentAttributesin classLevel
-
getBlockTicks
- Specified by:
getBlockTicksin interfaceScheduledTickAccess
-
getFluidTicks
- Specified by:
getFluidTicksin interfaceScheduledTickAccess
-
getChunkSource
- Specified by:
getChunkSourcein interfaceLevelAccessor
-
getMapData
- Specified by:
getMapDatain classLevel
-
overrideMapData
-
getScoreboard
- Specified by:
getScoreboardin classLevel
-
sendBlockUpdated
public void sendBlockUpdated(BlockPos pos, BlockState oldState, BlockState newState, @net.minecraft.world.level.block.Block.UpdateFlags int flags) Flags are as in setBlock- Specified by:
sendBlockUpdatedin classLevel
-
setBlocksDirty
- Overrides:
setBlocksDirtyin classLevel
-
setSectionDirtyWithNeighbors
public void setSectionDirtyWithNeighbors(int sectionX, int sectionY, int sectionZ) -
setSectionRangeDirty
public void setSectionRangeDirty(int minY, int minX, int minZ, int maxY, int maxX, int maxZ) -
destroyBlockProgress
- Specified by:
destroyBlockProgressin classLevel
-
globalLevelEvent
- Overrides:
globalLevelEventin classLevel
-
levelEvent
public void levelEvent(@Nullable Entity p_394519_, int p_104655_, BlockPos p_104656_, int p_104657_) - Specified by:
levelEventin interfaceLevelAccessor
-
addParticle
public void addParticle(ParticleOptions options, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) - Specified by:
addParticlein interfaceLevelAccessor- Overrides:
addParticlein classLevel
-
addParticle
public void addParticle(ParticleOptions p_104714_, boolean p_104715_, boolean p_383197_, double p_104716_, double p_104717_, double p_104718_, double p_104719_, double p_104720_, double p_104721_) - Overrides:
addParticlein classLevel
-
addAlwaysVisibleParticle
public void addAlwaysVisibleParticle(ParticleOptions options, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) - Overrides:
addAlwaysVisibleParticlein classLevel
-
addAlwaysVisibleParticle
public void addAlwaysVisibleParticle(ParticleOptions options, boolean overrideLimiter, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) - Overrides:
addAlwaysVisibleParticlein classLevel
-
doAddParticle
private void doAddParticle(ParticleOptions particle, boolean overrideLimiter, boolean alwaysShow, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) -
calculateParticleLevel
-
players
- Specified by:
playersin interfaceEntityGetter
-
dragonParts
- Specified by:
dragonPartsin classLevel
-
getUncachedNoiseBiome
- Specified by:
getUncachedNoiseBiomein interfaceLevelReader
-
getSkyFlashTime
private int getSkyFlashTime() -
setSkyFlashTime
public void setSkyFlashTime(int timeFlash) - Overrides:
setSkyFlashTimein classLevel
-
getShade
- Specified by:
getShadein interfaceBlockAndTintGetter
-
getBlockTint
- Specified by:
getBlockTintin interfaceBlockAndTintGetter- Specified by:
getBlockTintin interfaceLevelReader
-
calculateBlockTint
-
setRespawnData
- Specified by:
setRespawnDatain classLevel
-
getRespawnData
- Specified by:
getRespawnDatain classLevel
-
toString
-
getLevelData
- Specified by:
getLevelDatain interfaceLevelAccessor- Overrides:
getLevelDatain classLevel
-
gameEvent
- Specified by:
gameEventin interfaceLevelAccessor
-
getAllMapData
-
addMapData
-
getEntities
- Specified by:
getEntitiesin classLevel
-
gatherChunkSourceStats
- Specified by:
gatherChunkSourceStatsin classLevel
-
addDestroyBlockEffect
- Overrides:
addDestroyBlockEffectin classLevel
-
addBreakingBlockEffect
Deprecated. -
addBreakingBlockEffect
-
setServerSimulationDistance
public void setServerSimulationDistance(int serverSimulationDistance) -
getServerSimulationDistance
public int getServerSimulationDistance() -
enabledFeatures
- Specified by:
enabledFeaturesin interfaceLevelReader
-
potionBrewing
- Specified by:
potionBrewingin classLevel
-
fuelValues
- Specified by:
fuelValuesin classLevel
-
explode
public void explode(@Nullable Entity p_363686_, @Nullable DamageSource p_365268_, @Nullable ExplosionDamageCalculator p_363795_, double p_360494_, double p_360591_, double p_364949_, float p_361233_, boolean p_364900_, Level.ExplosionInteraction p_365033_, ParticleOptions p_361889_, ParticleOptions p_361473_, WeightedList<ExplosionParticleInfo> p_437196_, Holder<SoundEvent> p_362359_) -
getSeaLevel
public int getSeaLevel()- Specified by:
getSeaLevelin interfaceLevelReader
-
getClientLeafTintColor
- Overrides:
getClientLeafTintColorin classLevel
-
registerForCleaning
- Specified by:
registerForCleaningin interfaceCacheSlot.Cleaner<ClientLevel>
-
trackExplosionEffects
public void trackExplosionEffects(Vec3 center, float radius, int blockCount, WeightedList<ExplosionParticleInfo> blockParticles) -
getModelDataManager
Description copied from interface:ILevelExtensionRetrieves the model data manager for the given level. May be null on a server level.For model data retrieval, prefer calling
IBlockGetterExtension.getModelData(BlockPos)rather than this method, as it works on more than just a level.- Specified by:
getModelDataManagerin interfaceILevelExtension
-
getModelData
Description copied from interface:IBlockGetterExtensionRetrieves model data for a block at the given position.- Specified by:
getModelDatain interfaceIBlockGetterExtension- Parameters:
pos- the position to query- Returns:
- the model data at this position, or
ModelData.EMPTYif none exists
-
getShade
public float getShade(float normalX, float normalY, float normalZ, boolean shade) Description copied from interface:IBlockAndTintGetterExtensionComputes the shade for a given normal. Alternate version of the vanilla method taking in aDirection.- Specified by:
getShadein interfaceIBlockAndTintGetterExtension
-
setDayTimeFraction
@Internal public void setDayTimeFraction(float dayTimeFraction) - Specified by:
setDayTimeFractionin classLevel
-
getDayTimeFraction
@Internal public float getDayTimeFraction()- Specified by:
getDayTimeFractionin classLevel
-
getDayTimePerTick
public float getDayTimePerTick()Description copied from class:LevelReturns 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).- Specified by:
getDayTimePerTickin classLevel
-
setDayTimePerTick
@Internal public void setDayTimePerTick(float dayTimePerTick) Description copied from class:LevelDO NOT CALL.Use
ServerLevel.setDayTimePerTick(float)instead.- Specified by:
setDayTimePerTickin classLevel
-
addBreakingBlockEffect(BlockPos, Direction, net.minecraft.world.phys.HitResult)instead