Class ServerLevel
- All Implemented Interfaces:
AutoCloseable,BiomeManager.NoiseBiomeSource,BlockAndTintGetter,BlockGetter,CollisionGetter,CommonLevelAccessor,EntityGetter,LevelAccessor,LevelHeightAccessor,LevelReader,LevelSimulatedReader,LevelSimulatedRW,LevelTimeAccess,LevelWriter,ServerLevelAccessor,SignalGetter,WorldGenLevel,IAttachmentHolder,IBlockAndTintGetterExtension,IBlockGetterExtension,ILevelExtension,ILevelReaderExtension
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.world.level.Level
Level.ExplosionInteractionNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField -
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 EndDragonFight(package private) final it.unimi.dsi.fastutil.ints.Int2ObjectMap<PartEntity<?>> private static final intprivate intstatic final BlockPosprivate final PersistentEntitySectionManager<Entity> (package private) final EntityTickListprivate final LevelTicks<Fluid> private final GameEventDispatcherprivate boolean(package private) booleanprivate intprivate static final org.slf4j.Loggerprivate static final intbooleanprivate final PathTypeCache(package private) final List<ServerPlayer> private final PortalForcerprotected final Raidsstatic final IntProviderstatic final IntProviderprivate final RandomSequencesprivate final MinecraftServerprivate final ServerLevelDataprivate final SleepStatusprivate final StructureCheckprivate final StructureManagerprivate static final IntProviderstatic final IntProviderprivate final booleanFields inherited from class net.minecraft.world.level.Level
addend, blockEntityTickers, captureBlockSnapshots, capturedBlockSnapshots, END, isClientSide, 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, thunderLevel, TICKS_PER_DAYFields 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
ConstructorsConstructorDescriptionServerLevel(MinecraftServer server, Executor dispatcher, LevelStorageSource.LevelStorageAccess levelStorageAccess, ServerLevelData serverLevelData, ResourceKey<Level> dimension, LevelStem levelStem, ChunkProgressListener progressListener, boolean isDebug, long biomeZoomSeed, List<CustomSpawner> customSpawners, boolean tickTime, RandomSequences randomSequences) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDuringTeleport(Entity entity) private booleanCalled when an entity is spawned in the world.booleanaddFreshEntity(Entity entity) voidaddLegacyChunkEntities(Stream<Entity> entities) 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.voidaddWorldGenChunkEntities(Stream<Entity> entities) private voidprivate voidbooleanareEntitiesLoaded(long chunkPos) voidblockEvent(BlockPos pos, Block block, int eventID, int eventParam) voidblockUpdated(BlockPos pos, Block block) voidbroadcastDamageEvent(Entity entity, DamageSource damageSource) voidbroadcastEntityEvent(Entity entity, byte state) Sends aClientboundEntityEventPacketto all tracked players of that entity.booleanvoidInternal method, used to clean capability listeners that are not referenced.voidclearBlockEvents(BoundingBox boundingBox) voidclose()voiddestroyBlockProgress(int breakerId, BlockPos pos, int progress) private booleandoBlockEvent(BlockEventData event) private voiddumpBlockEntityTickers(Writer output) private static voiddumpEntities(Writer writer, Iterable<Entity> entities) explode(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) fillReportDetails(CrashReport report) Adds some basic stats of the world to the given crash report.findClosestBiome3d(Predicate<Holder<Biome>> biomePredicate, BlockPos pos, int radius, int horizontalStep, int verticalStep) findLightningRod(BlockPos pos) protected BlockPosfindNearestMapStructure(TagKey<Structure> structureTag, BlockPos pos, int radius, boolean skipExistingChunks) voidgameEvent(Holder<GameEvent> gameEvent, Vec3 pos, GameEvent.Context context) floatfloatReturns the current ratio between game ticks and clock ticks.List<? extends EnderDragon> getEntities(EntityTypeTest<Entity, T> typeTest, Predicate<? super T> predicate) <T extends Entity>
voidgetEntities(EntityTypeTest<Entity, T> typeTest, Predicate<? super T> predicate, List<? super T> output) <T extends Entity>
voidgetEntities(EntityTypeTest<Entity, T> typeTest, Predicate<? super T> predicate, List<? super T> output, int maxResults) getEntity(int id) Returns the Entity with the given ID, or null if it doesn't exist in this World.getEntityOrPart(int id) Deprecated.it.unimi.dsi.fastutil.longs.LongSetgetLevel()intgetMapData(MapId mapId) Collection<PartEntity<?>> All part entities in this world.getPlayers(Predicate<? super ServerPlayer> predicate) getPlayers(Predicate<? super ServerPlayer> predicate, int maxResults) getRaids()getRandomSequence(ResourceLocation location) longgetSeed()floatprivate static <T> StringgetTypeCount(Iterable<T> objects, Function<T, String> typeGetter) getUncachedNoiseBiome(int x, int y, int z) voidglobalLevelEvent(int id, 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.booleanisCloseToVillage(BlockPos pos, int sections) booleanisFlat()booleanbooleanbooleanisNaturalSpawningAllowed(ChunkPos chunkPos) booleanprivate booleanisPositionTickingWithEntitiesLoaded(long chunkPos) booleanbooleanbooleanisVillage(SectionPos pos) voidlevelEvent(Player player, int type, BlockPos pos, int data) booleanmayInteract(Player player, BlockPos pos) voidneighborChanged(BlockPos pos, Block block, BlockPos fromPos) voidneighborChanged(BlockState state, BlockPos pos, Block block, BlockPos fromPos, boolean isMoving) booleannoSave()voidonBlockStateChange(BlockPos pos, BlockState blockState, BlockState newState) voidonReputationEvent(ReputationEventType type, Entity target, ReputationEventHandler host) voidplayers()voidplaySeededSound(Player player, double x, double y, double z, Holder<SoundEvent> sound, SoundSource category, float volume, float pitch, long seed) voidplaySeededSound(Player player, Entity entity, Holder<SoundEvent> sound, SoundSource category, float volume, float pitch, long seed) voidregisterCapabilityListener(BlockPos pos, ICapabilityInvalidationListener listener) Register a listener for capability invalidation.voidremovePlayerImmediately(ServerPlayer player, Entity.RemovalReason reason) voidvoidprivate voidvoidsave(ProgressListener progress, boolean flush, boolean skipSave) voidsaveDebugReport(Path p_path) private voidintvoidsendBlockUpdated(BlockPos pos, BlockState oldState, BlockState newState, int flags) Flags are as in setBlockStateprivate booleansendParticles(ServerPlayer player, boolean longDistance, double posX, double posY, double posZ, Packet<?> packet) <T extends ParticleOptions>
booleansendParticles(ServerPlayer player, T type, boolean longDistance, double posX, double posY, double posZ, int particleCount, double xOffset, double yOffset, double zOffset, double speed) <T extends ParticleOptions>
intsendParticles(T type, double posX, double posY, double posZ, int particleCount, double xOffset, double yOffset, double zOffset, double speed) booleansetChunkForced(int chunkX, int chunkZ, boolean add) voidsetDayTime(long time) voidsetDayTimeFraction(float dayTimeFraction) voidsetDayTimePerTick(float dayTimePerTick) This allows mods to set the rate time flows in a level.voidsetDefaultSpawnPos(BlockPos pos, float angle) voidsetDragonFight(EndDragonFight dragonFight) Deprecated.voidsetMapData(MapId mapId, MapItemSavedData mapData) voidsetWeatherParameters(int clearTime, int weatherTime, boolean isRaining, boolean isThundering) private booleanshouldDiscardEntity(Entity entity) booleanshouldTickBlocksAt(long chunkPos) voidstartTickingChunk(LevelChunk chunk) voidtick(BooleanSupplier hasTimeLeft) Runs a single tick for the worldprivate voidvoidtickChunk(LevelChunk chunk, int randomTickSpeed) voidtickCustomSpawners(boolean spawnEnemies, boolean spawnFriendlies) private voidvoidtickNonPassenger(Entity p_entity) private voidtickPassenger(Entity ridingEntity, Entity passengerEntity) voidtickPrecipitation(BlockPos blockPos) protected voidtickTime()toString()booleanAttempts to summon an entity and it's passangers.voidunload(LevelChunk chunk) voidupdateNeighborsAt(BlockPos pos, Block block) voidupdateNeighborsAtExceptFromFacing(BlockPos pos, Block blockType, Direction skipSide) voidprivate voidMethods inherited from class net.minecraft.world.level.Level
addAlwaysVisibleParticle, addAlwaysVisibleParticle, addBlockEntityTicker, addDestroyBlockEffect, addFreshBlockEntities, addParticle, addParticle, advanceDaytime, blockEntityChanged, createFireworks, damageSources, destroyBlock, dimension, dimensionType, dimensionTypeRegistration, disconnect, explode, explode, explode, explode, explode, getBiomeManager, getBlockEntity, getBlockRandomPos, getBlockState, getChunk, getChunk, getChunkAt, getChunkForCollisions, getCurrentDifficultyAt, getDayTime, getEntities, getEntities, getEntities, getEntities, getFluidState, getGameRules, getGameTime, getHeight, getLevelData, getLightEngine, getMaxEntityRadius, getProfiler, getProfilerSupplier, getRainLevel, getRandom, getSeaLevel, getSharedSpawnAngle, getSharedSpawnPos, getSkyDarken, getSunAngle, getThunderLevel, getWorldBorder, guardEntityTick, increaseMaxEntityRadius, isClientSide, isDay, isDebug, isFluidAtPosition, isInSpawnableBounds, isInWorldBounds, isLoaded, isNight, isRaining, isRainingAt, isStateAtPosition, isThundering, loadedAndEntityCanStandOn, loadedAndEntityCanStandOnFace, markAndNotifyBlock, neighborShapeChanged, nextSubTickCount, playLocalSound, playLocalSound, playLocalSound, playSeededSound, playSound, playSound, playSound, playSound, playSound, playSound, prepareWeather, registryAccess, removeBlock, removeBlockEntity, sendPacketToServer, setBlock, setBlock, setBlockAndUpdate, setBlockEntity, setBlocksDirty, setRainLevel, setSkyFlashTime, setSpawnSettings, setThunderLevel, shouldTickBlocksAt, shouldTickDeath, tickBlockEntities, updateNeighbourForOutputSignal, 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, getLightEngine, getRawBrightnessMethods 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, hasNearbyAlivePlayerMethods 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, getModelDataManagerMethods inherited from interface net.neoforged.neoforge.common.extensions.ILevelReaderExtension
holder, holderOrThrow, isAreaLoadedMethods inherited from interface net.minecraft.world.level.LevelAccessor
addParticle, dayTime, gameEvent, gameEvent, gameEvent, gameEvent, getCurrentDifficultyAt, getDifficulty, getLevelData, getRandom, hasChunk, levelEvent, neighborShapeChanged, nextSubTickCount, playSound, playSound, scheduleTick, scheduleTick, scheduleTick, scheduleTickMethods 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, getBiome, getBiomeManager, getBlockStatesIfLoaded, getBlockTint, getChunk, getChunk, getChunk, getChunk, getChunkForCollisions, getHeight, getHeight, getLightLevelDependentMagicValue, getMaxLocalRawBrightness, getMaxLocalRawBrightness, getMinBuildHeight, getNoiseBiome, getPathfindingCostFromLightLevels, getSeaLevel, getSkyDarken, 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
destroyBlock, destroyBlock, destroyBlock, removeBlock, setBlock, setBlockMethods inherited from interface net.minecraft.world.level.ServerLevelAccessor
addFreshEntityWithPassengersMethods inherited from interface net.minecraft.world.level.SignalGetter
getBestNeighborSignal, getControlInputSignal, getDirectSignal, getDirectSignalTo, getSignal, hasNeighborSignal, hasSignalMethods inherited from interface net.minecraft.world.level.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
-
lastSpawnChunkRadius
private int lastSpawnChunkRadius -
entityTickList
-
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 -
randomSequences
-
capListenerHolder
-
-
Constructor Details
-
ServerLevel
public ServerLevel(MinecraftServer server, Executor dispatcher, LevelStorageSource.LevelStorageAccess levelStorageAccess, ServerLevelData serverLevelData, ResourceKey<Level> dimension, LevelStem levelStem, ChunkProgressListener progressListener, boolean isDebug, long biomeZoomSeed, List<CustomSpawner> customSpawners, boolean tickTime, @Nullable RandomSequences randomSequences)
-
-
Method Details
-
setDragonFight
Deprecated. -
setWeatherParameters
public void setWeatherParameters(int clearTime, int weatherTime, boolean isRaining, boolean isThundering) -
getUncachedNoiseBiome
- Specified by:
getUncachedNoiseBiomein interfaceLevelReader
-
structureManager
-
tick
Runs a single tick for the world -
shouldTickBlocksAt
public boolean shouldTickBlocksAt(long chunkPos) - Overrides:
shouldTickBlocksAtin classLevel
-
tickTime
protected void tickTime() -
setDayTime
public void setDayTime(long time) -
tickCustomSpawners
public void tickCustomSpawners(boolean spawnEnemies, boolean spawnFriendlies) -
shouldDiscardEntity
-
wakeUpAllPlayers
private void wakeUpAllPlayers() -
tickChunk
-
tickPrecipitation
-
findLightningRod
-
findLightningTargetAround
-
isHandlingTick
public boolean isHandlingTick() -
canSleepThroughNights
public boolean canSleepThroughNights() -
announceSleepStatus
private void announceSleepStatus() -
updateSleepingPlayerList
public void updateSleepingPlayerList() -
getScoreboard
- Specified by:
getScoreboardin classLevel
-
advanceWeatherCycle
private void advanceWeatherCycle() -
resetWeatherCycle
public void resetWeatherCycle() -
resetEmptyTime
public void resetEmptyTime() -
tickFluid
-
tickBlock
-
tickNonPassenger
-
tickPassenger
-
mayInteract
- Overrides:
mayInteractin classLevel
-
save
-
saveLevelData
private void saveLevelData() -
getEntities
public <T extends Entity> List<? extends T> getEntities(EntityTypeTest<Entity, T> typeTest, Predicate<? super T> predicate) -
getEntities
public <T extends Entity> void getEntities(EntityTypeTest<Entity, T> typeTest, Predicate<? super T> predicate, List<? super T> output) -
getEntities
public <T extends Entity> void getEntities(EntityTypeTest<Entity, T> typeTest, Predicate<? super T> predicate, List<? super T> output, 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 passangers. 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 Player player, double x, double y, double z, Holder<SoundEvent> sound, SoundSource category, float volume, float pitch, long seed) - Specified by:
playSeededSoundin classLevel
-
playSeededSound
public void playSeededSound(@Nullable Player player, Entity entity, Holder<SoundEvent> sound, SoundSource category, 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
- Overrides:
updateNeighborsAtin classLevel
-
updateNeighborsAtExceptFromFacing
- Overrides:
updateNeighborsAtExceptFromFacingin classLevel
-
neighborChanged
- Overrides:
neighborChangedin classLevel
-
neighborChanged
public void neighborChanged(BlockState state, BlockPos pos, Block block, BlockPos fromPos, boolean isMoving) - 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 Explosion 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) -
blockEvent
- Overrides:
blockEventin classLevel
-
runBlockEvents
private void runBlockEvents() -
doBlockEvent
-
getBlockTicks
- Specified by:
getBlockTicksin interfaceLevelAccessor
-
getFluidTicks
- Specified by:
getFluidTicksin interfaceLevelAccessor
-
getServer
- Specified by:
getServerin interfaceLevelAccessor- Overrides:
getServerin classLevel
-
getPortalForcer
-
getStructureManager
-
sendParticles
public <T extends ParticleOptions> int sendParticles(T type, double posX, double posY, double posZ, int particleCount, double xOffset, double yOffset, double zOffset, double speed) -
sendParticles
public <T extends ParticleOptions> boolean sendParticles(ServerPlayer player, T type, boolean longDistance, double posX, double posY, double posZ, int particleCount, double xOffset, double yOffset, double zOffset, double speed) -
sendParticles
private boolean sendParticles(ServerPlayer player, boolean longDistance, double posX, double posY, double posZ, Packet<?> packet) -
getEntity
Returns the Entity with the given ID, or null if it doesn't exist in this World. -
getEntityOrPart
Deprecated. -
getEntity
-
findNearestMapStructure
-
findClosestBiome3d
-
getRecipeManager
- Specified by:
getRecipeManagerin classLevel
-
tickRateManager
- Specified by:
tickRateManagerin classLevel
-
noSave
public boolean noSave() -
getDataStorage
-
getMapData
- Specified by:
getMapDatain classLevel
-
setMapData
- Specified by:
setMapDatain classLevel
-
getFreeMapId
- Specified by:
getFreeMapIdin classLevel
-
setDefaultSpawnPos
-
getForcedChunks
public it.unimi.dsi.fastutil.longs.LongSet getForcedChunks() -
setChunkForced
public boolean setChunkForced(int chunkX, int chunkZ, boolean add) -
players
- Specified by:
playersin interfaceEntityGetter
-
onBlockStateChange
- Overrides:
onBlockStateChangein classLevel
-
getPoiManager
-
isVillage
-
isVillage
-
isCloseToVillage
-
sectionsToVillage
-
getRaids
-
getRaidAt
-
isRaided
-
onReputationEvent
-
saveDebugReport
- Throws:
IOException
-
dumpEntities
- Throws:
IOException
-
dumpBlockEntityTickers
- Throws:
IOException
-
clearBlockEvents
-
blockUpdated
- Specified by:
blockUpdatedin interfaceLevelAccessor
-
getShade
- Specified by:
getShadein interfaceBlockAndTintGetter
-
getAllEntities
-
toString
-
isFlat
public boolean isFlat() -
getSeed
public long getSeed()- Specified by:
getSeedin interfaceWorldGenLevel
-
getDragonFight
-
getLevel
- Specified by:
getLevelin interfaceServerLevelAccessor
-
getWatchdogStats
-
getTypeCount
-
getEntities
- Specified by:
getEntitiesin classLevel
-
addLegacyChunkEntities
-
addWorldGenChunkEntities
-
startTickingChunk
-
onStructureStartsAvailable
-
getPathTypeCache
-
close
- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classLevel- Throws:
IOException
-
gatherChunkSourceStats
- Specified by:
gatherChunkSourceStatsin classLevel
-
areEntitiesLoaded
public boolean areEntitiesLoaded(long chunkPos) -
isPositionTickingWithEntitiesLoaded
private boolean isPositionTickingWithEntitiesLoaded(long chunkPos) -
isPositionEntityTicking
-
isNaturalSpawningAllowed
-
isNaturalSpawningAllowed
-
enabledFeatures
- Specified by:
enabledFeaturesin interfaceLevelReader
-
potionBrewing
- Specified by:
potionBrewingin classLevel
-
getRandomSequence
-
getRandomSequences
-
fillReportDetails
Adds some basic stats of the world to the given crash report.- Overrides:
fillReportDetailsin classLevel
-
getPartEntities
Description copied from interface:ILevelExtensionAll part entities in this world. Used when collecting entities in an AABB to fix parts being ignored whose parent entity is in a chunk that does not intersect with the AABB.- Specified by:
getPartEntitiesin interfaceILevelExtension
-
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. -
setDayTimeFraction
@Internal public void setDayTimeFraction(float dayTimeFraction) - Specified by:
setDayTimeFractionin classLevel
-
getDayTimeFraction
@Internal public float getDayTimeFraction()- Specified by:
getDayTimeFractionin classLevel
-
getDayTimePerTick
public 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).- Specified by:
getDayTimePerTickin classLevel
-
setDayTimePerTick
public void setDayTimePerTick(float dayTimePerTick) This allows mods to set the rate time flows in a level. By default, each game tick the clock time also advances by one tick, withLevel.TICKS_PER_DAYclock ticks (or 20 real-life minutes) forming a Minecraft day.This can be sped up for shorter days by giving a higher number, or slowed down for longer days with a smaller number. A negative value will reset it back to vanilla logic.
This value can also be changed with the command
/neoforge day, where you can set either the speed or a day length in minutes.This has no effect when time progression is stopped.
While this still technically works when vanilla clients are connected, those will desync and experience a time jump once per second.
- Specified by:
setDayTimePerTickin classLevel
-