net.minecraft.world

## Class WorldServer

- java.lang.Object
- - net.minecraft.world.World
  - - net.minecraft.world.WorldServer

- All Implemented Interfaces:
    IBlockAccess
  Direct Known Subclasses:
    DemoWorldServer, WorldServerMulti

      public class WorldServer
      extends World

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static WeightedRandomChestContent[]` | `bonusChestContent`
    `java.util.List<Teleporter>` | `customTeleporters`
    `protected java.util.Set<ChunkCoordIntPair>` | `doneChunks` Stores the recently processed (lighting) chunks
    `boolean` | `levelSaving`
    `ChunkProviderServer` | `theChunkProviderServer`

    - ### Fields inherited from class net.minecraft.world.World

      `activeChunkSet, chunkProvider, difficultySetting, DIST_HASH_MAGIC, findingSpawnPoint, isRemote, lastLightningBolt, loadedEntityList, loadedTileEntityList, mapStorage, MAX_ENTITY_RADIUS, perWorldStorage, playerEntities, prevRainingStrength, prevThunderingStrength, provider, rainingStrength, rand, saveHandler, scheduledUpdatesAreImmediate, skylightSubtracted, spawnHostileMobs, spawnPeacefulMobs, theProfiler, thunderingStrength, unloadedEntityList, updateLCG, villageCollectionObj, villageSiegeObj, weatherEffects, worldAccesses, worldInfo, worldScoreboard`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WorldServer(MinecraftServer p_i45284_1_, ISaveHandler p_i45284_2_, java.lang.String p_i45284_3_, int p_i45284_4_, WorldSettings p_i45284_5_, Profiler p_i45284_6_)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addBlockEvent(int p_147452_1_, int p_147452_2_, int p_147452_3_, Block p_147452_4_, int p_147452_5_, int p_147452_6_)`
    `boolean` | `addWeatherEffect(Entity par1Entity)`
    `boolean` | `areAllPlayersAsleep()`
    `boolean` | `canMineBlock(EntityPlayer par1EntityPlayer, int par2, int par3, int par4)`
    `boolean` | `canMineBlockBody(EntityPlayer par1EntityPlayer, int par2, int par3, int par4)`
    `protected void` | `createBonusChest()`
    `protected IChunkProvider` | `createChunkProvider()`
    `protected void` | `createSpawnPosition(WorldSettings par1WorldSettings)`
    `void` | `flush()`
    `void` | `func_147446_b(int p_147446_1_, int p_147446_2_, int p_147446_3_, Block p_147446_4_, int p_147446_5_, int p_147446_6_)`
    `protected void` | `func_147456_g()`
    `java.util.List` | `func_147486_a(int p_147486_1_, int p_147486_2_, int p_147486_3_, int p_147486_4_, int p_147486_5_, int p_147486_6_)`
    `void` | `func_147487_a(java.lang.String p_147487_1_, double p_147487_2_, double p_147487_4_, double p_147487_6_, int p_147487_8_, double p_147487_9_, double p_147487_11_, double p_147487_13_, double p_147487_15_)`
    `MinecraftServer` | `func_73046_m()`
    `java.io.File` | `getChunkSaveLocation()`
    `Teleporter` | `getDefaultTeleporter()`
    `Entity` | `getEntityByID(int par1)`
    `EntityTracker` | `getEntityTracker()`
    `ChunkCoordinates` | `getEntrancePortalLocation()`
    `java.util.List` | `getPendingBlockUpdates(Chunk par1Chunk, boolean par2)`
    `PlayerManager` | `getPlayerManager()`
    `protected void` | `initialize(WorldSettings par1WorldSettings)`
    `boolean` | `isBlockTickScheduledThisTick(int p_147477_1_, int p_147477_2_, int p_147477_3_, Block p_147477_4_)`
    `Explosion` | `newExplosion(Entity par1Entity, double par2, double par4, double par6, float par8, boolean par9, boolean par10)`
    `void` | `onEntityAdded(Entity par1Entity)`
    `void` | `onEntityRemoved(Entity par1Entity)`
    `void` | `resetUpdateEntityTick()`
    `void` | `saveAllChunks(boolean par1, IProgressUpdate par2IProgressUpdate)`
    `void` | `saveChunkData()`
    `protected void` | `saveLevel()`
    `void` | `scheduleBlockUpdate(int p_147464_1_, int p_147464_2_, int p_147464_3_, Block p_147464_4_, int p_147464_5_)`
    `void` | `scheduleBlockUpdateWithPriority(int p_147454_1_, int p_147454_2_, int p_147454_3_, Block p_147454_4_, int p_147454_5_, int p_147454_6_)`
    `void` | `setEntityState(Entity par1Entity, byte par2)`
    `void` | `setSpawnLocation()`
    `BiomeGenBase.SpawnListEntry` | `spawnRandomCreature(EnumCreatureType par1EnumCreatureType, int par2, int par3, int par4)`
    `void` | `tick()`
    `boolean` | `tickUpdates(boolean par1)`
    `void` | `updateAllPlayersSleepingFlag()`
    `void` | `updateEntities()`
    `void` | `updateEntityWithOptionalForce(Entity par1Entity, boolean par2)`
    `protected void` | `updateWeather()`
    `protected void` | `wakeAllPlayers()`

    - ### Methods inherited from class net.minecraft.world.World

      `addLoadedEntities, addTileEntity, addWorldAccess, addWorldInfoToCrashReport, blockExists, calculateInitialSkylight, calculateInitialWeatherBody, calculateSkylightSubtracted, canBlockFreeze, canBlockFreezeBody, canBlockSeeTheSky, canLightningStrikeAt, canPlaceEntityOnSide, canSnowAtBody, checkBlockCollision, checkChunksExist, checkNoEntityCollision, checkNoEntityCollision, checkSessionLock, chunkExists, countEntities, countEntities, createExplosion, destroyBlockInWorldPartially, doChunksNearChunkExist, doesBlockHaveSolidTopSurface, drawCloudsBody, extendedLevelsInChunkCache, extinguishFire, findClosestStructure, findNearestEntityWithinAABB, finishSetup, func_147447_a, func_147448_a, func_147450_X, func_147451_t, func_147453_f, func_147457_a, func_147461_a, func_147462_b, func_147467_a, func_147469_q, func_147470_e, func_147473_B, func_147478_e, func_147479_m, func_147480_a, func_82738_a, getActualHeight, getBiomeGenForCoords, getBiomeGenForCoordsBody, getBlock, getBlockDensity, getBlockLightOpacity, getBlockLightValue_do, getBlockLightValue, getBlockMetadata, getBlockPowerInput, getCelestialAngle, getCelestialAngleRadians, getChunkFromBlockCoords, getChunkFromChunkCoords, getChunkHeightMapMinimum, getChunkProvider, getClosestPlayer, getClosestPlayerToEntity, getClosestVulnerablePlayer, getClosestVulnerablePlayerToEntity, getCloudColour, getCollidingBoundingBoxes, getCurrentDate, getCurrentMoonPhaseFactor, getDebugLoadedEntities, getEntitiesWithinAABB, getEntitiesWithinAABBExcludingEntity, getEntitiesWithinAABBExcludingEntity, getEntityPathToXYZ, getFogColor, getFullBlockLightValue, getGameRules, getHeight, getHeightValue, getHorizon, getIndirectPowerLevelTo, getIndirectPowerOutput, getLightBrightness, getLightBrightnessForSkyBlocks, getLoadedEntityList, getMoonPhase, getPathEntityToEntity, getPersistentChunks, getPlayerEntityByName, getPrecipitationHeight, getProviderName, getRainStrength, getSavedLightValue, getSaveHandler, getScoreboard, getSeed, getSkyBlockTypeBrightness, getSkyColor, getSkyColorBody, getSpawnPoint, getStarBrightness, getStarBrightnessBody, getStrongestIndirectPower, getSunBrightness, getTileEntity, getTopBlock, getTopSolidOrLiquidBlock, getTotalWorldTime, getUniqueDataId, getWeightedThunderStrength, getWorldChunkManager, getWorldInfo, getWorldTime, getWorldVec3Pool, handleMaterialAcceleration, isAABBInMaterial, isAirBlock, isAnyLiquid, isBlockFreezable, isBlockFreezableNaturally, isBlockHighHumidity, isBlockIndirectlyGettingPowered, isBlockNormalCubeDefault, isBlockProvidingPowerTo, isDaytime, isMaterialInBB, isRaining, isSideSolid, isSideSolid, isThundering, joinEntityInSurroundings, loadItemData, makeFireworks, markBlockForUpdate, markBlockRangeForRenderUpdate, markBlocksDirtyVertical, markTileEntityChunkModified, notifyBlockChange, notifyBlockOfNeighborChange, notifyBlocksOfNeighborChange, notifyBlocksOfNeighborChange, playAuxSFX, playAuxSFXAtEntity, playBroadcastSound, playRecord, playSound, playSoundAtEntity, playSoundEffect, playSoundToNearExcept, rayTraceBlocks, rayTraceBlocks, removeEntity, removePlayerEntityDangerously, removeTileEntity, removeWorldAccess, selectEntitiesWithinAABB, sendQuittingDisconnectingPacket, setActivePlayerChunksAndCheckLight, setAllowedSpawnTypes, setBlock, setBlock, setBlockMetadataWithNotify, setBlockToAir, setItemData, setLightValue, setRainStrength, setRandomSeed, setSpawnLocation, setThunderStrength, setTileEntity, setWorldTime, spawnEntityInWorld, spawnParticle, unloadEntities, updateEntity, updateLightByType, updateWeatherBody`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### theChunkProviderServer

          public ChunkProviderServer theChunkProviderServer

    - #### levelSaving

          public boolean levelSaving

    - #### bonusChestContent

          public static final WeightedRandomChestContent[] bonusChestContent

    - #### doneChunks

          protected java.util.Set<ChunkCoordIntPair> doneChunks

      Stores the recently processed (lighting) chunks

    - #### customTeleporters

          public java.util.List<Teleporter> customTeleporters

  - ### Constructor Detail

    - #### WorldServer

          public WorldServer(MinecraftServer p_i45284_1_,
                     ISaveHandler p_i45284_2_,
                     java.lang.String p_i45284_3_,
                     int p_i45284_4_,
                     WorldSettings p_i45284_5_,
                     Profiler p_i45284_6_)

  - ### Method Detail

    - #### tick

          public void tick()

      Overrides:
        `tick` in class `World`

    - #### spawnRandomCreature

          public BiomeGenBase.SpawnListEntry spawnRandomCreature(EnumCreatureType par1EnumCreatureType,
                                                        int par2,
                                                        int par3,
                                                        int par4)

    - #### updateAllPlayersSleepingFlag

          public void updateAllPlayersSleepingFlag()

      Overrides:
        `updateAllPlayersSleepingFlag` in class `World`

    - #### wakeAllPlayers

          protected void wakeAllPlayers()

    - #### areAllPlayersAsleep

          public boolean areAllPlayersAsleep()

    - #### setSpawnLocation

          public void setSpawnLocation()

      Overrides:
        `setSpawnLocation` in class `World`

    - #### func_147456_g

          protected void func_147456_g()

      Overrides:
        `func_147456_g` in class `World`

    - #### isBlockTickScheduledThisTick

          public boolean isBlockTickScheduledThisTick(int p_147477_1_,
                                             int p_147477_2_,
                                             int p_147477_3_,
                                             Block p_147477_4_)

      Overrides:
        `isBlockTickScheduledThisTick` in class `World`

    - #### scheduleBlockUpdate

          public void scheduleBlockUpdate(int p_147464_1_,
                                 int p_147464_2_,
                                 int p_147464_3_,
                                 Block p_147464_4_,
                                 int p_147464_5_)

      Overrides:
        `scheduleBlockUpdate` in class `World`

    - #### scheduleBlockUpdateWithPriority

          public void scheduleBlockUpdateWithPriority(int p_147454_1_,
                                             int p_147454_2_,
                                             int p_147454_3_,
                                             Block p_147454_4_,
                                             int p_147454_5_,
                                             int p_147454_6_)

      Overrides:
        `scheduleBlockUpdateWithPriority` in class `World`

    - #### func_147446_b

          public void func_147446_b(int p_147446_1_,
                           int p_147446_2_,
                           int p_147446_3_,
                           Block p_147446_4_,
                           int p_147446_5_,
                           int p_147446_6_)

      Overrides:
        `func_147446_b` in class `World`

    - #### updateEntities

          public void updateEntities()

      Overrides:
        `updateEntities` in class `World`

    - #### resetUpdateEntityTick

          public void resetUpdateEntityTick()

    - #### tickUpdates

          public boolean tickUpdates(boolean par1)

      Overrides:
        `tickUpdates` in class `World`

    - #### getPendingBlockUpdates

          public java.util.List getPendingBlockUpdates(Chunk par1Chunk,
                                              boolean par2)

      Overrides:
        `getPendingBlockUpdates` in class `World`

    - #### updateEntityWithOptionalForce

          public void updateEntityWithOptionalForce(Entity par1Entity,
                                           boolean par2)

      Overrides:
        `updateEntityWithOptionalForce` in class `World`

    - #### createChunkProvider

          protected IChunkProvider createChunkProvider()

      Specified by:
        `createChunkProvider` in class `World`

    - #### func_147486_a

          public java.util.List func_147486_a(int p_147486_1_,
                                     int p_147486_2_,
                                     int p_147486_3_,
                                     int p_147486_4_,
                                     int p_147486_5_,
                                     int p_147486_6_)

    - #### canMineBlock

          public boolean canMineBlock(EntityPlayer par1EntityPlayer,
                             int par2,
                             int par3,
                             int par4)

      Overrides:
        `canMineBlock` in class `World`

    - #### canMineBlockBody

          public boolean canMineBlockBody(EntityPlayer par1EntityPlayer,
                                 int par2,
                                 int par3,
                                 int par4)

      Overrides:
        `canMineBlockBody` in class `World`

    - #### initialize

          protected void initialize(WorldSettings par1WorldSettings)

      Overrides:
        `initialize` in class `World`

    - #### createSpawnPosition

          protected void createSpawnPosition(WorldSettings par1WorldSettings)

    - #### createBonusChest

          protected void createBonusChest()

    - #### getEntrancePortalLocation

          public ChunkCoordinates getEntrancePortalLocation()

    - #### saveAllChunks

          public void saveAllChunks(boolean par1,
                           IProgressUpdate par2IProgressUpdate)
                             throws MinecraftException

      Throws:
        `MinecraftException`

    - #### saveChunkData

          public void saveChunkData()

    - #### saveLevel

          protected void saveLevel()
                            throws MinecraftException

      Throws:
        `MinecraftException`

    - #### onEntityAdded

          public void onEntityAdded(Entity par1Entity)

      Overrides:
        `onEntityAdded` in class `World`

    - #### onEntityRemoved

          public void onEntityRemoved(Entity par1Entity)

      Overrides:
        `onEntityRemoved` in class `World`

    - #### getEntityByID

          public Entity getEntityByID(int par1)

      Specified by:
        `getEntityByID` in class `World`

    - #### addWeatherEffect

          public boolean addWeatherEffect(Entity par1Entity)

      Overrides:
        `addWeatherEffect` in class `World`

    - #### setEntityState

          public void setEntityState(Entity par1Entity,
                            byte par2)

      Overrides:
        `setEntityState` in class `World`

    - #### newExplosion

          public Explosion newExplosion(Entity par1Entity,
                               double par2,
                               double par4,
                               double par6,
                               float par8,
                               boolean par9,
                               boolean par10)

      Overrides:
        `newExplosion` in class `World`

    - #### addBlockEvent

          public void addBlockEvent(int p_147452_1_,
                           int p_147452_2_,
                           int p_147452_3_,
                           Block p_147452_4_,
                           int p_147452_5_,
                           int p_147452_6_)

      Overrides:
        `addBlockEvent` in class `World`

    - #### flush

          public void flush()

    - #### updateWeather

          protected void updateWeather()

      Overrides:
        `updateWeather` in class `World`

    - #### func_73046_m

          public MinecraftServer func_73046_m()

    - #### getEntityTracker

          public EntityTracker getEntityTracker()

    - #### getPlayerManager

          public PlayerManager getPlayerManager()

    - #### getDefaultTeleporter

          public Teleporter getDefaultTeleporter()

    - #### func_147487_a

          public void func_147487_a(java.lang.String p_147487_1_,
                           double p_147487_2_,
                           double p_147487_4_,
                           double p_147487_6_,
                           int p_147487_8_,
                           double p_147487_9_,
                           double p_147487_11_,
                           double p_147487_13_,
                           double p_147487_15_)

    - #### getChunkSaveLocation

          public java.io.File getChunkSaveLocation()