Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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
`static WeightedRandomChestContent[]` | `bonusChestContent`
`boolean` | `canNotSave` set by CommandServerSave{all,Off,On}
`List<Teleporter>` | `customTeleporters`
`ChunkProviderServer` | `theChunkProviderServer`

Fields inherited from class net.minecraft.world.World
`activeChunkSet, difficultySetting, editingBlocks, findingSpawnPoint, isRemote, lastLightningBolt, loadedEntityList, loadedTileEntityList, mapStorage, MAX_ENTITY_RADIUS, perWorldStorage, playerEntities, prevRainingStrength, prevThunderingStrength, provider, rainingStrength, rand, scheduledUpdatesAreImmediate, skylightSubtracted, theProfiler, thunderingStrength, villageCollectionObj, weatherEffects`

Constructor Summary
`WorldServer(MinecraftServer par1MinecraftServer, ISaveHandler par2ISaveHandler, String par3Str, int par4, WorldSettings par5WorldSettings, Profiler par6Profiler)`

Method Summary
`void` | `addBlockEvent(int par1, int par2, int par3, int par4, int par5, int par6)` Adds a block event with the given Args to the blockEventCache.
`boolean` | `addWeatherEffect(Entity par1Entity)` adds a lightning bolt to the list of lightning bolts in this world.
`boolean` | `areAllPlayersAsleep()`
`boolean` | `canMineBlock(EntityPlayer par1EntityPlayer, int par2, int par3, int par4)` Called when checking if a certain block can be mined or not.
`boolean` | `canMineBlockBody(EntityPlayer par1EntityPlayer, int par2, int par3, int par4)`
`void` | `flush()` Syncs all changes to disk and wait for completion.
`void` | `func_82740_a(int par1, int par2, int par3, int par4, int par5, int par6)`
`Teleporter` | `func_85176_s()`
`List` | `getAllTileEntityInBox(int par1, int par2, int par3, int par4, int par5, int par6)` pars: min x,y,z , max x,y,z
`File` | `getChunkSaveLocation()`
`Entity` | `getEntityByID(int par1)` Returns the Entity with the given ID, or null if it doesn't exist in this World.
`EntityTracker` | `getEntityTracker()` Gets the EntityTracker
`ChunkCoordinates` | `getEntrancePortalLocation()` Gets the hard-coded portal location to use when entering this dimension.
`MinecraftServer` | `getMinecraftServer()` Gets the MinecraftServer.
`List` | `getPendingBlockUpdates(Chunk par1Chunk, boolean par2)`
`PlayerManager` | `getPlayerManager()`
`Explosion` | `newExplosion(Entity par1Entity, double par2, double par4, double par6, float par8, boolean par9, boolean par10)` returns a new explosion.
`void` | `releaseEntitySkin(Entity par1Entity)` Decrement the reference counter for this entity's skin image data
`void` | `resetUpdateEntityTick()` Resets the updateEntityTick field to 0
`void` | `saveAllChunks(boolean par1, IProgressUpdate par2IProgressUpdate)` Saves all chunks to disk while updating progress bar.
`void` | `scheduleBlockUpdate(int par1, int par2, int par3, int par4, int par5)` Schedules a tick to a block with a delay (Most commonly the tick rate)
`void` | `scheduleBlockUpdateFromLoad(int par1, int par2, int par3, int par4, int par5)` Schedules a block update from the saved information in a chunk.
`void` | `setEntityState(Entity par1Entity, byte par2)` sends a Packet 38 (Entity Status) to all tracked players of that entity
`void` | `setSpawnLocation()`
`SpawnListEntry` | `spawnRandomCreature(EnumCreatureType par1EnumCreatureType, int par2, int par3, int par4)` only spawns creatures allowed by the chunkProvider
`void` | `tick()` Runs a single tick for the world
`boolean` | `tickUpdates(boolean par1)` Runs through the list of updates to run and ticks them
`void` | `uncheckedUpdateEntity(Entity par1Entity, boolean par2)` direct call to super.updateEntityWithOptionalForce
`void` | `updateAllPlayersSleepingFlag()` Updates the flag that indicates whether or not all players in the world are sleeping.
`void` | `updateEntities()` Updates (and cleans up) entities and tile entities
`void` | `updateEntityWithOptionalForce(Entity par1Entity, boolean par2)` Will update the entity in the world if the chunk the entity is in is currently loaded or its forced to update.

