public abstract class World extends java.lang.Object implements IBlockAccess
Modifier and Type | Field and Description |
---|---|
protected java.util.Set |
activeChunkSet
Positions to update
|
protected IChunkProvider |
chunkProvider
Handles chunk operations and caching
|
EnumDifficulty |
difficultySetting
Option > Difficulty setting (0 - 3)
|
protected int |
DIST_HASH_MAGIC
magic number used to generate fast random numbers for 3d distribution within a chunk
|
boolean |
findingSpawnPoint
Boolean that is set to true when trying to find a spawn point
|
boolean |
isRemote
This is set to true for client worlds, and false for server worlds.
|
int |
lastLightningBolt
Set to 2 whenever a lightning bolt is generated in SSP.
|
java.util.List |
loadedEntityList
A list of all Entities in all currently-loaded chunks
|
java.util.List |
loadedTileEntityList
A list of the loaded tile entities in the world
|
MapStorage |
mapStorage |
static double |
MAX_ENTITY_RADIUS
Used in the getEntitiesWithinAABB functions to expand the search area for entities.
|
MapStorage |
perWorldStorage |
java.util.List |
playerEntities
Array list of players in the world.
|
protected float |
prevRainingStrength |
protected float |
prevThunderingStrength |
WorldProvider |
provider
The WorldProvider instance that World uses.
|
protected float |
rainingStrength |
java.util.Random |
rand
RNG for World.
|
protected ISaveHandler |
saveHandler |
boolean |
scheduledUpdatesAreImmediate
boolean; if true updates scheduled by scheduleBlockUpdate happen immediately
|
int |
skylightSubtracted
How much light is subtracted from full daylight
|
protected boolean |
spawnHostileMobs
indicates if enemies are spawned or not
|
protected boolean |
spawnPeacefulMobs
A flag indicating whether we should spawn peaceful mobs.
|
Profiler |
theProfiler |
protected float |
thunderingStrength |
protected java.util.List |
unloadedEntityList |
protected int |
updateLCG
Contains the current Linear Congruential Generator seed for block updates.
|
VillageCollection |
villageCollectionObj |
protected VillageSiege |
villageSiegeObj |
java.util.List |
weatherEffects
a list of all the lightning entities
|
protected java.util.List |
worldAccesses |
protected WorldInfo |
worldInfo
holds information about a world (size on disk, time, spawn point, seed, ...)
|
protected Scoreboard |
worldScoreboard |
Constructor and Description |
---|
World(ISaveHandler p_i45368_1_,
java.lang.String p_i45368_2_,
WorldProvider p_i45368_3_,
WorldSettings p_i45368_4_,
Profiler p_i45368_5_) |
World(ISaveHandler p_i45369_1_,
java.lang.String p_i45369_2_,
WorldSettings p_i45369_3_,
WorldProvider p_i45369_4_,
Profiler p_i45369_5_) |
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.
|
void |
addLoadedEntities(java.util.List par1List)
adds entities to the loaded entities list, and loads thier skins.
|
void |
addTileEntity(TileEntity entity)
Adds a single TileEntity to the world.
|
boolean |
addWeatherEffect(Entity par1Entity)
adds a lightning bolt to the list of lightning bolts in this world.
|
void |
addWorldAccess(IWorldAccess par1IWorldAccess)
Adds a IWorldAccess to the list of worldAccesses
|
CrashReportCategory |
addWorldInfoToCrashReport(CrashReport par1CrashReport)
Adds some basic stats of the world to the given crash report.
|
boolean |
blockExists(int par1,
int par2,
int par3)
Returns whether a block exists at world coordinates x, y, z
|
void |
calculateInitialSkylight()
Called on construction of the World class to setup the initial skylight values
|
void |
calculateInitialWeatherBody() |
int |
calculateSkylightSubtracted(float par1)
Returns the amount of skylight subtracted for the current time
|
boolean |
canBlockFreeze(int par1,
int par2,
int par3,
boolean par4)
checks to see if a given block is both water, and cold enough to freeze - if the par4 boolean is set, this will
only return true if there is a non-water block immediately adjacent to the specified block
|
boolean |
canBlockFreezeBody(int par1,
int par2,
int par3,
boolean par4) |
boolean |
canBlockSeeTheSky(int par1,
int par2,
int par3)
Checks if the specified block is able to see the sky
|
boolean |
canLightningStrikeAt(int par1,
int par2,
int par3) |
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) |
boolean |
canPlaceEntityOnSide(Block p_147472_1_,
int p_147472_2_,
int p_147472_3_,
int p_147472_4_,
boolean p_147472_5_,
int p_147472_6_,
Entity p_147472_7_,
ItemStack p_147472_8_)
Returns true if the given Entity can be placed on the given side of the given block position.
|
boolean |
canSnowAtBody(int p_147478_1_,
int p_147478_2_,
int p_147478_3_,
boolean p_147478_4_) |
boolean |
checkBlockCollision(AxisAlignedBB par1AxisAlignedBB)
Returns true if there are any blocks in the region constrained by an AxisAlignedBB
|
boolean |
checkChunksExist(int par1,
int par2,
int par3,
int par4,
int par5,
int par6)
Checks between a min and max all the chunks inbetween actually exist.
|
boolean |
checkNoEntityCollision(AxisAlignedBB par1AxisAlignedBB)
Returns true if there are no solid, live entities in the specified AxisAlignedBB
|
boolean |
checkNoEntityCollision(AxisAlignedBB par1AxisAlignedBB,
Entity par2Entity)
Returns true if there are no solid, live entities in the specified AxisAlignedBB, excluding the given entity
|
void |
checkSessionLock()
Checks whether the session lock file was modified by another process
|
protected boolean |
chunkExists(int par1,
int par2)
Returns whether a chunk exists at chunk coordinates x, y
|
int |
countEntities(java.lang.Class par1Class)
Counts how many entities of an entity class exist in the world.
|
int |
countEntities(EnumCreatureType type,
boolean forSpawnCount)
Returns a count of entities that classify themselves as the specified creature type.
|
protected abstract IChunkProvider |
createChunkProvider()
Creates the chunk provider for this world.
|
Explosion |
createExplosion(Entity par1Entity,
double par2,
double par4,
double par6,
float par8,
boolean par9)
Creates an explosion.
|
void |
destroyBlockInWorldPartially(int p_147443_1_,
int p_147443_2_,
int p_147443_3_,
int p_147443_4_,
int p_147443_5_)
Starts (or continues) destroying a block with given ID at the given coordinates for the given partially destroyed
value
|
boolean |
doChunksNearChunkExist(int par1,
int par2,
int par3,
int par4)
Checks if any of the chunks within distance (argument 4) blocks of the given block exist
|
static boolean |
doesBlockHaveSolidTopSurface(IBlockAccess p_147466_0_,
int p_147466_1_,
int p_147466_2_,
int p_147466_3_)
Returns true if the block at the given coordinate has a solid (buildable) top surface.
|
Vec3 |
drawCloudsBody(float par1) |
boolean |
extendedLevelsInChunkCache()
set by !chunk.getAreLevelsEmpty
|
boolean |
extinguishFire(EntityPlayer par1EntityPlayer,
int par2,
int par3,
int par4,
int par5)
If the block in the given direction of the given coordinate is fire, extinguish it.
|
ChunkPosition |
findClosestStructure(java.lang.String p_147440_1_,
int p_147440_2_,
int p_147440_3_,
int p_147440_4_)
Returns the location of the closest structure of the specified type.
|
Entity |
findNearestEntityWithinAABB(java.lang.Class par1Class,
AxisAlignedBB par2AxisAlignedBB,
Entity par3Entity) |
protected void |
finishSetup() |
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_) |
MovingObjectPosition |
func_147447_a(Vec3 p_147447_1_,
Vec3 p_147447_2_,
boolean p_147447_3_,
boolean p_147447_4_,
boolean p_147447_5_) |
void |
func_147448_a(java.util.Collection p_147448_1_) |
void |
func_147450_X() |
boolean |
func_147451_t(int p_147451_1_,
int p_147451_2_,
int p_147451_3_) |
void |
func_147453_f(int p_147453_1_,
int p_147453_2_,
int p_147453_3_,
Block p_147453_4_) |
protected void |
func_147456_g() |
void |
func_147457_a(TileEntity p_147457_1_) |
java.util.List |
func_147461_a(AxisAlignedBB p_147461_1_) |
float |
func_147462_b(double p_147462_1_,
double p_147462_3_,
double p_147462_5_) |
protected void |
func_147467_a(int p_147467_1_,
int p_147467_2_,
Chunk p_147467_3_) |
boolean |
func_147469_q(int p_147469_1_,
int p_147469_2_,
int p_147469_3_) |
boolean |
func_147470_e(AxisAlignedBB p_147470_1_) |
float |
func_147473_B(int p_147473_1_,
int p_147473_2_,
int p_147473_3_) |
boolean |
func_147478_e(int p_147478_1_,
int p_147478_2_,
int p_147478_3_,
boolean p_147478_4_) |
void |
func_147479_m(int p_147479_1_,
int p_147479_2_,
int p_147479_3_) |
boolean |
func_147480_a(int p_147480_1_,
int p_147480_2_,
int p_147480_3_,
boolean p_147480_4_) |
void |
func_82738_a(long par1) |
int |
getActualHeight()
Returns current world height.
|
BiomeGenBase |
getBiomeGenForCoords(int par1,
int par2)
Gets the biome for a given set of x/z coordinates
|
BiomeGenBase |
getBiomeGenForCoordsBody(int par1,
int par2) |
Block |
getBlock(int p_147439_1_,
int p_147439_2_,
int p_147439_3_) |
float |
getBlockDensity(Vec3 par1Vec3,
AxisAlignedBB par2AxisAlignedBB)
Gets the percentage of real blocks within within a bounding box, along a specified vector.
|
int |
getBlockLightOpacity(int x,
int y,
int z)
Readded as it was removed, very useful helper function
|
int |
getBlockLightValue_do(int par1,
int par2,
int par3,
boolean par4)
Gets the light value of a block location.
|
int |
getBlockLightValue(int par1,
int par2,
int par3)
Gets the light value of a block location
|
int |
getBlockMetadata(int par1,
int par2,
int par3)
Returns the block metadata at coords x,y,z
|
int |
getBlockPowerInput(int par1,
int par2,
int par3)
Returns the highest redstone signal strength powering the given block.
|
float |
getCelestialAngle(float par1)
calls calculateCelestialAngle
|
float |
getCelestialAngleRadians(float par1)
Return getCelestialAngle()*2*PI
|
Chunk |
getChunkFromBlockCoords(int par1,
int par2)
Returns a chunk looked up by block coordinates.
|
Chunk |
getChunkFromChunkCoords(int par1,
int par2)
Returns back a chunk looked up by chunk coordinates Args: x, y
|
int |
getChunkHeightMapMinimum(int par1,
int par2)
Gets the heightMapMinimum field of the given chunk, or 0 if the chunk is not loaded.
|
IChunkProvider |
getChunkProvider()
gets the IChunkProvider this world uses.
|
EntityPlayer |
getClosestPlayer(double par1,
double par3,
double par5,
double par7)
Gets the closest player to the point within the specified distance (distance can be set to less than 0 to not
limit the distance).
|
EntityPlayer |
getClosestPlayerToEntity(Entity par1Entity,
double par2)
Gets the closest player to the entity within the specified distance (if distance is less than 0 then ignored).
|
EntityPlayer |
getClosestVulnerablePlayer(double par1,
double par3,
double par5,
double par7)
Returns the closest vulnerable player within the given radius, or null if none is found.
|
EntityPlayer |
getClosestVulnerablePlayerToEntity(Entity par1Entity,
double par2)
Returns the closest vulnerable player to this entity within the given radius, or null if none is found
|
Vec3 |
getCloudColour(float par1) |
java.util.List |
getCollidingBoundingBoxes(Entity par1Entity,
AxisAlignedBB par2AxisAlignedBB)
Returns a list of bounding boxes that collide with aabb excluding the passed in entity's collision.
|
java.util.Calendar |
getCurrentDate()
returns a calendar object containing the current date
|
float |
getCurrentMoonPhaseFactor()
gets the current fullness of the moon expressed as a float between 1.0 and 0.0, in steps of .25
|
java.lang.String |
getDebugLoadedEntities()
This string is 'All: (number of loaded entities)' Viewable by press ing F3
|
java.util.List |
getEntitiesWithinAABB(java.lang.Class par1Class,
AxisAlignedBB par2AxisAlignedBB)
Returns all entities of the specified class type which intersect with the AABB.
|
java.util.List |
getEntitiesWithinAABBExcludingEntity(Entity par1Entity,
AxisAlignedBB par2AxisAlignedBB)
Will get all entities within the specified AABB excluding the one passed into it.
|
java.util.List |
getEntitiesWithinAABBExcludingEntity(Entity par1Entity,
AxisAlignedBB par2AxisAlignedBB,
IEntitySelector par3IEntitySelector) |
abstract Entity |
getEntityByID(int var1)
Returns the Entity with the given ID, or null if it doesn't exist in this World.
|
PathEntity |
getEntityPathToXYZ(Entity par1Entity,
int par2,
int par3,
int par4,
float par5,
boolean par6,
boolean par7,
boolean par8,
boolean par9) |
Vec3 |
getFogColor(float par1)
Returns vector(ish) with R/G/B for fog
|
int |
getFullBlockLightValue(int par1,
int par2,
int par3)
Does the same as getBlockLightValue_do but without checking if its not a normal block
|
GameRules |
getGameRules()
Gets the GameRules instance.
|
int |
getHeight()
Returns current world height.
|
int |
getHeightValue(int par1,
int par2)
Returns the y coordinate with a block in it at this x, z coordinate
|
double |
getHorizon()
Returns horizon height for use in rendering the sky.
|
int |
getIndirectPowerLevelTo(int par1,
int par2,
int par3,
int par4)
Gets the power level from a certain block face.
|
boolean |
getIndirectPowerOutput(int par1,
int par2,
int par3,
int par4)
Returns the indirect signal strength being outputted by the given block in the *opposite* of the given direction.
|
float |
getLightBrightness(int par1,
int par2,
int par3)
Returns how bright the block is shown as which is the block's light value looked up in a lookup table (light
values aren't linear for brightness).
|
int |
getLightBrightnessForSkyBlocks(int par1,
int par2,
int par3,
int par4)
Any Light rendered on a 1.8 Block goes through here
|
java.util.List |
getLoadedEntityList()
Accessor for world Loaded Entity List
|
int |
getMoonPhase() |
PathEntity |
getPathEntityToEntity(Entity par1Entity,
Entity par2Entity,
float par3,
boolean par4,
boolean par5,
boolean par6,
boolean par7) |
java.util.List |
getPendingBlockUpdates(Chunk par1Chunk,
boolean par2) |
com.google.common.collect.ImmutableSetMultimap<ChunkCoordIntPair,ForgeChunkManager.Ticket> |
getPersistentChunks()
Get the persistent chunks for this world
|
EntityPlayer |
getPlayerEntityByName(java.lang.String par1Str)
Find a player by name in this world.
|
int |
getPrecipitationHeight(int par1,
int par2)
Gets the height to which rain/snow will fall.
|
java.lang.String |
getProviderName()
Returns the name of the current chunk provider, by calling chunkprovider.makeString()
|
float |
getRainStrength(float par1)
Not sure about this actually.
|
int |
getSavedLightValue(EnumSkyBlock par1EnumSkyBlock,
int par2,
int par3,
int par4)
Returns saved light value without taking into account the time of day.
|
ISaveHandler |
getSaveHandler()
Returns this world's current save handler
|
Scoreboard |
getScoreboard() |
long |
getSeed()
Retrieve the world seed from level.dat
|
int |
getSkyBlockTypeBrightness(EnumSkyBlock par1EnumSkyBlock,
int par2,
int par3,
int par4)
Brightness for SkyBlock.Sky is clear white and (through color computing it is assumed) DEPENDENT ON DAYTIME.
|
Vec3 |
getSkyColor(Entity par1Entity,
float par2)
Calculates the color for the skybox
|
Vec3 |
getSkyColorBody(Entity par1Entity,
float par2) |
ChunkCoordinates |
getSpawnPoint()
Returns the coordinates of the spawn point
|
float |
getStarBrightness(float par1)
How bright are stars in the sky
|
float |
getStarBrightnessBody(float par1) |
int |
getStrongestIndirectPower(int par1,
int par2,
int par3) |
float |
getSunBrightness(float par1)
Returns the sun brightness - checks time of day, rain and thunder
|
TileEntity |
getTileEntity(int p_147438_1_,
int p_147438_2_,
int p_147438_3_) |
Block |
getTopBlock(int p_147474_1_,
int p_147474_2_) |
int |
getTopSolidOrLiquidBlock(int par1,
int par2)
Finds the highest block on the x, z coordinate that is solid and returns its y coord.
|
long |
getTotalWorldTime() |
int |
getUniqueDataId(java.lang.String par1Str)
Returns an unique new data id from the MapStorage for the given prefix and saves the idCounts map to the
'idcounts' file.
|
float |
getWeightedThunderStrength(float par1) |
WorldChunkManager |
getWorldChunkManager() |
WorldInfo |
getWorldInfo()
Gets the World's WorldInfo instance
|
long |
getWorldTime() |
Vec3Pool |
getWorldVec3Pool()
Return the Vec3Pool object for this world.
|
boolean |
handleMaterialAcceleration(AxisAlignedBB par1AxisAlignedBB,
Material par2Material,
Entity par3Entity)
handles the acceleration of an object whilst in water.
|
protected void |
initialize(WorldSettings par1WorldSettings) |
boolean |
isAABBInMaterial(AxisAlignedBB par1AxisAlignedBB,
Material par2Material)
checks if the given AABB is in the material given.
|
boolean |
isAirBlock(int p_147437_1_,
int p_147437_2_,
int p_147437_3_)
Returns true if the block at the specified coordinates is empty
|
boolean |
isAnyLiquid(AxisAlignedBB par1AxisAlignedBB)
Returns if any of the blocks within the aabb are liquids.
|
boolean |
isBlockFreezable(int par1,
int par2,
int par3)
checks to see if a given block is both water and is cold enough to freeze
|
boolean |
isBlockFreezableNaturally(int par1,
int par2,
int par3)
checks to see if a given block is both water and has at least one immediately adjacent non-water block
|
boolean |
isBlockHighHumidity(int par1,
int par2,
int par3)
Checks to see if the biome rainfall values for a given x,y,z coordinate set are extremely high
|
boolean |
isBlockIndirectlyGettingPowered(int par1,
int par2,
int par3)
Used to see if one of the blocks next to you or your block is getting power from a neighboring block.
|
boolean |
isBlockNormalCubeDefault(int p_147445_1_,
int p_147445_2_,
int p_147445_3_,
boolean p_147445_4_)
Checks if the block is a solid, normal cube.
|
int |
isBlockProvidingPowerTo(int par1,
int par2,
int par3,
int par4)
Is this block powering in the specified direction Args: x, y, z, direction
|
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.
|
boolean |
isDaytime()
Checks whether its daytime by seeing if the light subtracted from the skylight is less than 4
|
boolean |
isMaterialInBB(AxisAlignedBB par1AxisAlignedBB,
Material par2Material)
Returns true if the given bounding box contains the given material
|
boolean |
isRaining()
Returns true if the current rain strength is greater than 0.2
|
boolean |
isSideSolid(int x,
int y,
int z,
ForgeDirection side)
Determine if the given block is considered solid on the
specified side.
|
boolean |
isSideSolid(int x,
int y,
int z,
ForgeDirection side,
boolean _default)
Determine if the given block is considered solid on the
specified side.
|
boolean |
isThundering()
Returns true if the current thunder strength (weighted with the rain strength) is greater than 0.9
|
void |
joinEntityInSurroundings(Entity par1Entity)
spwans an entity and loads surrounding chunks
|
WorldSavedData |
loadItemData(java.lang.Class par1Class,
java.lang.String par2Str)
Loads an existing MapDataBase corresponding to the given String id from disk using the MapStorage, instantiating
the given Class, or returns null if none such file exists.
|
void |
makeFireworks(double par1,
double par3,
double par5,
double par7,
double par9,
double par11,
NBTTagCompound par13NBTTagCompound) |
void |
markBlockForUpdate(int p_147471_1_,
int p_147471_2_,
int p_147471_3_) |
void |
markBlockRangeForRenderUpdate(int p_147458_1_,
int p_147458_2_,
int p_147458_3_,
int p_147458_4_,
int p_147458_5_,
int p_147458_6_) |
void |
markBlocksDirtyVertical(int par1,
int par2,
int par3,
int par4)
marks a vertical line of blocks as dirty
|
void |
markTileEntityChunkModified(int p_147476_1_,
int p_147476_2_,
int p_147476_3_,
TileEntity p_147476_4_)
Args: X, Y, Z, tile entity Marks the chunk the tile entity is in as modified.
|
Explosion |
newExplosion(Entity par1Entity,
double par2,
double par4,
double par6,
float par8,
boolean par9,
boolean par10)
returns a new explosion.
|
void |
notifyBlockChange(int p_147444_1_,
int p_147444_2_,
int p_147444_3_,
Block p_147444_4_)
The block type change and need to notify other systems Args: x, y, z, blockID
|
void |
notifyBlockOfNeighborChange(int p_147460_1_,
int p_147460_2_,
int p_147460_3_,
Block p_147460_4_)
Notifies a block that one of its neighbor change to the specified type Args: x, y, z, block
|
void |
notifyBlocksOfNeighborChange(int p_147459_1_,
int p_147459_2_,
int p_147459_3_,
Block p_147459_4_) |
void |
notifyBlocksOfNeighborChange(int p_147441_1_,
int p_147441_2_,
int p_147441_3_,
Block p_147441_4_,
int p_147441_5_) |
protected void |
onEntityAdded(Entity par1Entity) |
protected void |
onEntityRemoved(Entity par1Entity) |
void |
playAuxSFX(int par1,
int par2,
int par3,
int par4,
int par5)
See description for func_72706_a.
|
void |
playAuxSFXAtEntity(EntityPlayer par1EntityPlayer,
int par2,
int par3,
int par4,
int par5,
int par6)
See description for playAuxSFX.
|
void |
playBroadcastSound(int par1,
int par2,
int par3,
int par4,
int par5) |
void |
playRecord(java.lang.String par1Str,
int par2,
int par3,
int par4)
Plays a record at the specified coordinates of the specified name.
|
void |
playSound(double par1,
double par3,
double par5,
java.lang.String par7Str,
float par8,
float par9,
boolean par10)
par8 is loudness, all pars passed to minecraftInstance.sndManager.playSound
|
void |
playSoundAtEntity(Entity par1Entity,
java.lang.String par2Str,
float par3,
float par4)
Plays a sound at the entity's position.
|
void |
playSoundEffect(double par1,
double par3,
double par5,
java.lang.String par7Str,
float par8,
float par9)
Play a sound effect.
|
void |
playSoundToNearExcept(EntityPlayer par1EntityPlayer,
java.lang.String par2Str,
float par3,
float par4)
Plays sound to all near players except the player reference given
|
MovingObjectPosition |
rayTraceBlocks(Vec3 par1Vec3,
Vec3 par2Vec3)
Performs a raycast against all blocks in the world except liquids.
|
MovingObjectPosition |
rayTraceBlocks(Vec3 par1Vec3,
Vec3 par2Vec3,
boolean par3)
Performs a raycast against all blocks in the world, and optionally liquids.
|
void |
removeEntity(Entity par1Entity)
Schedule the entity for removal during the next tick.
|
void |
removePlayerEntityDangerously(Entity par1Entity)
Do NOT use this method to remove normal entities- use normal removeEntity
|
void |
removeTileEntity(int p_147475_1_,
int p_147475_2_,
int p_147475_3_) |
void |
removeWorldAccess(IWorldAccess par1IWorldAccess)
Removes a worldAccess from the worldAccesses object
|
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_) |
java.util.List |
selectEntitiesWithinAABB(java.lang.Class par1Class,
AxisAlignedBB par2AxisAlignedBB,
IEntitySelector par3IEntitySelector) |
void |
sendQuittingDisconnectingPacket()
If on MP, sends a quitting packet.
|
protected void |
setActivePlayerChunksAndCheckLight() |
void |
setAllowedSpawnTypes(boolean par1,
boolean par2)
Set which types of mobs are allowed to spawn (peaceful vs hostile).
|
boolean |
setBlock(int p_147449_1_,
int p_147449_2_,
int p_147449_3_,
Block p_147449_4_)
Sets a block by a coordinate
|
boolean |
setBlock(int p_147465_1_,
int p_147465_2_,
int p_147465_3_,
Block p_147465_4_,
int p_147465_5_,
int p_147465_6_)
Sets the block ID and metadata at a given location.
|
boolean |
setBlockMetadataWithNotify(int par1,
int par2,
int par3,
int par4,
int par5)
Sets the blocks metadata and if set will then notify blocks that this block changed, depending on the flag.
|
boolean |
setBlockToAir(int p_147468_1_,
int p_147468_2_,
int p_147468_3_)
Sets a block to 0 and notifies relevant systems with the block change Args: x, y, z
|
void |
setEntityState(Entity par1Entity,
byte par2)
sends a Packet 38 (Entity Status) to all tracked players of that entity
|
void |
setItemData(java.lang.String par1Str,
WorldSavedData par2WorldSavedData)
Assigns the given String id to the given MapDataBase using the MapStorage, removing any existing ones of the same
id.
|
void |
setLightValue(EnumSkyBlock par1EnumSkyBlock,
int par2,
int par3,
int par4,
int par5)
Sets the light value either into the sky map or block map depending on if enumSkyBlock is set to sky or block.
|
void |
setRainStrength(float par1)
Sets the strength of the rain.
|
java.util.Random |
setRandomSeed(int par1,
int par2,
int par3)
puts the World Random seed to a specific state dependant on the inputs
|
void |
setSpawnLocation()
Sets a new spawn location by finding an uncovered block at a random (x,z) location in the chunk.
|
void |
setSpawnLocation(int par1,
int par2,
int par3) |
void |
setThunderStrength(float p_147442_1_)
Sets the strength of the thunder.
|
void |
setTileEntity(int p_147455_1_,
int p_147455_2_,
int p_147455_3_,
TileEntity p_147455_4_) |
void |
setWorldTime(long par1)
Sets the world time.
|
boolean |
spawnEntityInWorld(Entity par1Entity)
Called to place all entities as part of a world
|
void |
spawnParticle(java.lang.String par1Str,
double par2,
double par4,
double par6,
double par8,
double par10,
double par12)
Spawns a particle.
|
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 |
unloadEntities(java.util.List par1List)
Adds a list of entities to be unloaded on the next pass of World.updateEntities()
|
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 |
updateEntity(Entity par1Entity)
Will update the entity in the world if the chunk the entity is in is currently loaded.
|
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.
|
boolean |
updateLightByType(EnumSkyBlock p_147463_1_,
int p_147463_2_,
int p_147463_3_,
int p_147463_4_) |
protected void |
updateWeather()
Updates all weather states.
|
void |
updateWeatherBody() |
public static double MAX_ENTITY_RADIUS
public final MapStorage perWorldStorage
public boolean scheduledUpdatesAreImmediate
public java.util.List loadedEntityList
protected java.util.List unloadedEntityList
public java.util.List loadedTileEntityList
public java.util.List playerEntities
public java.util.List weatherEffects
public int skylightSubtracted
protected int updateLCG
protected final int DIST_HASH_MAGIC
protected float prevRainingStrength
protected float rainingStrength
protected float prevThunderingStrength
protected float thunderingStrength
public int lastLightningBolt
public EnumDifficulty difficultySetting
public java.util.Random rand
public final WorldProvider provider
protected java.util.List worldAccesses
protected IChunkProvider chunkProvider
protected final ISaveHandler saveHandler
protected WorldInfo worldInfo
public boolean findingSpawnPoint
public MapStorage mapStorage
public VillageCollection villageCollectionObj
protected final VillageSiege villageSiegeObj
public final Profiler theProfiler
protected Scoreboard worldScoreboard
public boolean isRemote
protected java.util.Set activeChunkSet
protected boolean spawnHostileMobs
protected boolean spawnPeacefulMobs
public World(ISaveHandler p_i45368_1_, java.lang.String p_i45368_2_, WorldProvider p_i45368_3_, WorldSettings p_i45368_4_, Profiler p_i45368_5_)
public World(ISaveHandler p_i45369_1_, java.lang.String p_i45369_2_, WorldSettings p_i45369_3_, WorldProvider p_i45369_4_, Profiler p_i45369_5_)
public BiomeGenBase getBiomeGenForCoords(int par1, int par2)
getBiomeGenForCoords
in interface IBlockAccess
public BiomeGenBase getBiomeGenForCoordsBody(int par1, int par2)
public WorldChunkManager getWorldChunkManager()
protected void finishSetup()
protected abstract IChunkProvider createChunkProvider()
protected void initialize(WorldSettings par1WorldSettings)
public void setSpawnLocation()
public Block getTopBlock(int p_147474_1_, int p_147474_2_)
public Block getBlock(int p_147439_1_, int p_147439_2_, int p_147439_3_)
getBlock
in interface IBlockAccess
public boolean isAirBlock(int p_147437_1_, int p_147437_2_, int p_147437_3_)
isAirBlock
in interface IBlockAccess
public boolean blockExists(int par1, int par2, int par3)
public boolean doChunksNearChunkExist(int par1, int par2, int par3, int par4)
public boolean checkChunksExist(int par1, int par2, int par3, int par4, int par5, int par6)
protected boolean chunkExists(int par1, int par2)
public Chunk getChunkFromBlockCoords(int par1, int par2)
public Chunk getChunkFromChunkCoords(int par1, int par2)
public boolean setBlock(int p_147465_1_, int p_147465_2_, int p_147465_3_, Block p_147465_4_, int p_147465_5_, int p_147465_6_)
public int getBlockMetadata(int par1, int par2, int par3)
getBlockMetadata
in interface IBlockAccess
public boolean setBlockMetadataWithNotify(int par1, int par2, int par3, int par4, int par5)
public boolean setBlockToAir(int p_147468_1_, int p_147468_2_, int p_147468_3_)
public boolean func_147480_a(int p_147480_1_, int p_147480_2_, int p_147480_3_, boolean p_147480_4_)
public boolean setBlock(int p_147449_1_, int p_147449_2_, int p_147449_3_, Block p_147449_4_)
public void markBlockForUpdate(int p_147471_1_, int p_147471_2_, int p_147471_3_)
public void notifyBlockChange(int p_147444_1_, int p_147444_2_, int p_147444_3_, Block p_147444_4_)
public void markBlocksDirtyVertical(int par1, int par2, int par3, int par4)
public void markBlockRangeForRenderUpdate(int p_147458_1_, int p_147458_2_, int p_147458_3_, int p_147458_4_, int p_147458_5_, int p_147458_6_)
public void notifyBlocksOfNeighborChange(int p_147459_1_, int p_147459_2_, int p_147459_3_, Block p_147459_4_)
public void notifyBlocksOfNeighborChange(int p_147441_1_, int p_147441_2_, int p_147441_3_, Block p_147441_4_, int p_147441_5_)
public void notifyBlockOfNeighborChange(int p_147460_1_, int p_147460_2_, int p_147460_3_, Block p_147460_4_)
public boolean isBlockTickScheduledThisTick(int p_147477_1_, int p_147477_2_, int p_147477_3_, Block p_147477_4_)
public boolean canBlockSeeTheSky(int par1, int par2, int par3)
public int getFullBlockLightValue(int par1, int par2, int par3)
public int getBlockLightValue(int par1, int par2, int par3)
public int getBlockLightValue_do(int par1, int par2, int par3, boolean par4)
public int getHeightValue(int par1, int par2)
public int getChunkHeightMapMinimum(int par1, int par2)
public int getSkyBlockTypeBrightness(EnumSkyBlock par1EnumSkyBlock, int par2, int par3, int par4)
public int getSavedLightValue(EnumSkyBlock par1EnumSkyBlock, int par2, int par3, int par4)
public void setLightValue(EnumSkyBlock par1EnumSkyBlock, int par2, int par3, int par4, int par5)
public void func_147479_m(int p_147479_1_, int p_147479_2_, int p_147479_3_)
public int getLightBrightnessForSkyBlocks(int par1, int par2, int par3, int par4)
getLightBrightnessForSkyBlocks
in interface IBlockAccess
public float getLightBrightness(int par1, int par2, int par3)
public boolean isDaytime()
public MovingObjectPosition rayTraceBlocks(Vec3 par1Vec3, Vec3 par2Vec3)
public MovingObjectPosition rayTraceBlocks(Vec3 par1Vec3, Vec3 par2Vec3, boolean par3)
public MovingObjectPosition func_147447_a(Vec3 p_147447_1_, Vec3 p_147447_2_, boolean p_147447_3_, boolean p_147447_4_, boolean p_147447_5_)
public void playSoundAtEntity(Entity par1Entity, java.lang.String par2Str, float par3, float par4)
public void playSoundToNearExcept(EntityPlayer par1EntityPlayer, java.lang.String par2Str, float par3, float par4)
public void playSoundEffect(double par1, double par3, double par5, java.lang.String par7Str, float par8, float par9)
public void playSound(double par1, double par3, double par5, java.lang.String par7Str, float par8, float par9, boolean par10)
public void playRecord(java.lang.String par1Str, int par2, int par3, int par4)
public void spawnParticle(java.lang.String par1Str, double par2, double par4, double par6, double par8, double par10, double par12)
public boolean addWeatherEffect(Entity par1Entity)
public boolean spawnEntityInWorld(Entity par1Entity)
protected void onEntityAdded(Entity par1Entity)
protected void onEntityRemoved(Entity par1Entity)
public void removeEntity(Entity par1Entity)
public void removePlayerEntityDangerously(Entity par1Entity)
public void addWorldAccess(IWorldAccess par1IWorldAccess)
public java.util.List getCollidingBoundingBoxes(Entity par1Entity, AxisAlignedBB par2AxisAlignedBB)
public java.util.List func_147461_a(AxisAlignedBB p_147461_1_)
public int calculateSkylightSubtracted(float par1)
public void removeWorldAccess(IWorldAccess par1IWorldAccess)
public float getSunBrightness(float par1)
public Vec3 getSkyColor(Entity par1Entity, float par2)
public float getCelestialAngle(float par1)
public int getMoonPhase()
public float getCurrentMoonPhaseFactor()
public float getCelestialAngleRadians(float par1)
public Vec3 getCloudColour(float par1)
public Vec3 drawCloudsBody(float par1)
public Vec3 getFogColor(float par1)
public int getPrecipitationHeight(int par1, int par2)
public int getTopSolidOrLiquidBlock(int par1, int par2)
public float getStarBrightness(float par1)
public float getStarBrightnessBody(float par1)
public void scheduleBlockUpdate(int p_147464_1_, int p_147464_2_, int p_147464_3_, Block p_147464_4_, int p_147464_5_)
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_)
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_)
public void updateEntities()
public void func_147448_a(java.util.Collection p_147448_1_)
public void updateEntity(Entity par1Entity)
public void updateEntityWithOptionalForce(Entity par1Entity, boolean par2)
public boolean checkNoEntityCollision(AxisAlignedBB par1AxisAlignedBB)
public boolean checkNoEntityCollision(AxisAlignedBB par1AxisAlignedBB, Entity par2Entity)
public boolean checkBlockCollision(AxisAlignedBB par1AxisAlignedBB)
public boolean isAnyLiquid(AxisAlignedBB par1AxisAlignedBB)
public boolean func_147470_e(AxisAlignedBB p_147470_1_)
public boolean handleMaterialAcceleration(AxisAlignedBB par1AxisAlignedBB, Material par2Material, Entity par3Entity)
public boolean isMaterialInBB(AxisAlignedBB par1AxisAlignedBB, Material par2Material)
public boolean isAABBInMaterial(AxisAlignedBB par1AxisAlignedBB, Material par2Material)
public Explosion createExplosion(Entity par1Entity, double par2, double par4, double par6, float par8, boolean par9)
public Explosion newExplosion(Entity par1Entity, double par2, double par4, double par6, float par8, boolean par9, boolean par10)
public float getBlockDensity(Vec3 par1Vec3, AxisAlignedBB par2AxisAlignedBB)
public boolean extinguishFire(EntityPlayer par1EntityPlayer, int par2, int par3, int par4, int par5)
public java.lang.String getDebugLoadedEntities()
public java.lang.String getProviderName()
public TileEntity getTileEntity(int p_147438_1_, int p_147438_2_, int p_147438_3_)
getTileEntity
in interface IBlockAccess
public void setTileEntity(int p_147455_1_, int p_147455_2_, int p_147455_3_, TileEntity p_147455_4_)
public void removeTileEntity(int p_147475_1_, int p_147475_2_, int p_147475_3_)
public void func_147457_a(TileEntity p_147457_1_)
public boolean func_147469_q(int p_147469_1_, int p_147469_2_, int p_147469_3_)
public static boolean doesBlockHaveSolidTopSurface(IBlockAccess p_147466_0_, int p_147466_1_, int p_147466_2_, int p_147466_3_)
public boolean isBlockNormalCubeDefault(int p_147445_1_, int p_147445_2_, int p_147445_3_, boolean p_147445_4_)
public void calculateInitialSkylight()
public void setAllowedSpawnTypes(boolean par1, boolean par2)
public void tick()
public void calculateInitialWeatherBody()
protected void updateWeather()
public void updateWeatherBody()
protected void setActivePlayerChunksAndCheckLight()
protected void func_147467_a(int p_147467_1_, int p_147467_2_, Chunk p_147467_3_)
protected void func_147456_g()
public boolean isBlockFreezable(int par1, int par2, int par3)
public boolean isBlockFreezableNaturally(int par1, int par2, int par3)
public boolean canBlockFreeze(int par1, int par2, int par3, boolean par4)
public boolean canBlockFreezeBody(int par1, int par2, int par3, boolean par4)
public boolean func_147478_e(int p_147478_1_, int p_147478_2_, int p_147478_3_, boolean p_147478_4_)
public boolean canSnowAtBody(int p_147478_1_, int p_147478_2_, int p_147478_3_, boolean p_147478_4_)
public boolean func_147451_t(int p_147451_1_, int p_147451_2_, int p_147451_3_)
public boolean updateLightByType(EnumSkyBlock p_147463_1_, int p_147463_2_, int p_147463_3_, int p_147463_4_)
public boolean tickUpdates(boolean par1)
public java.util.List getPendingBlockUpdates(Chunk par1Chunk, boolean par2)
public java.util.List getEntitiesWithinAABBExcludingEntity(Entity par1Entity, AxisAlignedBB par2AxisAlignedBB)
public java.util.List getEntitiesWithinAABBExcludingEntity(Entity par1Entity, AxisAlignedBB par2AxisAlignedBB, IEntitySelector par3IEntitySelector)
public java.util.List getEntitiesWithinAABB(java.lang.Class par1Class, AxisAlignedBB par2AxisAlignedBB)
public java.util.List selectEntitiesWithinAABB(java.lang.Class par1Class, AxisAlignedBB par2AxisAlignedBB, IEntitySelector par3IEntitySelector)
public Entity findNearestEntityWithinAABB(java.lang.Class par1Class, AxisAlignedBB par2AxisAlignedBB, Entity par3Entity)
public abstract Entity getEntityByID(int var1)
public java.util.List getLoadedEntityList()
public void markTileEntityChunkModified(int p_147476_1_, int p_147476_2_, int p_147476_3_, TileEntity p_147476_4_)
public int countEntities(java.lang.Class par1Class)
public void addLoadedEntities(java.util.List par1List)
public void unloadEntities(java.util.List par1List)
public boolean canPlaceEntityOnSide(Block p_147472_1_, int p_147472_2_, int p_147472_3_, int p_147472_4_, boolean p_147472_5_, int p_147472_6_, Entity p_147472_7_, ItemStack p_147472_8_)
public PathEntity getPathEntityToEntity(Entity par1Entity, Entity par2Entity, float par3, boolean par4, boolean par5, boolean par6, boolean par7)
public PathEntity getEntityPathToXYZ(Entity par1Entity, int par2, int par3, int par4, float par5, boolean par6, boolean par7, boolean par8, boolean par9)
public int isBlockProvidingPowerTo(int par1, int par2, int par3, int par4)
isBlockProvidingPowerTo
in interface IBlockAccess
public int getBlockPowerInput(int par1, int par2, int par3)
public boolean getIndirectPowerOutput(int par1, int par2, int par3, int par4)
public int getIndirectPowerLevelTo(int par1, int par2, int par3, int par4)
public boolean isBlockIndirectlyGettingPowered(int par1, int par2, int par3)
public int getStrongestIndirectPower(int par1, int par2, int par3)
public EntityPlayer getClosestPlayerToEntity(Entity par1Entity, double par2)
public EntityPlayer getClosestPlayer(double par1, double par3, double par5, double par7)
public EntityPlayer getClosestVulnerablePlayerToEntity(Entity par1Entity, double par2)
public EntityPlayer getClosestVulnerablePlayer(double par1, double par3, double par5, double par7)
public EntityPlayer getPlayerEntityByName(java.lang.String par1Str)
public void sendQuittingDisconnectingPacket()
public void checkSessionLock() throws MinecraftException
MinecraftException
public void func_82738_a(long par1)
public long getSeed()
public long getTotalWorldTime()
public long getWorldTime()
public void setWorldTime(long par1)
public ChunkCoordinates getSpawnPoint()
public void setSpawnLocation(int par1, int par2, int par3)
public void joinEntityInSurroundings(Entity par1Entity)
public boolean canMineBlock(EntityPlayer par1EntityPlayer, int par2, int par3, int par4)
public boolean canMineBlockBody(EntityPlayer par1EntityPlayer, int par2, int par3, int par4)
public void setEntityState(Entity par1Entity, byte par2)
public IChunkProvider getChunkProvider()
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_)
public ISaveHandler getSaveHandler()
public WorldInfo getWorldInfo()
public GameRules getGameRules()
public void updateAllPlayersSleepingFlag()
public float getWeightedThunderStrength(float par1)
public void setThunderStrength(float p_147442_1_)
public float getRainStrength(float par1)
public void setRainStrength(float par1)
public boolean isThundering()
public boolean isRaining()
public boolean canLightningStrikeAt(int par1, int par2, int par3)
public boolean isBlockHighHumidity(int par1, int par2, int par3)
public void setItemData(java.lang.String par1Str, WorldSavedData par2WorldSavedData)
public WorldSavedData loadItemData(java.lang.Class par1Class, java.lang.String par2Str)
public int getUniqueDataId(java.lang.String par1Str)
public void playBroadcastSound(int par1, int par2, int par3, int par4, int par5)
public void playAuxSFX(int par1, int par2, int par3, int par4, int par5)
public void playAuxSFXAtEntity(EntityPlayer par1EntityPlayer, int par2, int par3, int par4, int par5, int par6)
public int getHeight()
getHeight
in interface IBlockAccess
public int getActualHeight()
public java.util.Random setRandomSeed(int par1, int par2, int par3)
public ChunkPosition findClosestStructure(java.lang.String p_147440_1_, int p_147440_2_, int p_147440_3_, int p_147440_4_)
public boolean extendedLevelsInChunkCache()
extendedLevelsInChunkCache
in interface IBlockAccess
public double getHorizon()
public CrashReportCategory addWorldInfoToCrashReport(CrashReport par1CrashReport)
public void destroyBlockInWorldPartially(int p_147443_1_, int p_147443_2_, int p_147443_3_, int p_147443_4_, int p_147443_5_)
public Vec3Pool getWorldVec3Pool()
getWorldVec3Pool
in interface IBlockAccess
public java.util.Calendar getCurrentDate()
public void makeFireworks(double par1, double par3, double par5, double par7, double par9, double par11, NBTTagCompound par13NBTTagCompound)
public Scoreboard getScoreboard()
public void func_147453_f(int p_147453_1_, int p_147453_2_, int p_147453_3_, Block p_147453_4_)
public float func_147462_b(double p_147462_1_, double p_147462_3_, double p_147462_5_)
public float func_147473_B(int p_147473_1_, int p_147473_2_, int p_147473_3_)
public void func_147450_X()
public void addTileEntity(TileEntity entity)
entity
- The TileEntity to be added.public boolean isSideSolid(int x, int y, int z, ForgeDirection side)
x
- Block X Positiony
- Block Y Positionz
- Block Z Positionside
- The Side in questionpublic boolean isSideSolid(int x, int y, int z, ForgeDirection side, boolean _default)
isSideSolid
in interface IBlockAccess
x
- Block X Positiony
- Block Y Positionz
- Block Z Positionside
- The Side in question_default
- The default to return if the block doesn't exist.public com.google.common.collect.ImmutableSetMultimap<ChunkCoordIntPair,ForgeChunkManager.Ticket> getPersistentChunks()
public int getBlockLightOpacity(int x, int y, int z)
x
- X positiony
- Y Positionz
- Z Positionpublic int countEntities(EnumCreatureType type, boolean forSpawnCount)