public class WorldServer extends World
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
Whether or not level saving is enabled
|
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 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_) |
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_)
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.
|
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)
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.
|
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_)
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) |
protected 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 p_147464_1_,
int p_147464_2_,
int p_147464_3_,
Block p_147464_4_,
int p_147464_5_)
Schedules a tick to a block with a delay (Most commonly the tick rate)
|
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)
sends a Packet 38 (Entity Status) to all tracked players of that entity
|
void |
setSpawnLocation()
Sets a new spawn location by finding an uncovered block at a random (x,z) location in the chunk.
|
BiomeGenBase.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 |
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, 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
public ChunkProviderServer theChunkProviderServer
public boolean levelSaving
public static final WeightedRandomChestContent[] bonusChestContent
protected java.util.Set<ChunkCoordIntPair> doneChunks
public java.util.List<Teleporter> customTeleporters
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_)
public BiomeGenBase.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 func_147456_g()
func_147456_g
in class World
public boolean isBlockTickScheduledThisTick(int p_147477_1_, int p_147477_2_, int p_147477_3_, Block p_147477_4_)
isBlockTickScheduledThisTick
in class World
public void scheduleBlockUpdate(int p_147464_1_, int p_147464_2_, int p_147464_3_, Block p_147464_4_, int p_147464_5_)
scheduleBlockUpdate
in class World
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_)
scheduleBlockUpdateWithPriority
in class World
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_)
func_147446_b
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 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_)
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
protected 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 p_147452_1_, int p_147452_2_, int p_147452_3_, Block p_147452_4_, int p_147452_5_, int p_147452_6_)
addBlockEvent
in class World
public void flush()
protected void updateWeather()
updateWeather
in class World
public MinecraftServer func_73046_m()
public EntityTracker getEntityTracker()
public PlayerManager getPlayerManager()
public Teleporter getDefaultTeleporter()
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_)
public java.io.File getChunkSaveLocation()