Methods inherited from class net.minecraft.world.World
`addLoadedEntities, addTileEntity, addTileEntity, addWorldAccess, addWorldInfoToCrashReport, blockExists, blockHasTileEntity, calculateInitialSkylight, calculateInitialWeatherBody, calculateSkylightSubtracted, canBlockFreeze, canBlockFreezeBody, canBlockSeeTheSky, canLightningStrikeAt, canPlaceEntityOnSide, canSnowAt, canSnowAtBody, checkChunksExist, checkIfAABBIsClear, checkIfAABBIsClearExcludingEntity, checkSessionLock, countEntities, createExplosion, destroyBlockInWorldPartially, doChunksNearChunkExist, doesBlockHaveSolidTopSurface, drawClouds, drawCloudsBody, extendedLevelsInChunkCache, extinguishFire, findClosestStructure, findNearestEntityWithinAABB, func_72971_b, func_82734_g, func_82735_a, func_82738_a, func_82739_e, func_85173_a, func_85174_u, func_85175_e, func_92088_a, getActualHeight, getAllCollidingBoundingBoxes, getBiomeGenForCoords, getBiomeGenForCoordsBody, getBlockDensity, getBlockId, getBlockLightOpacity, getBlockLightValue_do, getBlockLightValue, getBlockMaterial, getBlockMetadata, getBlockTileEntity, getBrightness, getCelestialAngle, getCelestialAngleRadians, getChunkFromBlockCoords, getChunkFromChunkCoords, getChunkProvider, getClosestPlayer, getClosestPlayerToEntity, getClosestVulnerablePlayer, getClosestVulnerablePlayerToEntity, getCollidingBoundingBoxes, getCurrentDate, getDebugLoadedEntities, getEntitiesWithinAABB, getEntitiesWithinAABBExcludingEntity, getEntityPathToXYZ, getFirstUncoveredBlock, getFogColor, getFullBlockLightValue, getGameRules, getHeight, getHeightValue, getHorizon, getLightBrightness, getLightBrightnessForSkyBlocks, getLoadedEntityList, getMoonPhase, getPathEntityToEntity, getPersistentChunks, getPlayerEntityByName, getPrecipitationHeight, getProviderName, getRainStrength, getSavedLightValue, getSaveHandler, getSeed, getSkyBlockTypeBrightness, getSkyColor, getSkyColorBody, getSpawnPoint, getStarBrightness, getStarBrightnessBody, getTopSolidOrLiquidBlock, getTotalWorldTime, getUniqueDataId, getWeightedThunderStrength, getWorldChunkManager, getWorldInfo, getWorldTime, getWorldVec3Pool, handleMaterialAcceleration, isAABBInMaterial, isAABBNonEmpty, isAirBlock, isAnyLiquid, isBlockFreezable, isBlockFreezableNaturally, isBlockGettingPowered, isBlockHighHumidity, isBlockIndirectlyGettingPowered, isBlockIndirectlyProvidingPowerTo, isBlockNormalCube, isBlockNormalCubeDefault, isBlockOpaqueCube, isBlockProvidingPowerTo, isBlockSolidOnSide, isBlockSolidOnSide, isBoundingBoxBurning, isDaytime, isMaterialInBB, isRaining, isThundering, joinEntityInSurroundings, loadItemData, markBlockForRenderUpdate, markBlockForRenderUpdate2, markBlockForUpdate, markBlockRangeForRenderUpdate, markBlocksDirtyVertical, markTileEntityForDespawn, notifyBlockChange, notifyBlocksOfNeighborChange, playAuxSFX, playAuxSFXAtEntity, playRecord, playSound, playSoundAtEntity, playSoundEffect, rayTraceBlocks_do_do, rayTraceBlocks_do, rayTraceBlocks, removeBlockTileEntity, removeEntity, removeWorldAccess, selectEntitiesWithinAABB, sendQuittingDisconnectingPacket, setAllowedSpawnTypes, setBlock, setBlockAndMetadata, setBlockAndMetadataWithNotify, setBlockAndMetadataWithUpdate, setBlockMetadata, setBlockMetadataWithNotify, setBlockTileEntity, setBlockWithNotify, setEntityDead, setItemData, setLightValue, setRainStrength, setRandomSeed, setSpawnLocation, setWorldTime, spawnEntityInWorld, spawnParticle, toggleRain, unloadEntities, updateAllLightTypes, updateEntity, updateLightByType, updateTileEntityChunkAndDoNothing, updateWeatherBody`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### theChunkProviderServer

    public ChunkProviderServer theChunkProviderServer

### canNotSave

    public boolean canNotSave

  set by CommandServerSave{all,Off,On}

### bonusChestContent

    public static final WeightedRandomChestContent[] bonusChestContent

### customTeleporters

    public List<Teleporter> customTeleporters

Constructor Detail

### WorldServer

    public WorldServer(MinecraftServer par1MinecraftServer,
                       ISaveHandler par2ISaveHandler,
                       String par3Str,
                       int par4,
                       WorldSettings par5WorldSettings,
                       Profiler par6Profiler)

Method Detail

### tick

    public void tick()

  Runs a single tick for the world

  Overrides:
    `tick` in class `World`

### spawnRandomCreature

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

  only spawns creatures allowed by the chunkProvider

