public class ServerWorld extends World implements IForgeWorldServer
| Modifier and Type | Field and Description |
|---|---|
boolean |
disableLevelSaving |
protected java.util.Set<ChunkPos> |
doneChunks
Stores the recently processed (lighting) chunks
|
protected RaidManager |
raids |
addedTileEntityList, captureBlockSnapshots, capturedBlockSnapshots, chunkProvider, dimension, DIST_HASH_MAGIC, isRemote, loadedTileEntityList, prevRainingStrength, prevThunderingStrength, processingLoadedTiles, rainingStrength, rand, restoringBlockSnapshots, thunderingStrength, tickableTileEntities, tileEntitiesToBeRemoved, updateLCG, worldInfo| Constructor and Description |
|---|
ServerWorld(MinecraftServer serverIn,
java.util.concurrent.Executor p_i50703_2_,
SaveHandler p_i50703_3_,
WorldInfo p_i50703_4_,
DimensionType dimType,
IProfiler p_i50703_6_,
IChunkStatusListener p_i50703_7_) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBlockEvent(BlockPos pos,
Block blockIn,
int eventID,
int eventParam) |
boolean |
addEntity(Entity entityIn) |
boolean |
addEntityIfNotDuplicate(Entity entityIn) |
void |
addLightningBolt(LightningBoltEntity entityIn) |
void |
addNewPlayer(ServerPlayerEntity player) |
void |
addRespawnedPlayer(ServerPlayerEntity player) |
protected BlockPos |
adjustPosToNearbyEntity(BlockPos pos) |
boolean |
canMineBlockBody(PlayerEntity player,
BlockPos pos) |
void |
checkSessionLock() |
void |
chunkCheck(Entity entityIn) |
it.unimi.dsi.fastutil.objects.Object2IntMap<EntityClassification> |
countEntities() |
protected void |
createBonusChest() |
Explosion |
createExplosion(Entity entityIn,
DamageSource damageSourceIn,
double xIn,
double yIn,
double zIn,
float explosionRadius,
boolean causesFire,
Explosion.Mode modeIn) |
void |
createSpawnPosition(WorldSettings settings) |
BlockPos |
findNearestStructure(java.lang.String name,
BlockPos pos,
int radius,
boolean p_211157_4_) |
Raid |
findRaid(BlockPos pos) |
boolean |
forceChunk(int chunkX,
int chunkZ,
boolean add) |
void |
func_217446_a(ServerPlayerEntity p_217446_1_) |
void |
func_217447_b(ServerPlayerEntity p_217447_1_) |
void |
func_217459_a(Entity p_217459_1_,
Entity p_217459_2_) |
void |
func_217460_e(Entity p_217460_1_) |
boolean |
func_217471_a(BlockPos p_217471_1_,
int p_217471_2_) |
boolean |
func_217483_b_(BlockPos p_217483_1_) |
int |
func_217486_a(SectionPos p_217486_1_) |
boolean |
func_222887_a(SectionPos p_222887_1_) |
void |
func_229854_a_(MutableBoundingBox p_229854_1_) |
ServerChunkProvider |
getChunkProvider() |
Teleporter |
getDefaultTeleporter() |
java.util.List<EnderDragonEntity> |
getDragons() |
java.util.stream.Stream<Entity> |
getEntities() |
java.util.List<Entity> |
getEntities(EntityType<?> p_217482_1_,
java.util.function.Predicate<? super Entity> p_217482_2_) |
Entity |
getEntityByID(int id) |
Entity |
getEntityByUuid(java.util.UUID p_217461_1_) |
it.unimi.dsi.fastutil.longs.LongSet |
getForcedChunks() |
MapData |
getMapData(java.lang.String mapName) |
int |
getNextMapId() |
Biome |
getNoiseBiomeRaw(int x,
int y,
int z) |
ServerTickList<Block> |
getPendingBlockTicks() |
ServerTickList<Fluid> |
getPendingFluidTicks() |
java.util.List<ServerPlayerEntity> |
getPlayers() |
java.util.List<ServerPlayerEntity> |
getPlayers(java.util.function.Predicate<? super ServerPlayerEntity> p_217490_1_) |
PointOfInterestManager |
getPointOfInterestManager() |
RaidManager |
getRaids() |
ServerPlayerEntity |
getRandomPlayer() |
RecipeManager |
getRecipeManager() |
DimensionSavedDataManager |
getSavedData() |
SaveHandler |
getSaveHandler() |
ServerScoreboard |
getScoreboard() |
MinecraftServer |
getServer() |
BlockPos |
getSpawnCoordinate() |
TemplateManager |
getStructureTemplateManager() |
NetworkTagManager |
getTags() |
boolean |
hasRaid(BlockPos pos) |
protected void |
initCapabilities() |
boolean |
isBlockModifiable(PlayerEntity player,
BlockPos pos) |
boolean |
isInsideTick() |
boolean |
isSaveDisabled() |
void |
notifyBlockUpdate(BlockPos pos,
BlockState oldState,
BlockState newState,
int flags) |
void |
onBlockStateChange(BlockPos p_217393_1_,
BlockState p_217393_2_,
BlockState p_217393_3_) |
void |
onChunkUnloading(Chunk chunkIn) |
void |
onEntityRemoved(Entity entityIn)
Deprecated.
|
void |
playBroadcastSound(int id,
BlockPos pos,
int data) |
void |
playEvent(PlayerEntity player,
int type,
BlockPos pos,
int data) |
void |
playMovingSound(PlayerEntity playerIn,
Entity entityIn,
SoundEvent eventIn,
SoundCategory categoryIn,
float volume,
float pitch) |
void |
playSound(PlayerEntity player,
double x,
double y,
double z,
SoundEvent soundIn,
SoundCategory category,
float volume,
float pitch) |
void |
registerMapData(MapData mapDataIn) |
void |
removeEntity(Entity entityIn) |
void |
removeEntity(Entity entityIn,
boolean keepData) |
void |
removeEntityComplete(Entity entityIn,
boolean keepData) |
void |
removePlayer(ServerPlayerEntity player) |
void |
removePlayer(ServerPlayerEntity player,
boolean keepData) |
void |
resetUpdateEntityTick() |
void |
save(IProgressUpdate progress,
boolean flush,
boolean skipSave) |
protected void |
saveLevel() |
void |
sendBlockBreakProgress(int breakerId,
BlockPos pos,
int progress) |
void |
setEntityState(Entity entityIn,
byte state) |
void |
setGameTime(long worldTime) |
void |
setInitialSpawnLocation() |
void |
setSpawnPoint(BlockPos pos) |
<T extends IParticleData> |
spawnParticle(ServerPlayerEntity player,
T type,
boolean longDistance,
double posX,
double posY,
double posZ,
int particleCount,
double xOffset,
double yOffset,
double zOffset,
double speed) |
<T extends IParticleData> |
spawnParticle(T type,
double posX,
double posY,
double posZ,
int particleCount,
double xOffset,
double yOffset,
double zOffset,
double speed) |
boolean |
summonEntity(Entity entityIn) |
void |
tick(java.util.function.BooleanSupplier hasTimeLeft) |
void |
tickEnvironment(Chunk chunkIn,
int randomTickSpeed) |
void |
updateAllPlayersSleepingFlag() |
void |
updateEntity(Entity entityIn) |
void |
updateReputation(IReputationType type,
Entity target,
IReputationTracking host) |
void |
writeDebugInfo(java.nio.file.Path p_225322_1_) |
addOptionalParticle, addOptionalParticle, addParticle, addParticle, addTileEntities, addTileEntity, advanceTime, calculateInitialSkylight, calculateInitialWeather, calculateInitialWeatherBody, checkBlockCollision, close, createExplosion, createExplosion, extinguishFire, fillCrashReport, findBlockstateInArea, func_225316_b, func_225521_a_, getActualHeight, getBiomeManager, getBlockRandomPos, getBlockReader, getBlockState, getCelestialAngleRadians, getChunk, getChunk, getChunkAt, getDayTime, getDifficultyForLocation, getDimension, getEntitiesInAABBexcluding, getEntitiesWithinAABB, getEntitiesWithinAABB, getFluidState, getGameRules, getGameTime, getGroundAboveSeaLevel, getHeight, getLightManager, getMaxEntityRadius, getProfiler, getProviderName, getRainStrength, getRandom, getRedstonePower, getRedstonePowerFromNeighbors, getSeaLevel, getSeed, getSkylightSubtracted, getSpawnPoint, getStrongPower, getThunderStrength, getTileEntity, getWorld, getWorldBorder, getWorldInfo, getWorldType, guardEntityTick, hasBlockState, increaseMaxEntityRadius, isBlockinHighHumidity, isBlockPowered, isBlockPresent, isDaytime, isFlammableWithin, isMaterialInBB, isNightTime, isOutsideBuildHeight, isRaining, isRainingAt, isRemote, isSidePowered, isThundering, isTopSolid, isValid, isYOutOfBounds, makeFireworks, markAndNotifyBlock, markBlockRangeForRenderUpdate, markChunkDirty, neighborChanged, notifyNeighbors, notifyNeighborsOfStateChange, notifyNeighborsOfStateExcept, playSound, playSound, removeBlock, removeTileEntity, sendPacketToServer, sendQuittingDisconnectingPacket, setAllowedSpawnTypes, setBlockState, setBlockState, setDayTime, setRainStrength, setThunderStrength, setTileEntity, setTimeLightningFlash, tickBlockEntities, updateComparatorOutputLevelareCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCapsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetWorldServergetMaxEntityRadius, increaseMaxEntityRadiusgetCapability, getCapabilitycheckNoEntityCollision, chunkExists, getCelestialAngle, getCurrentMoonPhaseFactor, getDifficulty, getEmptyCollisionShapes, getHeight, getMoonPhase, playEventfunc_225317_b, func_225318_b, getClosestEntity, getClosestEntityWithinAABB, getClosestPlayer, getClosestPlayer, getClosestPlayer, getClosestPlayer, getClosestPlayer, getClosestPlayer, getClosestPlayer, getEntitiesWithinAABB, getEntitiesWithinAABBExcludingEntity, getPlayerByUuid, getTargettableEntitiesWithinAABB, getTargettablePlayersWithinAABB, isPlayerWithincanBlockSeeSky, containsAnyLiquid, getBiome, getBlockColor, getBrightness, getChunk, getChunk, getLight, getNeighborAwareLightSubtracted, getNoiseBiome, getStrongPower, hasWater, isAirBlock, isAreaLoaded, isAreaLoaded, isAreaLoaded, isBlockLoadedcanSeeSky, getLightFor, getLightSubtractedfunc_226662_a_, func_226663_a_, func_226664_a_, func_226665_a__, func_226666_b_, func_226667_c_, func_226668_i_, func_226669_j_func_217300_a, getHeight, getLightValue, getMaxLightLevel, rayTraceBlocks, rayTraceBlocksgetMaxHeightdestroyBlockpublic boolean disableLevelSaving
protected final RaidManager raids
protected java.util.Set<ChunkPos> doneChunks
public ServerWorld(MinecraftServer serverIn, java.util.concurrent.Executor p_i50703_2_, SaveHandler p_i50703_3_, WorldInfo p_i50703_4_, DimensionType dimType, IProfiler p_i50703_6_, IChunkStatusListener p_i50703_7_)
public Biome getNoiseBiomeRaw(int x, int y, int z)
getNoiseBiomeRaw in interface IWorldReaderpublic void tick(java.util.function.BooleanSupplier hasTimeLeft)
public void tickEnvironment(Chunk chunkIn, int randomTickSpeed)
public boolean isInsideTick()
public void updateAllPlayersSleepingFlag()
public ServerScoreboard getScoreboard()
getScoreboard in class Worldpublic void setInitialSpawnLocation()
setInitialSpawnLocation in class Worldpublic void resetUpdateEntityTick()
public void updateEntity(Entity entityIn)
public void chunkCheck(Entity entityIn)
public boolean isBlockModifiable(PlayerEntity player, BlockPos pos)
isBlockModifiable in class Worldpublic boolean canMineBlockBody(PlayerEntity player, BlockPos pos)
canMineBlockBody in class Worldpublic void createSpawnPosition(WorldSettings settings)
protected void createBonusChest()
@Nullable public BlockPos getSpawnCoordinate()
public void save(@Nullable
IProgressUpdate progress,
boolean flush,
boolean skipSave)
throws SessionLockException
SessionLockExceptionprotected void saveLevel()
throws SessionLockException
SessionLockExceptionpublic java.util.List<Entity> getEntities(@Nullable EntityType<?> p_217482_1_, java.util.function.Predicate<? super Entity> p_217482_2_)
public java.util.List<EnderDragonEntity> getDragons()
public java.util.List<ServerPlayerEntity> getPlayers(java.util.function.Predicate<? super ServerPlayerEntity> p_217490_1_)
@Nullable public ServerPlayerEntity getRandomPlayer()
public it.unimi.dsi.fastutil.objects.Object2IntMap<EntityClassification> countEntities()
public boolean addEntity(Entity entityIn)
addEntity in interface IWorldWriterpublic boolean summonEntity(Entity entityIn)
public void func_217460_e(Entity p_217460_1_)
public void func_217446_a(ServerPlayerEntity p_217446_1_)
public void func_217447_b(ServerPlayerEntity p_217447_1_)
public void addNewPlayer(ServerPlayerEntity player)
public void addRespawnedPlayer(ServerPlayerEntity player)
public boolean addEntityIfNotDuplicate(Entity entityIn)
public void onChunkUnloading(Chunk chunkIn)
@Deprecated public void onEntityRemoved(Entity entityIn)
public void removeEntityComplete(Entity entityIn, boolean keepData)
public void removeEntity(Entity entityIn)
public void removeEntity(Entity entityIn, boolean keepData)
public void removePlayer(ServerPlayerEntity player)
public void removePlayer(ServerPlayerEntity player, boolean keepData)
public void addLightningBolt(LightningBoltEntity entityIn)
public void sendBlockBreakProgress(int breakerId,
BlockPos pos,
int progress)
sendBlockBreakProgress in class Worldpublic void playSound(@Nullable
PlayerEntity player,
double x,
double y,
double z,
SoundEvent soundIn,
SoundCategory category,
float volume,
float pitch)
public void playMovingSound(@Nullable
PlayerEntity playerIn,
Entity entityIn,
SoundEvent eventIn,
SoundCategory categoryIn,
float volume,
float pitch)
playMovingSound in class Worldpublic void playBroadcastSound(int id,
BlockPos pos,
int data)
playBroadcastSound in class Worldpublic void playEvent(@Nullable
PlayerEntity player,
int type,
BlockPos pos,
int data)
public void notifyBlockUpdate(BlockPos pos, BlockState oldState, BlockState newState, int flags)
notifyBlockUpdate in class Worldpublic void setEntityState(Entity entityIn, byte state)
setEntityState in class Worldpublic ServerChunkProvider getChunkProvider()
getChunkProvider in interface IWorldgetChunkProvider in class Worldpublic Explosion createExplosion(@Nullable Entity entityIn, @Nullable DamageSource damageSourceIn, double xIn, double yIn, double zIn, float explosionRadius, boolean causesFire, Explosion.Mode modeIn)
createExplosion in class Worldpublic void addBlockEvent(BlockPos pos, Block blockIn, int eventID, int eventParam)
addBlockEvent in class Worldpublic ServerTickList<Block> getPendingBlockTicks()
getPendingBlockTicks in interface IWorldpublic ServerTickList<Fluid> getPendingFluidTicks()
getPendingFluidTicks in interface IWorld@Nonnull public MinecraftServer getServer()
public Teleporter getDefaultTeleporter()
public TemplateManager getStructureTemplateManager()
public <T extends IParticleData> int spawnParticle(T type, double posX, double posY, double posZ, int particleCount, double xOffset, double yOffset, double zOffset, double speed)
public <T extends IParticleData> boolean spawnParticle(ServerPlayerEntity player, T type, boolean longDistance, double posX, double posY, double posZ, int particleCount, double xOffset, double yOffset, double zOffset, double speed)
@Nullable public Entity getEntityByID(int id)
getEntityByID in class World@Nullable public Entity getEntityByUuid(java.util.UUID p_217461_1_)
@Nullable public BlockPos findNearestStructure(java.lang.String name, BlockPos pos, int radius, boolean p_211157_4_)
public RecipeManager getRecipeManager()
getRecipeManager in class Worldpublic NetworkTagManager getTags()
public void setGameTime(long worldTime)
setGameTime in class Worldpublic boolean isSaveDisabled()
isSaveDisabled in class Worldpublic void checkSessionLock()
throws SessionLockException
SessionLockExceptionpublic SaveHandler getSaveHandler()
public DimensionSavedDataManager getSavedData()
@Nullable public MapData getMapData(java.lang.String mapName)
getMapData in class Worldpublic void registerMapData(MapData mapDataIn)
registerMapData in class Worldpublic int getNextMapId()
getNextMapId in class Worldpublic void setSpawnPoint(BlockPos pos)
setSpawnPoint in class Worldpublic it.unimi.dsi.fastutil.longs.LongSet getForcedChunks()
public boolean forceChunk(int chunkX,
int chunkZ,
boolean add)
public java.util.List<ServerPlayerEntity> getPlayers()
getPlayers in interface IEntityReaderpublic void onBlockStateChange(BlockPos p_217393_1_, BlockState p_217393_2_, BlockState p_217393_3_)
onBlockStateChange in class Worldpublic PointOfInterestManager getPointOfInterestManager()
public boolean func_217483_b_(BlockPos p_217483_1_)
public boolean func_222887_a(SectionPos p_222887_1_)
public boolean func_217471_a(BlockPos p_217471_1_, int p_217471_2_)
public int func_217486_a(SectionPos p_217486_1_)
public RaidManager getRaids()
public boolean hasRaid(BlockPos pos)
public void updateReputation(IReputationType type, Entity target, IReputationTracking host)
public void writeDebugInfo(java.nio.file.Path p_225322_1_)
throws java.io.IOException
java.io.IOExceptionpublic void func_229854_a_(MutableBoundingBox p_229854_1_)
protected void initCapabilities()
public java.util.stream.Stream<Entity> getEntities()