Class World

java.lang.Object
net.minecraft.src.World
All Implemented Interfaces:
IBlockAccess
Direct Known Subclasses:
WorldClient, WorldServer

public abstract class World extends Object implements IBlockAccess
  • Field Details

    • scheduledUpdatesAreImmediate

      public boolean scheduledUpdatesAreImmediate
      boolean; if true updates scheduled by scheduleBlockUpdate happen immediately
    • loadedEntityList

      public List loadedEntityList
      A list of all Entities in all currently-loaded chunks
    • unloadedEntityList

      protected List unloadedEntityList
    • loadedTileEntityList

      public List loadedTileEntityList
      A list of all TileEntities in all currently-loaded chunks
    • playerEntities

      public List playerEntities
      Array list of players in the world.
    • weatherEffects

      public List weatherEffects
      a list of all the lightning entities
    • skylightSubtracted

      public int skylightSubtracted
      How much light is subtracted from full daylight
    • updateLCG

      protected int updateLCG
      Contains the current Linear Congruential Generator seed for block updates. Used with an A value of 3 and a C value of 0x3c6ef35f, producing a highly planar series of values ill-suited for choosing random blocks in a 16x128x16 field.
    • DIST_HASH_MAGIC

      protected final int DIST_HASH_MAGIC
      magic number used to generate fast random numbers for 3d distribution within a chunk
      See Also:
    • prevRainingStrength

      protected float prevRainingStrength
    • rainingStrength

      protected float rainingStrength
    • prevThunderingStrength

      protected float prevThunderingStrength
    • thunderingStrength

      protected float thunderingStrength
    • lastLightningBolt

      public int lastLightningBolt
      Set to 2 whenever a lightning bolt is generated in SSP. Decrements if > 0 in updateWeather(). Value appears to be unused.
    • difficultySetting

      public int difficultySetting
      Option > Difficulty setting (0 - 3)
    • rand

      public Random rand
      RNG for World.
    • provider

      public final WorldProvider provider
      The WorldProvider instance that World uses.
    • worldAccesses

      protected List worldAccesses
    • chunkProvider

      protected IChunkProvider chunkProvider
      Handles chunk operations and caching
    • saveHandler

      protected final ISaveHandler saveHandler
    • worldInfo

      public WorldInfo worldInfo
      holds information about a world (size on disk, time, spawn point, seed, ...)
    • findingSpawnPoint

      public boolean findingSpawnPoint
      Boolean that is set to true when trying to find a spawn point
    • mapStorage

      public MapStorage mapStorage
    • villageCollectionObj

      public final VillageCollection villageCollectionObj
    • theProfiler

      public final Profiler theProfiler
    • worldScoreboard

      protected Scoreboard worldScoreboard
    • spawnHostileMobs

      protected boolean spawnHostileMobs
      indicates if enemies are spawned or not
    • spawnPeacefulMobs

      protected boolean spawnPeacefulMobs
      A flag indicating whether we should spawn peaceful mobs.
    • activeChunksCoordsMap

      protected LongHashMap activeChunksCoordsMap
      populated by chunks that are within the view distance (default 8 chunks) of any player, the original spawn, or any other chunk loader
    • activeChunksCoordsList

      protected LinkedList<ChunkCoordIntPair> activeChunksCoordsList
      list of same coords in m_activeChunksCoordsMap
    • isRemote

      public boolean isRemote
      This is set to true for client worlds, and false for server worlds.
    • LOADED_CHUNKS_UPDATE_RANGE

      public static final int LOADED_CHUNKS_UPDATE_RANGE
      See Also:
  • Constructor Details

  • Method Details

    • getBiomeGenForCoords

      public BiomeGenBase getBiomeGenForCoords(int par1, int par2)
      Gets the biome for a given set of x/z coordinates
      Specified by:
      getBiomeGenForCoords in interface IBlockAccess
    • getWorldChunkManager

      public WorldChunkManager getWorldChunkManager()
    • createChunkProvider

      protected abstract IChunkProvider createChunkProvider()
      Creates the chunk provider for this world. Called in the constructor. Retrieves provider from worldProvider?
    • initialize

      protected void initialize(WorldSettings par1WorldSettings)
    • setSpawnLocation

      public void setSpawnLocation()
      Sets a new spawn location by finding an uncovered block at a random (x,z) location in the chunk.
    • getFirstUncoveredBlock

      public int getFirstUncoveredBlock(int par1, int par2)
      Returns the block ID of the first block at this (x,z) location with air above it, searching from sea level upwards.
    • getBlockId

      public int getBlockId(int par1, int par2, int par3)
      Returns the block ID at coords x,y,z
      Specified by:
      getBlockId in interface IBlockAccess
    • isAirBlock

      public boolean isAirBlock(int par1, int par2, int par3)
      Returns true if the block at the specified coordinates is empty
      Specified by:
      isAirBlock in interface IBlockAccess
    • blockHasTileEntity

      public boolean blockHasTileEntity(int par1, int par2, int par3)
      Checks if a block at a given position should have a tile entity.
    • blockGetRenderType

      public int blockGetRenderType(int par1, int par2, int par3)
      Returns the render type of the block at the given coordinate.
    • blockExists

      public boolean blockExists(int par1, int par2, int par3)
      Returns whether a block exists at world coordinates x, y, z
    • doChunksNearChunkExist

      public 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
    • checkChunksExist

      public 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. Args: minX, minY, minZ, maxX, maxY, maxZ
    • chunkExists

      protected boolean chunkExists(int par1, int par2)
      Returns whether a chunk exists at chunk coordinates x, y
    • getChunkFromBlockCoords

      public Chunk getChunkFromBlockCoords(int par1, int par2)
      Returns a chunk looked up by block coordinates. Args: x, z
    • getChunkFromChunkCoords

      public Chunk getChunkFromChunkCoords(int par1, int par2)
      Returns back a chunk looked up by chunk coordinates Args: x, y
    • setBlock

      public boolean setBlock(int par1, int par2, int par3, int par4, int par5, int par6)
      FCNOTE: Bit 1 notify neighbors. Bit 2 sends change to clients. Bit 4 seems to prevent a render update when called on client
    • getBlockMaterial

      public Material getBlockMaterial(int par1, int par2, int par3)
      Returns the block's material.
      Specified by:
      getBlockMaterial in interface IBlockAccess
    • getBlockMetadata

      public int getBlockMetadata(int par1, int par2, int par3)
      Returns the block metadata at coords x,y,z
      Specified by:
      getBlockMetadata in interface IBlockAccess
    • setBlockMetadataWithNotify

      public boolean setBlockMetadataWithNotify(int par1, int par2, int par3, int par4, int par5)
      FCNOTE: Bit 1 notify neighbors. Bit 2 sends change to clients. Bit 4 seems to prevent a render update when called on client
    • setBlockToAir

      public boolean setBlockToAir(int par1, int par2, int par3)
      Sets a block to 0 and notifies relevant systems with the block change Args: x, y, z
    • destroyBlock

      public boolean destroyBlock(int par1, int par2, int par3, boolean par4)
      Destroys a block and optionally drops items. Args: X, Y, Z, dropItems
    • setBlock

      public boolean setBlock(int par1, int par2, int par3, int par4)
      Sets a block and notifies relevant systems with the block change Args: x, y, z, blockID
    • markBlockForUpdate

      public void markBlockForUpdate(int par1, int par2, int par3)
      On the client, re-renders the block. On the server, sends the block to the client (which will re-render it only if the ID or MD changes), including the tile entity description packet if applicable. Args: x, y, z
    • notifyBlockChange

      public void notifyBlockChange(int par1, int par2, int par3, int par4)
      The block type change and need to notify other systems Args: x, y, z, blockID
    • markBlocksDirtyVertical

      public void markBlocksDirtyVertical(int par1, int par2, int par3, int par4)
      marks a vertical line of blocks as dirty
    • markBlockRangeForRenderUpdate

      public void markBlockRangeForRenderUpdate(int par1, int par2, int par3, int par4, int par5, int par6)
      On the client, re-renders all blocks in this range, inclusive. On the server, does nothing. Args: min x, min y, min z, max x, max y, max z
    • notifyBlocksOfNeighborChange

      public void notifyBlocksOfNeighborChange(int par1, int par2, int par3, int par4)
      Notifies neighboring blocks that this specified block changed Args: x, y, z, blockID
    • notifyBlocksOfNeighborChange

      public void notifyBlocksOfNeighborChange(int par1, int par2, int par3, int par4, int par5)
      Calls notifyBlockOfNeighborChange on adjacent blocks, except the one on the given side. Args: X, Y, Z, changingBlockID, side
    • notifyBlockOfNeighborChange

      public void notifyBlockOfNeighborChange(int par1, int par2, int par3, int par4)
      Notifies a block that one of its neighbor change to the specified type Args: x, y, z, blockID
    • isBlockTickScheduledThisTick

      public boolean isBlockTickScheduledThisTick(int par1, int par2, int par3, int par4)
      Returns true if the given block will receive a scheduled tick in this tick. Args: X, Y, Z, blockID
    • canBlockSeeTheSky

      public boolean canBlockSeeTheSky(int par1, int par2, int par3)
      Checks if the specified block is able to see the sky
    • getFullBlockLightValue

      public int getFullBlockLightValue(int par1, int par2, int par3)
      Does the same as getBlockLightValue_do but without checking if its not a normal block
    • getBlockLightValue

      public int getBlockLightValue(int par1, int par2, int par3)
      Gets the light value of a block location
    • getBlockLightValue_do

      public int getBlockLightValue_do(int par1, int par2, int par3, boolean par4)
      Gets the light value of a block location. This is the actual function that gets the value and has a bool flag that indicates if its a half step block to get the maximum light value of a direct neighboring block (left, right, forward, back, and up)
    • getHeightValue

      public int getHeightValue(int par1, int par2)
      Returns the y coordinate with a block in it at this x, z coordinate
    • getChunkHeightMapMinimum

      public int getChunkHeightMapMinimum(int par1, int par2)
      Gets the heightMapMinimum field of the given chunk, or 0 if the chunk is not loaded. Coords are in blocks. Args: X, Z
    • getSkyBlockTypeBrightness

      public 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. Brightness for SkyBlock.Block is yellowish and independent.
    • getSavedLightValue

      public int getSavedLightValue(EnumSkyBlock par1EnumSkyBlock, int par2, int par3, int par4)
      Returns saved light value without taking into account the time of day. Either looks in the sky light map or block light map based on the enumSkyBlock arg.
    • setLightValue

      public 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. Args: enumSkyBlock, x, y, z, lightValue
    • markBlockForRenderUpdate

      public void markBlockForRenderUpdate(int par1, int par2, int par3)
      On the client, re-renders this block. On the server, does nothing. Used for lighting updates.
    • getLightBrightnessForSkyBlocks

      public int getLightBrightnessForSkyBlocks(int par1, int par2, int par3, int par4)
      Any Light rendered on a 1.8 Block goes through here
      Specified by:
      getLightBrightnessForSkyBlocks in interface IBlockAccess
    • getBrightness

      public float getBrightness(int par1, int par2, int par3, int par4)
      Specified by:
      getBrightness in interface IBlockAccess
    • getLightBrightness

      public 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). Args: x, y, z
      Specified by:
      getLightBrightness in interface IBlockAccess
    • isDaytime

      public boolean isDaytime()
      Checks whether its daytime by seeing if the light subtracted from the skylight is less than 4
    • clip

      public MovingObjectPosition clip(Vec3 par1Vec3, Vec3 par2Vec3)
      Performs a raycast against all blocks in the world except liquids.
    • clip

      public MovingObjectPosition clip(Vec3 par1Vec3, Vec3 par2Vec3, boolean par3)
      Performs a raycast against all blocks in the world, and optionally liquids.
    • playSoundAtEntity

      public void playSoundAtEntity(Entity par1Entity, String par2Str, float par3, float par4)
      Plays a sound at the entity's position. Args: entity, sound, volume (relative to 1.0), and frequency (or pitch, also relative to 1.0).
    • playSoundToNearExcept

      public void playSoundToNearExcept(EntityPlayer par1EntityPlayer, String par2Str, float par3, float par4)
      Plays sound to all near players except the player reference given
    • playSoundEffect

      public void playSoundEffect(double par1, double par3, double par5, String par7Str, float par8, float par9)
      Play a sound effect. Many many parameters for this function. Not sure what they do, but a classic call is : (double)i + 0.5D, (double)j + 0.5D, (double)k + 0.5D, 'random.door_open', 1.0F, world.rand.nextFloat() * 0.1F + 0.9F with i,j,k position of the block.
    • playSound

      public void playSound(double par1, double par3, double par5, String par7Str, float par8, float par9, boolean par10)
      par8 is loudness, all pars passed to minecraftInstance.sndManager.playSound
    • playRecord

      public void playRecord(String par1Str, int par2, int par3, int par4)
      Plays a record at the specified coordinates of the specified name. Args: recordName, x, y, z
    • spawnParticle

      public void spawnParticle(String par1Str, double par2, double par4, double par6, double par8, double par10, double par12)
      Spawns a particle. Args particleName, x, y, z, velX, velY, velZ
    • addWeatherEffect

      public boolean addWeatherEffect(Entity par1Entity)
      adds a lightning bolt to the list of lightning bolts in this world.
    • spawnEntityInWorld

      public boolean spawnEntityInWorld(Entity par1Entity)
      Called to place all entities as part of a world
    • onEntityAdded

      protected void onEntityAdded(Entity par1Entity)
    • onEntityRemoved

      protected void onEntityRemoved(Entity par1Entity)
    • removeEntity

      public void removeEntity(Entity par1Entity)
      Schedule the entity for removal during the next tick. Marks the entity dead in anticipation.
    • removePlayerEntityDangerously

      public void removePlayerEntityDangerously(Entity par1Entity)
      Do NOT use this method to remove normal entities- use normal removeEntity
    • addWorldAccess

      public void addWorldAccess(IWorldAccess par1IWorldAccess)
      Adds a IWorldAccess to the list of worldAccesses
    • removeWorldAccess

      public void removeWorldAccess(IWorldAccess par1IWorldAccess)
      Removes a worldAccess from the worldAccesses object
    • getCollidingBoundingBoxes

      public List getCollidingBoundingBoxes(Entity par1Entity, AxisAlignedBB par2AxisAlignedBB)
      Returns a list of bounding boxes that collide with aabb excluding the passed in entity's collision. Args: entity, aabb
    • getCollidingBlockBounds

      public List getCollidingBlockBounds(AxisAlignedBB par1AxisAlignedBB)
      calculates and returns a list of colliding bounding boxes within a given AABB
    • calculateSkylightSubtracted

      public int calculateSkylightSubtracted(float par1)
      Returns the amount of skylight subtracted for the current time
    • getSunBrightness

      public float getSunBrightness(float par1)
      Returns the sun brightness - checks time of day, rain and thunder
    • getSkyColor

      public Vec3 getSkyColor(Entity par1Entity, float par2)
      Calculates the color for the skybox
    • getCelestialAngle

      public float getCelestialAngle(float par1)
      calls calculateCelestialAngle
    • getMoonPhase

      public int getMoonPhase()
    • getCurrentMoonPhaseFactor

      public float getCurrentMoonPhaseFactor()
      gets the current fullness of the moon expressed as a float between 1.0 and 0.0, in steps of .25
    • getCelestialAngleRadians

      public float getCelestialAngleRadians(float par1)
      Return getCelestialAngle()*2*PI
    • getCloudColour

      public Vec3 getCloudColour(float par1)
    • getFogColor

      public Vec3 getFogColor(float par1)
      Returns vector(ish) with R/G/B for fog
    • getPrecipitationHeight

      public int getPrecipitationHeight(int par1, int par2)
      Gets the height to which rain/snow will fall. Calculates it if not already stored.
    • getTopSolidOrLiquidBlock

      public int getTopSolidOrLiquidBlock(int par1, int par2)
      Finds the highest block on the x, z coordinate that is solid and returns its y coord. Args x, z // +++START EDIT+++ FCNOTE: Despite name, actually returns the block ABOVE the top one, and does not count liquids // ---END EDIT---
    • getActualTopSolidOrLiquidBlockHeight

      public int getActualTopSolidOrLiquidBlockHeight(int x, int z)
    • getStarBrightness

      public float getStarBrightness(float par1)
      How bright are stars in the sky
    • 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)
    • scheduleBlockUpdateWithPriority

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

      public 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. Called when the chunk is loaded.
    • updateEntities

      public void updateEntities()
      Updates (and cleans up) entities and tile entities
    • addTileEntity

      public void addTileEntity(Collection par1Collection)
    • updateEntity

      public void updateEntity(Entity par1Entity)
      Will update the entity in the world if the chunk the entity is in is currently loaded. Args: entity
    • 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 // +++START EDIT+++ FCNOTE: 2nd parameter is more "bOnlyUpdateInLoadedChunks" rather than what is said above The "OptionalForce" in the function name refers to forcing the update, not a physical force // ---END EDIT---
    • checkNoEntityCollision

      public boolean checkNoEntityCollision(AxisAlignedBB par1AxisAlignedBB)
      Returns true if there are no solid, live entities in the specified AxisAlignedBB
    • checkNoEntityCollision

      public boolean checkNoEntityCollision(AxisAlignedBB par1AxisAlignedBB, Entity par2Entity)
      Returns true if there are no solid, live entities in the specified AxisAlignedBB, excluding the given entity
    • checkBlockCollision

      public boolean checkBlockCollision(AxisAlignedBB par1AxisAlignedBB)
      Returns true if there are any blocks in the region constrained by an AxisAlignedBB
    • isAnyLiquid

      public boolean isAnyLiquid(AxisAlignedBB par1AxisAlignedBB)
      Returns if any of the blocks within the aabb are liquids. Args: aabb
    • isBoundingBoxBurning

      public boolean isBoundingBoxBurning(Entity entity)
      Returns whether or not the given bounding box is on fire or not
    • handleMaterialAcceleration

      public boolean handleMaterialAcceleration(AxisAlignedBB par1AxisAlignedBB, Material par2Material, Entity par3Entity)
      handles the acceleration of an object whilst in water. Not sure if it is used elsewhere.
    • isMaterialInBB

      public boolean isMaterialInBB(AxisAlignedBB par1AxisAlignedBB, Material par2Material)
      Returns true if the given bounding box contains the given material
    • isAABBInMaterial

      public boolean isAABBInMaterial(AxisAlignedBB par1AxisAlignedBB, Material par2Material)
      checks if the given AABB is in the material given. Used while swimming.
    • createExplosion

      public Explosion createExplosion(Entity par1Entity, double par2, double par4, double par6, float par8, boolean par9)
      Creates an explosion. Args: entity, x, y, z, strength
    • 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)
    • getBlockDensity

      public float getBlockDensity(Vec3 par1Vec3, AxisAlignedBB par2AxisAlignedBB)
      Gets the percentage of real blocks within a bounding box, along a specified vector.
    • extinguishFire

      public 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. Args: Player, X,Y,Z, blockDirection
    • getDebugLoadedEntities

      public String getDebugLoadedEntities()
      This string is 'All: (number of loaded entities)' Viewable by press ing F3
    • getProviderName

      public String getProviderName()
      Returns the name of the current chunk provider, by calling chunkprovider.makeString()
    • getBlockTileEntity

      public TileEntity getBlockTileEntity(int par1, int par2, int par3)
      Returns the TileEntity associated with a given block in X,Y,Z coordinates, or null if no TileEntity exists
      Specified by:
      getBlockTileEntity in interface IBlockAccess
    • setBlockTileEntity

      public void setBlockTileEntity(int par1, int par2, int par3, TileEntity par4TileEntity)
      Sets the TileEntity for a given block in X, Y, Z coordinates
    • removeBlockTileEntity

      public void removeBlockTileEntity(int par1, int par2, int par3)
      Removes the TileEntity for a given block in X,Y,Z coordinates
    • markTileEntityForDespawn

      public void markTileEntityForDespawn(TileEntity par1TileEntity)
      adds tile entity to despawn list (renamed from markEntityForDespawn)
    • isBlockOpaqueCube

      public boolean isBlockOpaqueCube(int par1, int par2, int par3)
      Returns true if the block at the specified coordinates is an opaque cube. Args: x, y, z
      Specified by:
      isBlockOpaqueCube in interface IBlockAccess
    • isBlockNormalCube

      public boolean isBlockNormalCube(int par1, int par2, int par3)
      Indicate if a material is a normal solid opaque cube.
      Specified by:
      isBlockNormalCube in interface IBlockAccess
    • canBlockSuffocateEntity

      public boolean canBlockSuffocateEntity(int par1, int par2, int par3)
    • isBlockFullCube

      public boolean isBlockFullCube(int par1, int par2, int par3)
    • isBlockNormalCubeDefault

      public boolean isBlockNormalCubeDefault(int par1, int par2, int par3, boolean par4)
      // +++START EDIT+++ // ---END EDIT--- Checks if the block is a solid, normal cube. If the chunk does not exist, or is not loaded, it returns the boolean parameter.
    • isBlockRedstoneConductor

      public boolean isBlockRedstoneConductor(int x, int y, int z)
      Indicate if a block should conduct redstone power
    • calculateInitialSkylight

      public void calculateInitialSkylight()
      Called on construction of the World class to setup the initial skylight values
    • setAllowedSpawnTypes

      public void setAllowedSpawnTypes(boolean par1, boolean par2)
      Set which types of mobs are allowed to spawn (peaceful vs hostile).
    • tick

      public void tick()
      Runs a single tick for the world
    • commandToggleDownfall

      public void commandToggleDownfall()
    • setActivePlayerChunksAndCheckLight

      protected void setActivePlayerChunksAndCheckLight()
    • moodSoundAndLightCheck

      protected void moodSoundAndLightCheck(int par1, int par2, Chunk par3Chunk)
    • tickBlocksAndAmbiance

      protected void tickBlocksAndAmbiance()
      plays random cave ambient sounds and runs updateTick on random blocks within each chunk in the vacinity of a player
    • isBlockFreezable

      public boolean isBlockFreezable(int par1, int par2, int par3)
      checks to see if a given block is both water and is cold enough to freeze
    • isBlockFreezableNaturally

      public 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
    • canBlockFreeze

      public 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
    • canSnowAt

      public boolean canSnowAt(int x, int y, int z)
      Tests whether or not snow can be placed at a given location
    • updateAllLightTypes

      public void updateAllLightTypes(int par1, int par2, int par3)
    • updateLightByType

      public void updateLightByType(EnumSkyBlock par1EnumSkyBlock, int par2, int par3, int par4)
    • tickUpdates

      public boolean tickUpdates(boolean par1)
      Runs through the list of updates to run and ticks them
    • getPendingBlockUpdates

      public List getPendingBlockUpdates(Chunk par1Chunk, boolean par2)
    • getEntitiesWithinAABBExcludingEntity

      public List getEntitiesWithinAABBExcludingEntity(Entity par1Entity, AxisAlignedBB par2AxisAlignedBB)
      Will get all entities within the specified AABB excluding the one passed into it. Args: entityToExclude, aabb
    • getEntitiesWithinAABBExcludingEntity

      public List getEntitiesWithinAABBExcludingEntity(Entity par1Entity, AxisAlignedBB par2AxisAlignedBB, IEntitySelector par3IEntitySelector)
    • getEntitiesWithinAABB

      public List getEntitiesWithinAABB(Class par1Class, AxisAlignedBB par2AxisAlignedBB)
      Returns all entities of the specified class type which intersect with the AABB. Args: entityClass, aabb
    • selectEntitiesWithinAABB

      public List selectEntitiesWithinAABB(Class par1Class, AxisAlignedBB par2AxisAlignedBB, IEntitySelector par3IEntitySelector)
    • findNearestEntityWithinAABB

      public Entity findNearestEntityWithinAABB(Class par1Class, AxisAlignedBB par2AxisAlignedBB, Entity par3Entity)
    • getEntityByID

      public abstract Entity getEntityByID(int var1)
      Returns the Entity with the given ID, or null if it doesn't exist in this World.
    • getLoadedEntityList

      public List getLoadedEntityList()
      Accessor for world Loaded Entity List
    • markTileEntityChunkModified

      public void markTileEntityChunkModified(int par1, int par2, int par3, TileEntity par4TileEntity)
      Args: X, Y, Z, tile entity Marks the chunk the tile entity is in as modified. This is essential as chunks that are not marked as modified may be rolled back when exiting the game.
    • addLoadedEntities

      public void addLoadedEntities(List par1List)
      // +++START EDIT+++ // ---END EDIT--- adds entities to the loaded entities list, and loads thier skins.
    • unloadEntities

      public void unloadEntities(List par1List)
      Adds a list of entities to be unloaded on the next pass of World.updateEntities()
    • canPlaceEntityOnSide

      public boolean canPlaceEntityOnSide(int par1, int par2, int par3, int par4, boolean par5, int par6, Entity par7Entity, ItemStack par8ItemStack)
      Returns true if the given Entity can be placed on the given side of the given block position.
    • getPathEntityToEntity

      public PathEntity getPathEntityToEntity(Entity par1Entity, Entity par2Entity, float par3, boolean par4, boolean par5, boolean par6, boolean par7)
    • getEntityPathToXYZ

      public PathEntity getEntityPathToXYZ(Entity par1Entity, int par2, int par3, int par4, float par5, boolean par6, boolean par7, boolean par8, boolean par9)
    • isBlockProvidingPowerTo

      public int isBlockProvidingPowerTo(int par1, int par2, int par3, int par4)
      Is this block powering in the specified direction Args: x, y, z, direction
      Specified by:
      isBlockProvidingPowerTo in interface IBlockAccess
    • getBlockPowerInput

      public int getBlockPowerInput(int par1, int par2, int par3)
      Returns the highest redstone signal strength powering the given block. Args: X, Y, Z.
    • getIndirectPowerOutput

      public 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. Args: X, Y, Z, direction
    • getIndirectPowerLevelTo

      public int getIndirectPowerLevelTo(int par1, int par2, int par3, int par4)
      Gets the power level from a certain block face. Args: x, y, z, direction
    • isBlockIndirectlyGettingPowered

      public 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. Used by items like TNT or Doors so they don't have redstone going straight into them. Args: x, y, z
    • getStrongestIndirectPower

      public int getStrongestIndirectPower(int par1, int par2, int par3)
    • getClosestPlayerToEntity

      public 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). Args: entity, dist
    • getClosestPlayer

      public 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). Args: x, y, z, dist
    • getClosestVulnerablePlayerToEntity

      public EntityPlayer getClosestVulnerablePlayerToEntity(Entity par1Entity, double par2)
      Returns the closest vulnerable player to this entity within the given radius, or null if none is found
    • getClosestVulnerablePlayer

      public 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.
    • getPlayerEntityByName

      public EntityPlayer getPlayerEntityByName(String par1Str)
      Find a player by name in this world.
    • sendQuittingDisconnectingPacket

      public void sendQuittingDisconnectingPacket()
      If on MP, sends a quitting packet.
    • checkSessionLock

      public void checkSessionLock() throws MinecraftException
      Checks whether the session lock file was modified by another process
      Throws:
      MinecraftException
    • func_82738_a

      public void func_82738_a(long par1)
    • getSeed

      public long getSeed()
      Retrieve the world seed from level.dat
    • getTotalWorldTime

      public long getTotalWorldTime()
    • getWorldTime

      public long getWorldTime()
    • setWorldTime

      public void setWorldTime(long par1)
      Sets the world time.
    • getSpawnPoint

      public ChunkCoordinates getSpawnPoint()
      Returns the coordinates of the spawn point
    • setSpawnLocation

      public void setSpawnLocation(int par1, int par2, int par3)
    • joinEntityInSurroundings

      public void joinEntityInSurroundings(Entity par1Entity)
      spwans an entity and loads surrounding chunks
    • 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.
    • setEntityState

      public void setEntityState(Entity par1Entity, byte par2)
      sends a Packet 38 (Entity Status) to all tracked players of that entity
    • getChunkProvider

      public IChunkProvider getChunkProvider()
      gets the IChunkProvider this world uses.
    • 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
    • getSaveHandler

      public ISaveHandler getSaveHandler()
      Returns this world's current save handler
    • getWorldInfo

      public WorldInfo getWorldInfo()
      Gets the World's WorldInfo instance
    • getGameRules

      public GameRules getGameRules()
      Gets the GameRules instance.
    • updateAllPlayersSleepingFlag

      public void updateAllPlayersSleepingFlag()
      Updates the flag that indicates whether or not all players in the world are sleeping.
    • getWeightedThunderStrength

      public float getWeightedThunderStrength(float par1)
    • getRainStrength

      public float getRainStrength(float par1)
      Not sure about this actually. Reverting this one myself.
    • setRainStrength

      public void setRainStrength(float par1)
    • isThundering

      public boolean isThundering()
      Returns true if the current thunder strength (weighted with the rain strength) is greater than 0.9
    • isRaining

      public boolean isRaining()
      Returns true if the current rain strength is greater than 0.2
    • canLightningStrikeAt

      public boolean canLightningStrikeAt(int par1, int par2, int par3)
      FCNOTE: Terribly named. Was actually whether a specific block is currently being rained on Deprecated through sending message to avoid modifying vanilla classes that use it while still ensuring that it isn't actually called.
    • isBlockHighHumidity

      public 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
    • setItemData

      public void setItemData(String par1Str, WorldSavedData par2WorldSavedData)
      Assigns the given String id to the given MapDataBase using the MapStorage, removing any existing ones of the same id.
    • loadItemData

      public WorldSavedData loadItemData(Class par1Class, 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. args: Class to instantiate, String dataid
    • getUniqueDataId

      public int getUniqueDataId(String par1Str)
      Returns an unique new data id from the MapStorage for the given prefix and saves the idCounts map to the 'idcounts' file.
    • func_82739_e

      public void func_82739_e(int par1, int par2, int par3, int par4, int par5)
      FCNOTE: Sends an auxSFX to all players, regardless of distance to the effect. Good for stuff like long range wolf howls and thunder claps.
    • playAuxSFX

      public void playAuxSFX(int par1, int par2, int par3, int par4, int par5)
      See description for playAuxSFX.
    • playAuxSFXAtEntity

      public void playAuxSFXAtEntity(EntityPlayer par1EntityPlayer, int par2, int par3, int par4, int par5, int par6)
      See description for playAuxSFX.
    • getHeight

      public int getHeight()
      Returns current world height.
      Specified by:
      getHeight in interface IBlockAccess
    • getActualHeight

      public int getActualHeight()
      Returns current world height.
    • getMinecartSoundUpdater

      public IUpdatePlayerListBox getMinecartSoundUpdater(EntityMinecart par1EntityMinecart)
    • setRandomSeed

      public Random setRandomSeed(int par1, int par2, int par3)
      puts the World Random seed to a specific state dependant on the inputs
    • findClosestStructure

      public ChunkPosition findClosestStructure(String par1Str, int par2, int par3, int par4)
      Returns the location of the closest structure of the specified type. If not found returns null.
    • findClosestStructureAll

      public List<ChunkPosition> findClosestStructureAll(String par1Str, int par2, int par3, int par4, int chunkSearchRadius, int minAbandonment)
      Returns the location of the closest structure of the specified type. If not found returns null.
    • extendedLevelsInChunkCache

      public boolean extendedLevelsInChunkCache()
      set by !chunk.getAreLevelsEmpty
      Specified by:
      extendedLevelsInChunkCache in interface IBlockAccess
    • getHorizon

      public double getHorizon()
      Returns horizon height for use in rendering the sky.
    • addWorldInfoToCrashReport

      public CrashReportCategory addWorldInfoToCrashReport(CrashReport par1CrashReport)
      Adds some basic stats of the world to the given crash report.
    • destroyBlockInWorldPartially

      public void destroyBlockInWorldPartially(int par1, int par2, int par3, int par4, int par5)
      Starts (or continues) destroying a block with given ID at the given coordinates for the given partially destroyed value
    • getWorldVec3Pool

      public Vec3Pool getWorldVec3Pool()
      Return the Vec3Pool object for this world.
      Specified by:
      getWorldVec3Pool in interface IBlockAccess
    • getCurrentDate

      public Calendar getCurrentDate()
      returns a calendar object containing the current date
    • func_92088_a

      public void func_92088_a(double par1, double par3, double par5, double par7, double par9, double par11, NBTTagCompound par13NBTTagCompound)
    • getScoreboard

      public Scoreboard getScoreboard()
    • func_96440_m

      public void func_96440_m(int par1, int par2, int par3, int par4)
    • getWorldLogAgent

      public ILogAgent getWorldLogAgent()
    • installationIntegrityTest

      public static boolean installationIntegrityTest()
    • modSpecificTick

      public void modSpecificTick()
    • isUpdateScheduledForBlock

      public boolean isUpdateScheduledForBlock(int i, int j, int k, int iBlockID)
    • isUpdatePendingThisTickForBlock

      public boolean isUpdatePendingThisTickForBlock(int i, int j, int k, int iBlockID)
      Wrapper function for clarity: while ticks are being processed they are not still scheduled, but are in a separate list for this tick.
    • setBlockAndMetadataWithNotify

      public boolean setBlockAndMetadataWithNotify(int i, int j, int k, int iBlockID, int iMetadata)
    • setBlockWithNotify

      public boolean setBlockWithNotify(int i, int j, int k, int iBlockID)
    • SetBlockMetadataWithNotify

      public boolean SetBlockMetadataWithNotify(int i, int j, int k, int iMetadata, int iNotifyBitField)
      Alias to avoid inconsistent naming between client and server Bit 1 notify neighbors. Bit 2 sends change to clients. Bit 4 seems to prevent a render update when called on client
    • setBlockMetadata

      public boolean setBlockMetadata(int i, int j, int k, int iMetadata)
    • setBlockMetadataWithNotify

      public boolean setBlockMetadataWithNotify(int i, int j, int k, int iMetadata)
    • setBlockMetadataWithClient

      public boolean setBlockMetadataWithClient(int i, int j, int k, int iMetadata)
    • setBlockMetadataWithNotifyNoClient

      public boolean setBlockMetadataWithNotifyNoClient(int i, int j, int k, int iMetadata)
    • setBlockAndMetadata

      public boolean setBlockAndMetadata(int i, int j, int k, int iBlockID, int iMetadata)
    • isBlockGettingPowered

      public boolean isBlockGettingPowered(int i, int j, int k)
    • rayTraceBlocks_do_do

      public MovingObjectPosition rayTraceBlocks_do_do(Vec3 startVec, Vec3 endVec, boolean bHitFluidSources, boolean bIgnoreNonMovementBlockingBlocks)
    • mouseOverRayTrace

      public MovingObjectPosition mouseOverRayTrace(Vec3 startVec, Vec3 endVec)
      Ray tracing with consideration for blocks that extend past their vertical bounds, like with ground cover or weeds. Should only be used for mouse over at it can result in funky collision resolution.
    • checkLocationForMouseOverRayTrace

      public MovingObjectPosition checkLocationForMouseOverRayTrace(int i, int j, int k, Vec3 startVec, Vec3 endVec)
    • playSound

      public void playSound(double par1, double par3, double par5, String par7Str, float par8, float par9)
    • getClosestEntityMatchingCriteriaWithinRange

      public Entity getClosestEntityMatchingCriteriaWithinRange(double dSourcePosX, double dSourcePosY, double dSourcePosZ, double dRange, ClosestEntitySelectionCriteria criteria)
    • countEntitiesThatApplyToSpawnCap

      public int countEntitiesThatApplyToSpawnCap(Class classToCount)
    • getNumEntitiesThatApplyToSquidPossessionCap

      public int getNumEntitiesThatApplyToSquidPossessionCap()
    • notifyNearbyAnimalsOfPlayerBlockAddOrRemove

      public void notifyNearbyAnimalsOfPlayerBlockAddOrRemove(EntityPlayer player, Block block, int i, int j, int k)
    • getBlockNaturalLightValue

      public int getBlockNaturalLightValue(int i, int j, int k)
    • getBlockNaturalLightValueMaximum

      public int getBlockNaturalLightValueMaximum(int i, int j, int k)
    • getNaturalLightBrightness

      public float getNaturalLightBrightness(int i, int j, int k)
    • getBlockLightValueNoSky

      public int getBlockLightValueNoSky(int x, int y, int z)
    • doesBlockHaveSolidTopSurface

      public boolean doesBlockHaveSolidTopSurface(int i, int j, int k)
      Description copied from interface: IBlockAccess
      Returns true if the block at the given coordinate has a solid (buildable) top surface.
      Specified by:
      doesBlockHaveSolidTopSurface in interface IBlockAccess
    • computeOverworldSunBrightnessWithMoonPhases

      public float computeOverworldSunBrightnessWithMoonPhases()
    • isTheEndNigh

      public boolean isTheEndNigh()
    • getData

      public abstract <T> T getData(DataEntry.WorldDataEntry<T> entry)
    • setData

      public abstract <T> void setData(DataEntry.WorldDataEntry<T> entry, T value)
    • getAmbientBeaconEffectAtLocation

      public int getAmbientBeaconEffectAtLocation(String effectName, int locX, int locY, int locZ)
    • newExplosionNoFX

      public Explosion newExplosionNoFX(Entity par1Entity, double dPosX, double dPosY, double dPosZ, float fExplosionSize, boolean bCreatesFlames, boolean bDestroysBlocks)
      Copy of newExplosion() that suppresses the audio/visual effects
    • getClampedViewDistanceInChunks

      public int getClampedViewDistanceInChunks()
      The "view distance" is actually the range at which chunks are loaded, specified as a vanilla server parameter (default is 10 chunks).
    • getMobSpawnRangeInChunks

      public int getMobSpawnRangeInChunks()
    • getActiveChunkRangeInChunks

      public int getActiveChunkRangeInChunks()
      "Active" chunks handle stuff like random block updates (grass growing, etc.) and precipitation
    • updateActiveChunkMap

      protected void updateActiveChunkMap()
    • addEntityToActiveChunkMap

      protected void addEntityToActiveChunkMap(Entity entity)
    • addAreaAroundChunkToActiveChunkMap

      protected void addAreaAroundChunkToActiveChunkMap(int iChunkX, int iChunkZ)
    • clearActiveChunkMap

      protected void clearActiveChunkMap()
    • addToActiveChunkMap

      protected void addToActiveChunkMap(int iChunkX, int iChunkZ)
    • isChunkActive

      public boolean isChunkActive(int iChunkX, int iChunkZ)
    • isBlockPosActive

      public boolean isBlockPosActive(int i, int j, int k)
    • getActiveChunksCoordsList

      public LinkedList<ChunkCoordIntPair> getActiveChunksCoordsList()
    • updateWeather

      protected void updateWeather()
    • isRainingAtPos

      public boolean isRainingAtPos(int i, int j, int k)
    • isSnowingAtPos

      public boolean isSnowingAtPos(int i, int j, int k)
    • isPrecipitatingAtPos

      public boolean isPrecipitatingAtPos(int i, int j, int k)
    • getLocationTensionFactor

      public float getLocationTensionFactor(double par1, double par3, double par5)
      returns a float value that can be used to determine how likely something is to go awry in the area. It increases based on how long the player is within the vicinity, the lunar phase, and game difficulty. The value can be up to 1.5 on the highest difficulty, 1.0 otherwise.
    • getTensionFactorForBlock

      public float getTensionFactorForBlock(int par1, int par2, int par3)
      returns a float value that can be used to determine how likely something is to go awry in the area. It increases based on how long the player is within the vicinity, the lunar phase, and game difficulty. The value can be up to 1.5 on the highest difficulty, 1.0 otherwise.
    • isPrecipitatingAtPos

      public boolean isPrecipitatingAtPos(int i, int k)
    • canLightningStrikeAtPos

      public boolean canLightningStrikeAtPos(int i, int j, int k)
    • getModifiedPlayerTargetingDistance

      public double getModifiedPlayerTargetingDistance(EntityPlayer player, double targetDistance)
    • getDifficultyParameter

      public <T> T getDifficultyParameter(Class<? extends DifficultyParam<T>> param)