### updateAllPlayersSleepingFlag

    public void updateAllPlayersSleepingFlag()

  Updates the flag that indicates whether or not all players in the world are sleeping.

  Overrides:
    `updateAllPlayersSleepingFlag` in class `World`

### areAllPlayersAsleep

    public boolean areAllPlayersAsleep()

### setSpawnLocation

    public void setSpawnLocation()

  Overrides:
    `setSpawnLocation` in class `World`

### scheduleBlockUpdate

    public void scheduleBlockUpdate(int par1,
                                    int par2,
                                    int par3,
                                    int par4,
                                    int par5)

  Schedules a tick to a block with a delay (Most commonly the tick rate)

  Overrides:
    `scheduleBlockUpdate` in class `World`

### func_82740_a

    public void func_82740_a(int par1,
                             int par2,
                             int par3,
                             int par4,
                             int par5,
                             int par6)

  Overrides:
    `func_82740_a` in class `World`

### scheduleBlockUpdateFromLoad

    public void scheduleBlockUpdateFromLoad(int par1,
                                            int par2,
                                            int par3,
                                            int par4,
                                            int par5)

  Schedules a block update from the saved information in a chunk. Called when the chunk is loaded.

  Overrides:
    `scheduleBlockUpdateFromLoad` in class `World`

### updateEntities

    public void updateEntities()

  Updates (and cleans up) entities and tile entities

  Overrides:
    `updateEntities` in class `World`

### resetUpdateEntityTick

    public void resetUpdateEntityTick()

  Resets the updateEntityTick field to 0

### tickUpdates

    public boolean tickUpdates(boolean par1)

  Runs through the list of updates to run and ticks them

  Overrides:
    `tickUpdates` in class `World`

### getPendingBlockUpdates

    public List getPendingBlockUpdates(Chunk par1Chunk,
                                       boolean par2)

  Overrides:
    `getPendingBlockUpdates` in class `World`

### updateEntityWithOptionalForce

    public void updateEntityWithOptionalForce(Entity par1Entity,
                                              boolean par2)

  Will update the entity in the world if the chunk the entity is in is currently loaded or its forced to update. Args: entity, forceUpdate

  Overrides:
    `updateEntityWithOptionalForce` in class `World`

### uncheckedUpdateEntity

    public void uncheckedUpdateEntity(Entity par1Entity,
                                      boolean par2)

  direct call to super.updateEntityWithOptionalForce

### getAllTileEntityInBox

    public List getAllTileEntityInBox(int par1,
                                      int par2,
                                      int par3,
                                      int par4,
                                      int par5,
                                      int par6)

  pars: min x,y,z , max x,y,z

### canMineBlock

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

  Called when checking if a certain block can be mined or not. The 'spawn safe zone' check is located here.

  Overrides:
    `canMineBlock` in class `World`

### canMineBlockBody

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

  Overrides:
    `canMineBlockBody` in class `World`

### getEntrancePortalLocation

    public ChunkCoordinates getEntrancePortalLocation()

  Gets the hard-coded portal location to use when entering this dimension.

### saveAllChunks

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

  Saves all chunks to disk while updating progress bar.

  Throws:
    `MinecraftException`

### releaseEntitySkin

    public void releaseEntitySkin(Entity par1Entity)

  Decrement the reference counter for this entity's skin image data

  Overrides:
    `releaseEntitySkin` in class `World`

### getEntityByID

    public Entity getEntityByID(int par1)

  Returns the Entity with the given ID, or null if it doesn't exist in this World.

  Specified by:
    `getEntityByID` in class `World`

### addWeatherEffect

    public boolean addWeatherEffect(Entity par1Entity)

  adds a lightning bolt to the list of lightning bolts in this world.

  Overrides:
    `addWeatherEffect` in class `World`

### setEntityState

    public void setEntityState(Entity par1Entity,
                               byte par2)

  sends a Packet 38 (Entity Status) to all tracked players of that entity

  Overrides:
    `setEntityState` in class `World`

### newExplosion

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

  returns a new explosion. Does initiation (at time of writing Explosion is not finished)

  Overrides:
    `newExplosion` in class `World`

### addBlockEvent

    public void addBlockEvent(int par1,
                              int par2,
                              int par3,
                              int par4,
                              int par5,
                              int par6)

  Adds a block event with the given Args to the blockEventCache. During the next tick(), the block specified will have its onBlockEvent handler called with the given parameters. Args: X,Y,Z, BlockID, EventID, EventParameter

  Overrides:
    `addBlockEvent` in class `World`

### flush

    public void flush()

  Syncs all changes to disk and wait for completion.

### getMinecraftServer

    public MinecraftServer getMinecraftServer()

  Gets the MinecraftServer.

### getEntityTracker

    public EntityTracker getEntityTracker()

  Gets the EntityTracker

### getPlayerManager

    public PlayerManager getPlayerManager()

### func_85176_s

    public Teleporter func_85176_s()

### getChunkSaveLocation

    public File getChunkSaveLocation()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD