Class ServerLevel
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.Level
net.minecraft.server.level.ServerLevel
- All Implemented Interfaces:
AutoCloseable, ServerEntityGetter, BiomeManager.NoiseBiomeSource, BlockAndTintGetter, BlockGetter, CollisionGetter, CommonLevelAccessor, EntityGetter, LevelAccessor, LevelHeightAccessor, LevelReader, LevelSimulatedReader, LevelSimulatedRW, LevelWriter, ScheduledTickAccess, ServerLevelAccessor, SignalGetter, WorldGenLevel, IAttachmentHolder, IBlockAndTintGetterExtension, IBlockGetterExtension, ILevelExtension, ILevelReaderExtension
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class Level
Level.ExplosionInteractionNested classes/interfaces inherited from class AttachmentHolder
AttachmentHolder.AsFieldNested classes/interfaces inherited from interface BlockGetter
BlockGetter.BlockStepVisitor -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final it.unimi.dsi.fastutil.objects.ObjectLinkedOpenHashSet<BlockEventData> private final List<BlockEventData> private final LevelTicks<Block> private final CapabilityListenerHolderprivate final ServerChunkCacheprivate final List<CustomSpawner> private final LevelDebugSynchronizersprivate @Nullable EnderDragonFight(package private) final it.unimi.dsi.fastutil.ints.Int2ObjectMap<PartEntity<?>> private static final intprivate intstatic final BlockPosprivate final PersistentEntitySectionManager<Entity> private final EntityTickListprivate final EnvironmentAttributeSystemprivate final LevelTicks<Fluid> private final GameEventDispatcherprivate booleanprivate booleanprivate static final org.slf4j.Loggerprivate static final intbooleanprivate final PathTypeCacheprivate final List<ServerPlayer> private final PortalForcerprotected final Raidsstatic final IntProviderstatic final IntProviderprivate final MinecraftServerprivate final ServerLevelDataprivate final SleepStatusprivate final StructureCheckprivate final StructureManagerprivate static final IntProviderstatic final IntProviderprivate final booleanprivate final ServerWaypointManagerFields inherited from class 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 AttachmentHolder
ATTACHMENTS_NBT_KEYFields inherited from interface ILevelExtension
TRANSLATION_PREFIXFields inherited from interface SignalGetter
DIRECTIONS -
Constructor Summary
ConstructorsConstructorDescriptionServerLevel(MinecraftServer server, Executor executor, LevelStorageSource.LevelStorageAccess levelStorage, ServerLevelData levelData, ResourceKey<Level> dimension, LevelStem levelStem, boolean isDebug, long biomeZoomSeed, List<CustomSpawner> customSpawners, boolean tickTime) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDuringTeleport(Entity entity) private booleanCalled when an entity is spawned in the world.booleanaddFreshEntity(Entity entity) voidaddLegacyChunkEntities(Stream<Entity> loaded) voidaddNewPlayer(ServerPlayer player) private voidaddPlayer(ServerPlayer player) voidaddRespawnedPlayer(ServerPlayer player) booleanaddWithUUID(Entity entity) Used for "unnatural" ways of entities appearing in the world, e.g. summon command, interdimensional teleportsvoidaddWorldGenChunkEntities(Stream<Entity> loaded) private voidprivate voidbooleanbooleanbooleanbooleanareEntitiesLoaded(long chunkKey) voidblockEvent(BlockPos pos, Block block, int b0, int b1) voidbroadcastDamageEvent(Entity entity, DamageSource source) voidbroadcastEntityEvent(Entity entity, byte event) Sends aClientboundEntityEventPacketto all tracked players of that entity.booleanbooleanbooleanvoidInternal method, used to clean capability listeners that are not referenced.voidvoidclose()voiddestroyBlockProgress(int id, BlockPos blockPos, int progress) private booleandoBlockEvent(BlockEventData eventData) Collection<PartEntity<?>> private voiddumpBlockEntityTickers(Writer output) private static voiddumpEntities(Writer output, Iterable<Entity> entities) voidexplode(@Nullable Entity source, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator damageCalculator, double x, double y, double z, float r, boolean fire, Level.ExplosionInteraction interactionType, ParticleOptions smallExplosionParticles, ParticleOptions largeExplosionParticles, WeightedList<ExplosionParticleInfo> blockParticles, Holder<SoundEvent> explosionSound) fillReportDetails(CrashReport report) Adds some basic stats of the world to the given crash report.findClosestBiome3d(Predicate<Holder<Biome>> biomeTest, BlockPos origin, int maxSearchRadius, int sampleResolutionHorizontal, int sampleResolutionVertical) findLightningRod(BlockPos center) protected BlockPos@Nullable BlockPosfindNearestMapStructure(TagKey<Structure> structureTag, BlockPos origin, int maxSearchRadius, boolean createReference) voidgameEvent(Holder<GameEvent> gameEvent, Vec3 position, GameEvent.Context context) private Explosion.BlockInteractiongetDestroyType(GameRule<Boolean> gameRule) @Nullable EnderDragonFightList<? extends EnderDragon> getEntities(EntityTypeTest<Entity, T> type, Predicate<? super T> selector) <T extends Entity>
voidgetEntities(EntityTypeTest<Entity, T> type, Predicate<? super T> selector, List<? super T> result) <T extends Entity>
voidgetEntities(EntityTypeTest<Entity, T> type, Predicate<? super T> selector, List<? super T> result, int maxResults) @Nullable EntitygetEntity(int id) Returns the Entity with the given ID, or null if it doesn't exist in this World.@Nullable EntitygetEntityInAnyDimension(UUID uuid) @Nullable EntitygetEntityOrPart(int id) Deprecated.it.unimi.dsi.fastutil.longs.LongSetgetLevel()int@Nullable MapItemSavedDatagetMapData(MapId id) float@Nullable PlayergetPlayerInAnyDimension(UUID uuid) getPlayers(Predicate<? super ServerPlayer> selector) getPlayers(Predicate<? super ServerPlayer> selector, int maxResults) @Nullable RaidgetRaids()@Nullable ServerPlayerintlonggetSeed()floatprivate static <T> StringgetTypeCount(Iterable<T> values, Function<T, String> typeGetter) getUncachedNoiseBiome(int quartX, int quartY, int quartZ) voidglobalLevelEvent(int type, BlockPos pos, int data) voidNotify all listeners that the capabilities at a specific position might have changed.voidNotify all listeners that the capabilities at all the positions in a chunk might have changed.booleanisAllowedToEnterPortal(Level toLevel) booleanisCloseToVillage(BlockPos pos, int sectionDistance) booleanbooleanisFlat()booleanbooleanbooleanisPositionTickingWithEntitiesLoaded(long key) booleanbooleanbooleanbooleanbooleanbooleanisVillage(SectionPos sectionPos) voidlevelEvent(@Nullable Entity source, int type, BlockPos pos, int data) booleanmayInteract(Entity entity, BlockPos pos) voidneighborChanged(BlockPos pos, Block changedBlock, @Nullable Orientation orientation) voidneighborChanged(BlockState state, BlockPos pos, Block changedBlock, @Nullable Orientation orientation, boolean movedByPiston) booleannoSave()voidonBlockEntityAdded(BlockEntity blockEntity) voidonReputationEvent(ReputationEventType type, Entity source, ReputationEventHandler target) voidplayers()voidplaySeededSound(@Nullable Entity except, double x, double y, double z, Holder<SoundEvent> sound, SoundSource source, float volume, float pitch, long seed) voidplaySeededSound(@Nullable Entity except, Entity sourceEntity, Holder<SoundEvent> sound, SoundSource source, float volume, float pitch, long seed) private voidprepareWeather(WeatherData weatherData) voidregisterCapabilityListener(BlockPos pos, ICapabilityInvalidationListener listener) Register a listener for capability invalidation.voidremovePlayerImmediately(ServerPlayer player, Entity.RemovalReason reason) voidvoidprivate voidvoidsave(@Nullable ProgressListener progressListener, boolean flush, boolean noSave) voidsaveDebugReport(Path rootDir) private voidsaveLevelData(boolean sync) intvoidsendBlockUpdated(BlockPos pos, BlockState old, BlockState current, int updateFlags) Flags are as in setBlockStateprivate booleansendParticles(ServerPlayer player, boolean overrideLimiter, double x, double y, double z, Packet<?> packet) <T extends ParticleOptions>
booleansendParticles(ServerPlayer player, T particle, boolean overrideLimiter, boolean alwaysShow, double x, double y, double z, int count, double xDist, double yDist, double zDist, double speed) <T extends ParticleOptions>
intsendParticles(T particle, boolean overrideLimiter, boolean alwaysShow, double x, double y, double z, int count, double xDist, double yDist, double zDist, double speed) <T extends ParticleOptions>
intsendParticles(T particle, double x, double y, double z, int count, double xDist, double yDist, double zDist, double speed) booleansetChunkForced(int chunkX, int chunkZ, boolean forced) voidsetDragonFight(@Nullable EnderDragonFight fight) Deprecated.voidsetMapData(MapId id, MapItemSavedData data) voidsetRespawnData(LevelData.RespawnData respawnData) booleanshouldTickBlocksAt(long chunkPos) voidstartTickingChunk(LevelChunk levelChunk) final voidsyncData(AttachmentType<?> type) Syncs a data attachment of the given type with all relevant clients.voidtick(BooleanSupplier haveTime) Runs a single tick for the worldprivate voidvoidtickChunk(LevelChunk chunk, int tickSpeed) voidtickCustomSpawners(boolean spawnEnemies) private voidvoidtickNonPassenger(Entity entity) private voidtickPassenger(Entity vehicle, Entity entity) voidvoidtickThunder(LevelChunk chunk) protected voidtickTime()toString()booleanAttempts to summon an entity and it's passengers.voidunload(LevelChunk levelChunk) voidupdateNeighborsAt(BlockPos pos, Block sourceBlock) voidupdateNeighborsAt(BlockPos pos, Block sourceBlock, @Nullable Orientation orientation) voidupdateNeighborsAtExceptFromFacing(BlockPos pos, Block blockObject, Direction skipDirection, @Nullable Orientation orientation) voidupdateNeighboursOnBlockSet(BlockPos pos, BlockState oldState) voidupdatePOIOnBlockStateChange(BlockPos pos, BlockState oldState, BlockState newState) voidvoidwaitForEntities(ChunkPos centerChunk, int radius) private voidMethods inherited from class Level
addAlwaysVisibleParticle, addAlwaysVisibleParticle, addBlockEntityTicker, addDestroyBlockEffect, addFreshBlockEntities, addParticle, addParticle, blockEntityChanged, canHaveWeather, createFireworks, damageSources, destroyBlock, dimension, dimensionType, dimensionTypeRegistration, explode, explode, explode, explode, getBiomeManager, getBlockEntity, getBlockRandomPos, getBlockState, getChunk, getChunk, getChunkAt, getChunkForCollisions, getClientLeafTintColor, getDefaultClockTime, getEntities, getEntities, getEntities, getEntities, getEntity, getFluidState, getHeight, getLevelData, getLightEngine, getMaxEntityRadius, getOverworldClockTime, getPushableEntities, getRainLevel, getRandom, getSkyDarken, getThunderLevel, getWorldBorderAdjustedRespawnData, guardEntityTick, hasEntities, increaseMaxEntityRadius, isBrightOutside, isClientSide, isDarkOutside, isDebug, isFluidAtPosition, isInSpawnableBounds, isInValidBounds, isInWorldBounds, isLoaded, isRaining, isRainingAt, isStateAtPosition, isThundering, loadedAndEntityCanStandOn, loadedAndEntityCanStandOnFace, markAndNotifyBlock, neighborShapeChanged, nextSubTickCount, palettedContainerFactory, playLocalSound, playLocalSound, playLocalSound, playPlayerSound, playSeededSound, playSound, playSound, playSound, playSound, playSound, precipitationAt, registryAccess, removeBlock, removeBlockEntity, sendPacketToServer, setBlock, setBlock, setBlockAndUpdate, setBlockEntity, setBlocksDirty, setRainLevel, setSkyFlashTime, setSpawnSettings, setThunderLevel, shouldTickBlocksAt, shouldTickDeath, tickBlockEntities, updateNeighbourForOutputSignal, updateSkyBrightnessMethods inherited from class AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, removeData, serializeAttachments, setDataMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface BlockAndTintGetter
canSeeSky, getBrightness, getLightEngine, getRawBrightnessMethods inherited from interface BlockGetter
clip, clipWithInteractionOverride, getBlockEntity, getBlockFloorHeight, getBlockFloorHeight, getBlockState, getBlockStates, getFluidState, getLightEmission, isBlockInLineMethods inherited from interface CollisionGetter
clipIncludingBorder, collidesWithSuffocatingBlock, findFreePosition, findSupportingBlock, getBlockAndLiquidCollisions, getBlockCollisions, getCollisions, getPreMoveCollisions, isUnobstructed, isUnobstructed, noBlockCollision, noBlockCollision, noBorderCollision, noCollision, noCollision, noCollision, noCollision, noEntityCollisionMethods inherited from interface CommonLevelAccessor
getBlockEntity, getEntityCollisions, getHeightmapPos, isUnobstructedMethods inherited from interface EntityGetter
getEntities, getEntities, getEntities, getEntitiesOfClass, getEntitiesOfClass, getEntityCollisions, getNearestPlayer, getNearestPlayer, getNearestPlayer, getPlayerByUUID, hasNearbyAlivePlayer, isUnobstructedMethods inherited from interface IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncDataMethods inherited from interface IBlockAndTintGetterExtension
getShadeMethods inherited from interface IBlockGetterExtension
getAuxLightManager, getAuxLightManager, getModelDataMethods inherited from interface ILevelExtension
getCapability, getCapability, getCapability, getCapability, getDescription, getDescriptionKey, getModelDataManagerMethods inherited from interface ILevelReaderExtension
holder, holderOrThrow, isAreaLoadedMethods inherited from interface LevelAccessor
addParticle, createTick, createTick, gameEvent, gameEvent, gameEvent, gameEvent, getDifficulty, getGameTime, getLevelData, getRandom, hasChunk, levelEvent, neighborShapeChanged, nextSubTickCount, playSound, playSoundMethods inherited from interface LevelHeightAccessor
getMaxSectionY, getMaxY, getMinSectionY, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isInsideBuildHeight, isOutsideBuildHeight, isOutsideBuildHeightMethods inherited from interface LevelReader
canSeeSkyFromBelowWater, containsAnyLiquid, dimensionType, getBiome, getBiomeManager, getBlockStatesIfLoaded, getBlockTint, getChunk, getChunk, getChunk, getChunk, getChunkForCollisions, getEffectiveSkyBrightness, getHeight, getHeight, getHeight, getLightLevelDependentMagicValue, getMaxLocalRawBrightness, getMaxLocalRawBrightness, getMinY, getNoiseBiome, getPathfindingCostFromLightLevels, getSkyDarken, hasChunkAt, hasChunkAt, hasChunksAt, hasChunksAt, hasChunksAt, holderLookup, isClientSide, isEmptyBlock, isWaterAt, registryAccessMethods inherited from interface LevelSimulatedReader
isFluidAtPosition, isStateAtPositionMethods inherited from interface LevelWriter
destroyBlock, destroyBlock, destroyBlock, removeBlock, setBlock, setBlockMethods inherited from interface ScheduledTickAccess
scheduleTick, scheduleTick, scheduleTick, scheduleTickMethods inherited from interface ServerEntityGetter
getNearbyEntities, getNearbyPlayers, getNearestEntity, getNearestEntity, getNearestEntity, getNearestPlayer, getNearestPlayer, getNearestPlayerMethods inherited from interface ServerLevelAccessor
addFreshEntityWithPassengersMethods inherited from interface SignalGetter
getBestNeighborSignal, getControlInputSignal, getDirectSignal, getDirectSignalTo, getSignal, hasNeighborSignal, hasSignalMethods inherited from interface WorldGenLevel
ensureCanWrite, setCurrentlyGenerating
-
Field Details
-
END_SPAWN_POINT
-
RAIN_DELAY
-
RAIN_DURATION
-
THUNDER_DELAY
-
THUNDER_DURATION
-
LOGGER
private static final org.slf4j.Logger LOGGER -
EMPTY_TIME_NO_TICK
private static final int EMPTY_TIME_NO_TICK- See Also:
-
MAX_SCHEDULED_TICKS_PER_TICK
private static final int MAX_SCHEDULED_TICKS_PER_TICK- See Also:
-
players
-
chunkSource
-
server
-
serverLevelData
-
entityTickList
-
waypointManager
-
environmentAttributes
-
entityManager
-
gameEventDispatcher
-
noSave
public boolean noSave -
sleepStatus
-
emptyTime
private int emptyTime -
portalForcer
-
blockTicks
-
fluidTicks
-
pathTypesByPosCache
-
raids
-
blockEvents
-
blockEventsToReschedule
-
handlingTick
private boolean handlingTick -
customSpawners
-
dragonFight
-
dragonParts
-
structureManager
-
structureCheck
-
tickTime
private final boolean tickTime -
debugSynchronizers
-
capListenerHolder
-
-
Constructor Details
-
ServerLevel
public ServerLevel(MinecraftServer server, Executor executor, LevelStorageSource.LevelStorageAccess levelStorage, ServerLevelData levelData, ResourceKey<Level> dimension, LevelStem levelStem, boolean isDebug, long biomeZoomSeed, List<CustomSpawner> customSpawners, boolean tickTime)
-
-
Method Details
-
setDragonFight
Deprecated. -
getUncachedNoiseBiome
- Specified by:
getUncachedNoiseBiomein interfaceLevelReader
-
structureManager
-
clockManager
- Specified by:
clockManagerin classLevel
-
environmentAttributes
- Specified by:
environmentAttributesin interfaceLevelReader- Specified by:
environmentAttributesin classLevel
-
tick
Runs a single tick for the world -
shouldTickBlocksAt
public boolean shouldTickBlocksAt(long chunkPos) - Overrides:
shouldTickBlocksAtin classLevel
-
tickTime
protected void tickTime() -
tickCustomSpawners
public void tickCustomSpawners(boolean spawnEnemies) -
wakeUpAllPlayers
private void wakeUpAllPlayers() -
tickChunk
-
tickThunder
-
tickPrecipitation
-
findLightningRod
-
findLightningTargetAround
-
isHandlingTick
public boolean isHandlingTick() -
canSleepThroughNights
public boolean canSleepThroughNights() -
announceSleepStatus
private void announceSleepStatus() -
updateSleepingPlayerList
public void updateSleepingPlayerList() -
getScoreboard
- Specified by:
getScoreboardin classLevel
-
getWaypointManager
-
getCurrentDifficultyAt
- Specified by:
getCurrentDifficultyAtin interfaceServerLevelAccessor
-
getMoonBrightness
-
prepareWeather
-
advanceWeatherCycle
private void advanceWeatherCycle() -
resetWeatherCycle
public void resetWeatherCycle() -
resetEmptyTime
public void resetEmptyTime() -
tickFluid
-
tickBlock
-
tickNonPassenger
-
tickPassenger
-
updateNeighboursOnBlockSet
-
mayInteract
- Overrides:
mayInteractin classLevel
-
save
-
saveLevelData
private void saveLevelData(boolean sync) -
getEntities
public <T extends Entity> List<? extends T> getEntities(EntityTypeTest<Entity, T> type, Predicate<? super T> selector) -
getEntities
public <T extends Entity> void getEntities(EntityTypeTest<Entity, T> type, Predicate<? super T> selector, List<? super T> result) -
getEntities
public <T extends Entity> void getEntities(EntityTypeTest<Entity, T> type, Predicate<? super T> selector, List<? super T> result, int maxResults) -
getDragons
-
getPlayers
-
getPlayers
-
getRandomPlayer
-
addFreshEntity
- Specified by:
addFreshEntityin interfaceLevelWriter
-
addWithUUID
Used for "unnatural" ways of entities appearing in the world, e.g. summon command, interdimensional teleports -
addDuringTeleport
-
addNewPlayer
-
addRespawnedPlayer
-
addPlayer
-
addEntity
Called when an entity is spawned in the world. This includes players. -
tryAddFreshEntityWithPassengers
Attempts to summon an entity and it's passengers. They will only be summoned if all entities are unique and not already in queue to be summoned. -
unload
-
removePlayerImmediately
-
destroyBlockProgress
- Specified by:
destroyBlockProgressin classLevel
-
playSeededSound
public void playSeededSound(@Nullable Entity except, double x, double y, double z, Holder<SoundEvent> sound, SoundSource source, float volume, float pitch, long seed) - Specified by:
playSeededSoundin classLevel
-
playSeededSound
public void playSeededSound(@Nullable Entity except, Entity sourceEntity, Holder<SoundEvent> sound, SoundSource source, float volume, float pitch, long seed) - Specified by:
playSeededSoundin classLevel
-
globalLevelEvent
- Overrides:
globalLevelEventin classLevel
-
levelEvent
- Specified by:
levelEventin interfaceLevelAccessor
-
getLogicalHeight
public int getLogicalHeight() -
gameEvent
- Specified by:
gameEventin interfaceLevelAccessor
-
sendBlockUpdated
Flags are as in setBlockState- Specified by:
sendBlockUpdatedin classLevel
-
updateNeighborsAt
- Specified by:
updateNeighborsAtin interfaceLevelAccessor
-
updateNeighborsAt
- Overrides:
updateNeighborsAtin classLevel
-
updateNeighborsAtExceptFromFacing
public void updateNeighborsAtExceptFromFacing(BlockPos pos, Block blockObject, Direction skipDirection, @Nullable Orientation orientation) - Overrides:
updateNeighborsAtExceptFromFacingin classLevel
-
neighborChanged
- Overrides:
neighborChangedin classLevel
-
neighborChanged
public void neighborChanged(BlockState state, BlockPos pos, Block changedBlock, @Nullable Orientation orientation, boolean movedByPiston) - Overrides:
neighborChangedin classLevel
-
broadcastEntityEvent
Sends aClientboundEntityEventPacketto all tracked players of that entity.- Overrides:
broadcastEntityEventin classLevel
-
broadcastDamageEvent
- Overrides:
broadcastDamageEventin classLevel
-
getChunkSource
- Specified by:
getChunkSourcein interfaceLevelAccessor
-
explode
public void explode(@Nullable Entity source, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator damageCalculator, double x, double y, double z, float r, boolean fire, Level.ExplosionInteraction interactionType, ParticleOptions smallExplosionParticles, ParticleOptions largeExplosionParticles, WeightedList<ExplosionParticleInfo> blockParticles, Holder<SoundEvent> explosionSound) -
getDestroyType
-
blockEvent
- Overrides:
blockEventin classLevel
-
runBlockEvents
private void runBlockEvents() -
doBlockEvent
-
getBlockTicks
- Specified by:
getBlockTicksin interfaceScheduledTickAccess
-
getFluidTicks
- Specified by:
getFluidTicksin interfaceScheduledTickAccess
-
getServer
- Specified by:
getServerin interfaceLevelAccessor- Overrides:
getServerin classLevel
-
getPortalForcer
-
getStructureManager
-
sendParticles
public <T extends ParticleOptions> int sendParticles(T particle, double x, double y, double z, int count, double xDist, double yDist, double zDist, double speed) -
sendParticles
public <T extends ParticleOptions> int sendParticles(T particle, boolean overrideLimiter, boolean alwaysShow, double x, double y, double z, int count, double xDist, double yDist, double zDist, double speed) -
sendParticles
public <T extends ParticleOptions> boolean sendParticles(ServerPlayer player, T particle, boolean overrideLimiter, boolean alwaysShow, double x, double y, double z, int count, double xDist, double yDist, double zDist, double speed) -
sendParticles
private boolean sendParticles(ServerPlayer player, boolean overrideLimiter, double x, double y, double z, Packet<?> packet) -
getEntity
-
getEntityInAnyDimension
- Overrides:
getEntityInAnyDimensionin classLevel
-
getPlayerInAnyDimension
- Overrides:
getPlayerInAnyDimensionin classLevel
-
getEntityOrPart
Deprecated. -
dragonParts
- Specified by:
dragonPartsin classLevel
-
findNearestMapStructure
-
findClosestBiome3d
-
getWorldBorder
- Specified by:
getWorldBorderin interfaceCollisionGetter
-
recipeAccess
- Specified by:
recipeAccessin classLevel
-
tickRateManager
- Specified by:
tickRateManagerin classLevel
-
noSave
-
getDataStorage
-
getMapData
- Specified by:
getMapDatain classLevel
-
setMapData
-
getFreeMapId
-
setRespawnData
- Specified by:
setRespawnDatain classLevel
-
getRespawnData
- Specified by:
getRespawnDatain classLevel
-
getForceLoadedChunks
public it.unimi.dsi.fastutil.longs.LongSet getForceLoadedChunks() -
setChunkForced
public boolean setChunkForced(int chunkX, int chunkZ, boolean forced) -
players
- Specified by:
playersin interfaceEntityGetter
-
updatePOIOnBlockStateChange
- Overrides:
updatePOIOnBlockStateChangein classLevel
-
getPoiManager
-
isVillage
-
isVillage
-
isCloseToVillage
-
sectionsToVillage
-
getRaids
-
getRaidAt
-
isRaided
-
onReputationEvent
public void onReputationEvent(ReputationEventType type, Entity source, ReputationEventHandler target) -
saveDebugReport
- Throws:
IOException
-
dumpEntities
- Throws:
IOException
-
dumpBlockEntityTickers
- Throws:
IOException
-
clearBlockEvents
-
getShade
- Specified by:
getShadein interfaceBlockAndTintGetter
-
getAllEntities
-
toString
-
isFlat
public boolean isFlat() -
getSeed
public long getSeed()- Specified by:
getSeedin interfaceWorldGenLevel
-
getDragonFight
-
getWeatherData
-
getLevel
- Specified by:
getLevelin interfaceServerEntityGetter- Specified by:
getLevelin interfaceServerLevelAccessor
-
getWatchdogStats
-
getTypeCount
-
getEntities
- Specified by:
getEntitiesin classLevel
-
addLegacyChunkEntities
-
addWorldGenChunkEntities
-
startTickingChunk
-
onStructureStartsAvailable
-
getPathTypeCache
-
waitForEntities
-
isSpawningMonsters
public boolean isSpawningMonsters() -
close
- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classLevel- Throws:
IOException
-
gatherChunkSourceStats
- Specified by:
gatherChunkSourceStatsin classLevel
-
areEntitiesLoaded
public boolean areEntitiesLoaded(long chunkKey) -
isPositionTickingWithEntitiesLoaded
public boolean isPositionTickingWithEntitiesLoaded(long key) -
isPositionEntityTicking
-
areEntitiesActuallyLoadedAndTicking
-
anyPlayerCloseEnoughForSpawning
-
anyPlayerCloseEnoughForSpawning
-
canSpreadFireAround
-
canSpawnEntitiesInChunk
-
enabledFeatures
- Specified by:
enabledFeaturesin interfaceLevelReader
-
potionBrewing
- Specified by:
potionBrewingin classLevel
-
fuelValues
- Specified by:
fuelValuesin classLevel
-
getGameRules
-
fillReportDetails
Description copied from class:LevelAdds some basic stats of the world to the given crash report.- Overrides:
fillReportDetailsin classLevel
-
getSeaLevel
public int getSeaLevel()- Specified by:
getSeaLevelin interfaceLevelReader
-
onBlockEntityAdded
- Overrides:
onBlockEntityAddedin classLevel
-
debugSynchronizers
-
isAllowedToEnterPortal
-
isPvpAllowed
public boolean isPvpAllowed() -
isCommandBlockEnabled
public boolean isCommandBlockEnabled() -
isSpawnerBlockEnabled
public boolean isSpawnerBlockEnabled() -
syncData
Description copied from interface:IAttachmentHolderSyncs a data attachment of the given type with all relevant clients.If there is currently no attachment of the given type, the removal of the attachment is synced to the client.
- Specified by:
syncDatain interfaceIAttachmentHolder- See Also:
-
invalidateCapabilities
Description copied from interface:ILevelExtensionNotify all listeners that the capabilities at a specific position might have changed. This includes new capabilities becoming available.This method will only do something on
ServerLevels, but it is safe to call on anyLevel, without the need for aninstanceofcheck.If you already have a block entity at that position, you can call
IBlockEntityExtension.invalidateCapabilities()instead.- Specified by:
invalidateCapabilitiesin interfaceILevelExtension
-
invalidateCapabilities
Description copied from interface:ILevelExtensionNotify all listeners that the capabilities at all the positions in a chunk might have changed. This includes new capabilities becoming available.This method will only do something on
ServerLevels, but it is safe to call on anyLevel, without the need for aninstanceofcheck.- Specified by:
invalidateCapabilitiesin interfaceILevelExtension
-
registerCapabilityListener
Register a listener for capability invalidation.- See Also:
-
cleanCapabilityListenerReferences
@Internal public void cleanCapabilityListenerReferences()Internal method, used to clean capability listeners that are not referenced. Do not call.
-