Package net.minecraft.server.world
Class ServerWorld
java.lang.Object
net.minecraft.world.World
net.minecraft.server.world.ServerWorld
- All Implemented Interfaces:
AutoCloseable,BiomeAccess.Storage,BlockRenderView,BlockView,CollisionView,EntityView,ModifiableTestableWorld,ModifiableWorld,ServerWorldAccess,TestableWorld,WorldAccess,WorldView
public class ServerWorld extends World implements ServerWorldAccess
-
Field Summary
Fields Modifier and Type Field Description private booleanallPlayersSleepingprivate ServerTickScheduler<Block>blockTickSchedulerstatic BlockPosEND_SPAWN_POSprivate EnderDragonFightenderDragonFightprivate Int2ObjectMap<Entity>entitiesByIdprivate Map<UUID,Entity>entitiesByUuidprivate Queue<Entity>entitiesToLoadprivate Set<EntityNavigation>entityNavigationsprivate ServerWorldPropertiesfield_24456private List<Spawner>field_25141private booleanfield_25143private ServerTickScheduler<Fluid>fluidTickSchedulerprivate intidleTimeoutprivate booleaninBlockTick(package private) booleaninEntityTickprivate static LoggerLOGGERprivate List<ServerPlayerEntity>playersprivate PortalForcerportalForcerprotected RaidManagerraidManagerbooleansavingDisabledprivate MinecraftServerserverprivate ServerChunkManagerserverChunkManagerprivate StructureAccessorstructureAccessorprivate ObjectLinkedOpenHashSet<BlockEvent>syncedBlockEventQueueFields inherited from class net.minecraft.world.World
blockEntities, CODEC, END, isClient, iteratingTickingBlockEntities, lcgBlockSeed, NETHER, OVERWORLD, pendingBlockEntities, properties, rainGradient, rainGradientPrev, random, thunderGradient, thunderGradientPrev, tickingBlockEntities, unloadedBlockEntities, unusedIncrement -
Constructor Summary
Constructors Constructor Description ServerWorld(MinecraftServer server, Executor workerExecutor, LevelStorage.Session session, ServerWorldProperties properties, RegistryKey<World> registryKey, RegistryKey<DimensionType> registryKey2, DimensionType dimensionType, WorldGenerationProgressListener generationProgressListener, ChunkGenerator chunkGenerator, boolean bool, long long2, List<Spawner> list, boolean bool2) -
Method Summary
Methods inherited from class net.minecraft.world.World
addBlockEntities, addBlockEntity, addDetailsToCrashReport, addFireworkParticle, addImportantParticle, addImportantParticle, addParticle, addParticle, calculateAmbientDarkness, canSetBlock, close, createExplosion, createExplosion, disconnect, getAmbientDarkness, getBiomeAccess, getBlockEntity, getBlockState, getChunk, getChunk, getCollisionHeightAt, getCollisionHeightAt, getDebugString, getDimension, getDimensionRegistryKey, getEmittedRedstonePower, getEntities, getEntities, getEntities, getEntitiesIncludingUngeneratedChunks, getExistingChunk, getFluidState, getGameRules, getLevelProperties, getLightingProvider, getLocalDifficulty, getProfiler, getProfilerSupplier, getRainGradient, getRandom, getRandomPosInChunk, getReceivedRedstonePower, getReceivedStrongRedstonePower, getRegistryKey, getSeaLevel, getSkyAngleRadians, getThunderGradient, getTime, getTimeOfDay, getTopY, getWorld, getWorldBorder, getWorldChunk, hasHighHumidity, hasRain, initWeatherGradients, isClient, isDay, isDebugWorld, isDirectionSolid, isEmittingRedstonePower, isHeightInvalid, isHeightInvalid, isNight, isRaining, isReceivingRedstonePower, isThundering, isTopSolid, markDirty, method_24794, method_25953, method_26096, method_30093, playSound, playSound, removeBlock, removeBlockEntity, scheduleBlockRerenderIfNeeded, sendPacket, setBlockEntity, setBlockState, setBlockState, setBlockState, setLightningTicksLeft, setMobSpawnOptions, setRainGradient, setThunderGradient, testBlockState, tickBlockEntities, tickEntity, updateComparators, updateNeighbor, updateNeighborsAlways, updateNeighborsExceptMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.BlockRenderView
getBaseLightLevel, getLightingProvider, getLightLevel, isSkyVisibleMethods inherited from interface net.minecraft.world.BlockView
getBlockEntity, getBlockState, getFluidState, getHeight, getLuminance, getMaxLightLevel, method_29546, rayTrace, rayTraceBlockMethods inherited from interface net.minecraft.world.CollisionView
canPlace, doesNotCollide, doesNotCollide, doesNotCollide, doesNotCollide, getBlockCollisions, getCollisions, getWorldBorder, intersectsEntities, method_30030Methods inherited from interface net.minecraft.world.EntityView
getClosestEntity, getClosestEntity, getClosestEntityIncludingUngeneratedChunks, getClosestPlayer, getClosestPlayer, getClosestPlayer, getClosestPlayer, getClosestPlayer, getClosestPlayer, getEntities, getEntities, getEntities, getEntitiesIncludingUngeneratedChunks, getEntitiesIncludingUngeneratedChunks, getNonSpectatingEntities, getPlayerByUuid, getPlayers, getTargets, isPlayerInRangeMethods inherited from interface net.minecraft.world.ModifiableWorld
breakBlock, breakBlock, method_30093, removeBlock, setBlockState, setBlockStateMethods inherited from interface net.minecraft.world.WorldAccess
addParticle, getDifficulty, getDimensionHeight, getEntityCollisions, getLevelProperties, getLocalDifficulty, getMoonPhase, getMoonSize, getRandom, getSkyAngle, getTopPosition, getWorld, intersectsEntities, isChunkLoaded, playSound, syncWorldEventMethods inherited from interface net.minecraft.world.WorldView
containsFluid, getAmbientDarkness, getBiome, getBiomeAccess, getBiomeForNoiseGen, getBrightness, getChunk, getChunk, getChunk, getChunk, getColor, getDimension, getExistingChunk, getLightLevel, getLightLevel, getSeaLevel, getStrongRedstonePower, getTopY, isAir, isChunkLoaded, isClient, isRegionLoaded, isRegionLoaded, isSkyVisibleAllowingSea, isWater, method_29556
-
Field Details
-
END_SPAWN_POS
-
LOGGER
-
entitiesById
-
entitiesByUuid
-
entitiesToLoad
-
players
-
serverChunkManager
-
inEntityTick
boolean inEntityTick -
server
-
field_24456
-
savingDisabled
public boolean savingDisabled -
allPlayersSleeping
private boolean allPlayersSleeping -
idleTimeout
private int idleTimeout -
portalForcer
-
blockTickScheduler
-
fluidTickScheduler
-
entityNavigations
-
raidManager
-
syncedBlockEventQueue
-
inBlockTick
private boolean inBlockTick -
field_25141
-
enderDragonFight
-
structureAccessor
-
field_25143
private final boolean field_25143
-
-
Constructor Details
-
ServerWorld
public ServerWorld(MinecraftServer server, Executor workerExecutor, LevelStorage.Session session, ServerWorldProperties properties, RegistryKey<World> registryKey, RegistryKey<DimensionType> registryKey2, DimensionType dimensionType, WorldGenerationProgressListener generationProgressListener, ChunkGenerator chunkGenerator, boolean bool, long long2, List<Spawner> list, boolean bool2)
-
-
Method Details
-
method_27910
public void method_27910(int int2, int int3, boolean bool, boolean bool2) -
getGeneratorStoredBiome
- Specified by:
getGeneratorStoredBiomein interfaceWorldView
-
getStructureAccessor
-
tick
-
tickTime
protected void tickTime() -
method_29199
public void method_29199(long long2) -
method_29202
public void method_29202(boolean bool, boolean bool2) -
wakeSleepingPlayers
private void wakeSleepingPlayers() -
tickChunk
-
getSurface
-
isInBlockTick
public boolean isInBlockTick() -
updateSleepingPlayers
public void updateSleepingPlayers() -
getScoreboard
- Specified by:
getScoreboardin classWorld
-
resetWeather
private void resetWeather() -
resetIdleTimeout
public void resetIdleTimeout() -
tickFluid
-
tickBlock
-
tickEntity
-
tickPassenger
-
checkChunk
-
canPlayerModifyAt
- Overrides:
canPlayerModifyAtin classWorld
-
save
-
saveLevel
private void saveLevel() -
getEntities
-
getAliveEnderDragons
-
getPlayers
-
getRandomAlivePlayer
-
spawnEntity
- Specified by:
spawnEntityin interfaceModifiableWorld
-
tryLoadEntity
-
onDimensionChanged
-
onPlayerTeleport
-
onPlayerChangeDimension
-
onPlayerConnected
-
onPlayerRespawned
-
addPlayer
-
addEntity
-
loadEntity
-
checkUuid
-
unloadEntities
-
unloadEntity
-
loadEntityUnchecked
-
removeEntity
-
removeEntityFromChunk
-
removePlayer
-
setBlockBreakingInfo
- Specified by:
setBlockBreakingInfoin classWorld
-
playSound
public void playSound(@Nullable PlayerEntity player, double x, double y, double z, SoundEvent sound, SoundCategory category, float volume, float pitch) -
playSoundFromEntity
public void playSoundFromEntity(@Nullable PlayerEntity player, Entity entity, SoundEvent sound, SoundCategory category, float volume, float pitch)- Specified by:
playSoundFromEntityin classWorld
-
syncGlobalEvent
- Overrides:
syncGlobalEventin classWorld
-
syncWorldEvent
- Specified by:
syncWorldEventin interfaceWorldAccess
-
updateListeners
- Specified by:
updateListenersin classWorld
-
sendEntityStatus
- Overrides:
sendEntityStatusin classWorld
-
getChunkManager
- Specified by:
getChunkManagerin interfaceWorldAccess
-
createExplosion
public Explosion createExplosion(@Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionBehavior explosionBehavior, double double2, double double3, double double4, float float2, boolean bool, Explosion.DestructionType destructionType)- Overrides:
createExplosionin classWorld
-
addSyncedBlockEvent
- Overrides:
addSyncedBlockEventin classWorld
-
processSyncedBlockEvents
private void processSyncedBlockEvents() -
processBlockEvent
-
getBlockTickScheduler
- Specified by:
getBlockTickSchedulerin interfaceWorldAccess
-
getFluidTickScheduler
- Specified by:
getFluidTickSchedulerin interfaceWorldAccess
-
getServer
-
getPortalForcer
-
getStructureManager
-
spawnParticles
public <T extends ParticleEffect> int spawnParticles(T particle, double x, double y, double z, int count, double deltaX, double deltaY, double deltaZ, double speed) -
spawnParticles
public <T extends ParticleEffect> boolean spawnParticles(ServerPlayerEntity viewer, T particle, boolean force, double x, double y, double z, int count, double deltaX, double deltaY, double deltaZ, double speed) -
sendToPlayerIfNearby
private boolean sendToPlayerIfNearby(ServerPlayerEntity player, boolean force, double x, double y, double z, Packet<?> packet) -
getEntityById
- Specified by:
getEntityByIdin classWorld
-
getEntity
-
locateStructure
@Nullable public BlockPos locateStructure(StructureFeature<?> feature, BlockPos pos, int radius, boolean skipExistingChunks) -
locateBiome
-
getRecipeManager
- Specified by:
getRecipeManagerin classWorld
-
getTagManager
- Specified by:
getTagManagerin classWorld
-
isSavingDisabled
public boolean isSavingDisabled()- Overrides:
isSavingDisabledin classWorld
-
getPersistentStateManager
-
getMapState
- Specified by:
getMapStatein classWorld
-
putMapState
- Specified by:
putMapStatein classWorld
-
getNextMapId
public int getNextMapId()- Specified by:
getNextMapIdin classWorld
-
setSpawnPos
-
getSpawnPos
-
getForcedChunks
-
setChunkForced
public boolean setChunkForced(int x, int z, boolean forced) -
getPlayers
- Specified by:
getPlayersin interfaceEntityView
-
onBlockChanged
- Overrides:
onBlockChangedin classWorld
-
getPointOfInterestStorage
-
isNearOccupiedPointOfInterest
-
isNearOccupiedPointOfInterest
-
isNearOccupiedPointOfInterest
-
getOccupiedPointOfInterestDistance
-
getRaidManager
-
getRaidAt
-
hasRaidAt
-
handleInteraction
public void handleInteraction(EntityInteraction interaction, Entity entity, InteractionObserver observer) -
dump
- Throws:
IOException
-
dumpEntities
-
dumpBlockEntities
- Throws:
IOException
-
clearUpdatesInArea
-
updateNeighbors
- Specified by:
updateNeighborsin interfaceWorldAccess
-
getBrightness
- Specified by:
getBrightnessin interfaceBlockRenderView
-
iterateEntities
-
toString
-
isFlat
public boolean isFlat() -
getSeed
public long getSeed()- Specified by:
getSeedin interfaceServerWorldAccess
-
getEnderDragonFight
-
createEndSpawnPlatform
-