public class WorldServer extends World
Modifier and Type | Field and Description |
---|---|
boolean |
allPlayersSleeping
is false if there are no players
|
static WeightedRandomChestContent[] |
bonusChestContent |
boolean |
canNotSave
set by CommandServerSave{all,Off,On}
|
java.util.List<Teleporter> |
customTeleporters |
protected java.util.Set<ChunkCoordIntPair> |
doneChunks
Stores the recently processed (lighting) chunks
|
ChunkProviderServer |
theChunkProviderServer |
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 and Description |
---|
WorldServer(MinecraftServer par1MinecraftServer,
ISaveHandler par2ISaveHandler,
java.lang.String par3Str,
int par4,
WorldSettings par5WorldSettings,
Profiler par6Profiler,
ILogAgent par7ILogAgent) |
Modifier and Type | Method and Description |
---|---|
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) |
protected void |
createBonusChest()
Creates the bonus chest in the world.
|
protected IChunkProvider |
createChunkProvider()
Creates the chunk provider for this world.
|
protected void |
createSpawnPosition(WorldSettings par1WorldSettings)
creates a spawn position at random within 256 blocks of 0,0
|
void |
flush()
Syncs all changes to disk and wait for completion.
|
java.util.List |
getAllTileEntityInBox(int par1,
int par2,
int par3,
int par4,
int par5,
int par6)
pars: min x,y,z , max x,y,z
|
java.io.File |
getChunkSaveLocation() |
Teleporter |
getDefaultTeleporter() |
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.
|
java.util.List |
getPendingBlockUpdates(Chunk par1Chunk,
boolean par2) |
PlayerManager |
getPlayerManager() |
protected void |
initialize(WorldSettings par1WorldSettings) |
boolean |
isBlockTickScheduledThisTick(int par1,
int par2,
int par3,
int par4)
Returns true if the given block will receive a scheduled tick in this tick.
|
Explosion |
newExplosion(Entity par1Entity,
double par2,
double par4,
double par6,
float par8,
boolean par9,
boolean par10)
returns a new explosion.
|
protected void |
onEntityAdded(Entity par1Entity) |
void |
onEntityRemoved(Entity par1Entity) |
void |
resetUpdateEntityTick()
Resets the updateEntityTick field to 0
|
void |
saveAllChunks(boolean par1,
IProgressUpdate par2IProgressUpdate)
Saves all chunks to disk while updating progress bar.
|
void |
saveChunkData()
saves chunk data - currently only called during execution of the Save All command
|
protected void |
saveLevel()
Saves the chunks to disk.
|
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,
int par6)
Schedules a block update from the saved information in a chunk.
|
void |
scheduleBlockUpdateWithPriority(int par1,
int par2,
int par3,
int par4,
int par5,
int par6) |
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
|
protected void |
tickBlocksAndAmbiance()
plays random cave ambient sounds and runs updateTick on random blocks within each chunk in the vacinity of a
player
|
boolean |
tickUpdates(boolean par1)
Runs through the list of updates to run and ticks them
|
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.
|
protected void |
updateWeather()
Updates all weather states.
|
protected void |
wakeAllPlayers() |
addLoadedEntities, addTileEntity, addTileEntity, addWorldAccess, addWorldInfoToCrashReport, blockExists, blockGetRenderType, blockHasTileEntity, calculateInitialSkylight, calculateInitialWeatherBody, calculateSkylightSubtracted, canBlockFreeze, canBlockFreezeBody, canBlockSeeTheSky, canLightningStrikeAt, canPlaceEntityOnSide, canSnowAt, canSnowAtBody, checkBlockCollision, checkChunksExist, checkNoEntityCollision, checkNoEntityCollision, checkSessionLock, chunkExists, clip, clip, countEntities, countEntities, createExplosion, destroyBlock, destroyBlockInWorldPartially, doChunksNearChunkExist, doesBlockHaveSolidTopSurface, drawCloudsBody, extendedLevelsInChunkCache, extinguishFire, findClosestStructure, findNearestEntityWithinAABB, finishSetup, func_82738_a, func_82739_e, func_92088_a, func_96440_m, getActualHeight, getBiomeGenForCoords, getBiomeGenForCoordsBody, getBlockDensity, getBlockId, getBlockLightOpacity, getBlockLightValue_do, getBlockLightValue, getBlockMaterial, getBlockMetadata, getBlockPowerInput, getBlockTileEntity, getBrightness, getCelestialAngle, getCelestialAngleRadians, getChunkFromBlockCoords, getChunkFromChunkCoords, getChunkHeightMapMinimum, getChunkProvider, getClosestPlayer, getClosestPlayerToEntity, getClosestVulnerablePlayer, getClosestVulnerablePlayerToEntity, getCloudColour, getCollidingBlockBounds, getCollidingBoundingBoxes, getCurrentDate, getCurrentMoonPhaseFactor, getDebugLoadedEntities, getEntitiesWithinAABB, getEntitiesWithinAABBExcludingEntity, getEntitiesWithinAABBExcludingEntity, getEntityPathToXYZ, getFirstUncoveredBlock, getFogColor, getFullBlockLightValue, getGameRules, getHeight, getHeightValue, getHorizon, getIndirectPowerLevelTo, getIndirectPowerOutput, getLightBrightness, getLightBrightnessForSkyBlocks, getLoadedEntityList, getLocationTensionFactor, getMinecartSoundUpdater, getMoonPhase, getPathEntityToEntity, getPersistentChunks, getPlayerEntityByName, getPrecipitationHeight, getProviderName, getRainStrength, getSavedLightValue, getSaveHandler, getScoreboard, getSeed, getSkyBlockTypeBrightness, getSkyColor, getSkyColorBody, getSpawnPoint, getStarBrightness, getStarBrightnessBody, getStrongestIndirectPower, getSunBrightness, getTensionFactorForBlock, getTopSolidOrLiquidBlock, getTotalWorldTime, getUniqueDataId, getWeightedThunderStrength, getWorldChunkManager, getWorldInfo, getWorldLogAgent, getWorldTime, getWorldVec3Pool, handleMaterialAcceleration, isAABBInMaterial, isAirBlock, isAnyLiquid, isBlockFreezable, isBlockFreezableNaturally, isBlockFullCube, isBlockHighHumidity, isBlockIndirectlyGettingPowered, isBlockNormalCube, isBlockNormalCubeDefault, isBlockOpaqueCube, isBlockProvidingPowerTo, isBlockSolidOnSide, isBlockSolidOnSide, isBlockTopFacingSurfaceSolid, isBoundingBoxBurning, isDaytime, isMaterialInBB, isRaining, isThundering, joinEntityInSurroundings, loadItemData, markBlockForRenderUpdate, markBlockForUpdate, markBlockRangeForRenderUpdate, markBlocksDirtyVertical, markTileEntityChunkModified, markTileEntityForDespawn, moodSoundAndLightCheck, notifyBlockChange, notifyBlockOfNeighborChange, notifyBlocksOfNeighborChange, notifyBlocksOfNeighborChange, playAuxSFX, playAuxSFXAtEntity, playRecord, playSound, playSoundAtEntity, playSoundEffect, playSoundToNearExcept, rayTraceBlocks_do_do, removeBlockTileEntity, removeEntity, removePlayerEntityDangerously, removeWorldAccess, selectEntitiesWithinAABB, sendQuittingDisconnectingPacket, setActivePlayerChunksAndCheckLight, setAllowedSpawnTypes, setBlock, setBlock, setBlockMetadataWithNotify, setBlockTileEntity, setBlockToAir, setItemData, setLightValue, setRainStrength, setRandomSeed, setSpawnLocation, setWorldTime, spawnEntityInWorld, spawnParticle, toggleRain, unloadEntities, updateAllLightTypes, updateEntity, updateLightByType, updateWeatherBody
public ChunkProviderServer theChunkProviderServer
public boolean canNotSave
public boolean allPlayersSleeping
public static final WeightedRandomChestContent[] bonusChestContent
protected java.util.Set<ChunkCoordIntPair> doneChunks
public java.util.List<Teleporter> customTeleporters
public WorldServer(MinecraftServer par1MinecraftServer, ISaveHandler par2ISaveHandler, java.lang.String par3Str, int par4, WorldSettings par5WorldSettings, Profiler par6Profiler, ILogAgent par7ILogAgent)
public SpawnListEntry spawnRandomCreature(EnumCreatureType par1EnumCreatureType, int par2, int par3, int par4)
public void updateAllPlayersSleepingFlag()
updateAllPlayersSleepingFlag
in class World
protected void wakeAllPlayers()
public boolean areAllPlayersAsleep()
public void setSpawnLocation()
setSpawnLocation
in class World
protected void tickBlocksAndAmbiance()
tickBlocksAndAmbiance
in class World
public boolean isBlockTickScheduledThisTick(int par1, int par2, int par3, int par4)
isBlockTickScheduledThisTick
in class World
public void scheduleBlockUpdate(int par1, int par2, int par3, int par4, int par5)
scheduleBlockUpdate
in class World
public void scheduleBlockUpdateWithPriority(int par1, int par2, int par3, int par4, int par5, int par6)
scheduleBlockUpdateWithPriority
in class World
public void scheduleBlockUpdateFromLoad(int par1, int par2, int par3, int par4, int par5, int par6)
scheduleBlockUpdateFromLoad
in class World
public void updateEntities()
updateEntities
in class World
public void resetUpdateEntityTick()
public boolean tickUpdates(boolean par1)
tickUpdates
in class World
public java.util.List getPendingBlockUpdates(Chunk par1Chunk, boolean par2)
getPendingBlockUpdates
in class World
public void updateEntityWithOptionalForce(Entity par1Entity, boolean par2)
updateEntityWithOptionalForce
in class World
protected IChunkProvider createChunkProvider()
createChunkProvider
in class World
public java.util.List getAllTileEntityInBox(int par1, int par2, int par3, int par4, int par5, int par6)
public boolean canMineBlock(EntityPlayer par1EntityPlayer, int par2, int par3, int par4)
canMineBlock
in class World
public boolean canMineBlockBody(EntityPlayer par1EntityPlayer, int par2, int par3, int par4)
canMineBlockBody
in class World
protected void initialize(WorldSettings par1WorldSettings)
initialize
in class World
protected void createSpawnPosition(WorldSettings par1WorldSettings)
protected void createBonusChest()
public ChunkCoordinates getEntrancePortalLocation()
public void saveAllChunks(boolean par1, IProgressUpdate par2IProgressUpdate) throws MinecraftException
MinecraftException
public void saveChunkData()
protected void saveLevel() throws MinecraftException
MinecraftException
protected void onEntityAdded(Entity par1Entity)
onEntityAdded
in class World
public void onEntityRemoved(Entity par1Entity)
onEntityRemoved
in class World
public Entity getEntityByID(int par1)
getEntityByID
in class World
public boolean addWeatherEffect(Entity par1Entity)
addWeatherEffect
in class World
public void setEntityState(Entity par1Entity, byte par2)
setEntityState
in class World
public Explosion newExplosion(Entity par1Entity, double par2, double par4, double par6, float par8, boolean par9, boolean par10)
newExplosion
in class World
public void addBlockEvent(int par1, int par2, int par3, int par4, int par5, int par6)
addBlockEvent
in class World
public void flush()
protected void updateWeather()
updateWeather
in class World
public MinecraftServer getMinecraftServer()
public EntityTracker getEntityTracker()
public PlayerManager getPlayerManager()
public Teleporter getDefaultTeleporter()
public java.io.File getChunkSaveLocation()