net.minecraft.world.chunk
Class EmptyChunk

java.lang.Object
  extended by net.minecraft.world.chunk.Chunk
      extended by net.minecraft.world.chunk.EmptyChunk

public class EmptyChunk
extends Chunk


Field Summary
 
Fields inherited from class net.minecraft.world.chunk.Chunk
chunkTileEntityMap, deferRender, entityLists, field_82912_p, hasEntities, heightMap, isChunkLoaded, isLit, isModified, isTerrainPopulated, lastSaveTime, precipitationHeightMap, updateSkylightColumns, worldObj, xPosition, zPosition
 
Constructor Summary
EmptyChunk(World par1World, int par2, int par3)
           
 
Method Summary
 void addEntity(Entity par1Entity)
          Adds an entity to the chunk.
 void addTileEntity(TileEntity par1TileEntity)
          Adds a TileEntity to a chunk
 boolean canBlockSeeTheSky(int par1, int par2, int par3)
          Returns whether is not a block above this one blocking sight to the sky (done via checking against the heightmap)
 void generateHeightMap()
           
 void generateSkylightMap()
          Generates the initial skylight map for the chunk upon generation or load.
 boolean getAreLevelsEmpty(int par1, int par2)
          Returns whether the ExtendedBlockStorages containing levels (in blocks) from arg 1 to arg 2 are fully empty (true) or not (false).
 int getBlockID(int par1, int par2, int par3)
          Return the ID of a block in the chunk.
 int getBlockLightOpacity(int par1, int par2, int par3)
           
 int getBlockLightValue(int par1, int par2, int par3, int par4)
          Gets the amount of light on a block taking into account sunlight
 int getBlockMetadata(int par1, int par2, int par3)
          Return the metadata corresponding to the given coordinates inside a chunk.
 TileEntity getChunkBlockTileEntity(int par1, int par2, int par3)
          Gets the TileEntity for a given block in this chunk
 void getEntitiesOfTypeWithinAAAB(Class par1Class, AxisAlignedBB par2AxisAlignedBB, List par3List, IEntitySelector par4IEntitySelector)
          Gets all entities that can be assigned to the specified class.
 void getEntitiesWithinAABBForEntity(Entity par1Entity, AxisAlignedBB par2AxisAlignedBB, List par3List)
          Fills the given list of all entities that intersect within the given bounding box that aren't the passed entity Args: entity, aabb, listToFill
 int getHeightValue(int par1, int par2)
          Returns the value in the height map at this x, z coordinate in the chunk
 Random getRandomWithSeed(long par1)
           
 int getSavedLightValue(EnumSkyBlock par1EnumSkyBlock, int par2, int par3, int par4)
          Gets the amount of light saved in this block (doesn't adjust for daylight)
 boolean isAtLocation(int par1, int par2)
          Checks whether the chunk is at the X/Z location specified
 boolean isEmpty()
           
 boolean needsSaving(boolean par1)
          Returns true if this Chunk needs to be saved
 void onChunkLoad()
          Called when this Chunk is loaded by the ChunkProvider
 void onChunkUnload()
          Called when this Chunk is unloaded by the ChunkProvider
 void removeChunkBlockTileEntity(int par1, int par2, int par3)
          Removes the TileEntity for a given block in this chunk
 void removeEntity(Entity par1Entity)
          removes entity using its y chunk coordinate as its index
 void removeEntityAtIndex(Entity par1Entity, int par2)
          Removes entity at the specified index from the entity array.
 boolean setBlockID(int par1, int par2, int par3, int par4)
          Sets a blockID for a position in the chunk.
 boolean setBlockIDWithMetadata(int par1, int par2, int par3, int par4, int par5)
          Sets a blockID of a position within a chunk with metadata.
 boolean setBlockMetadata(int par1, int par2, int par3, int par4)
          Set the metadata of a block in the chunk
 void setChunkBlockTileEntity(int par1, int par2, int par3, TileEntity par4TileEntity)
          Sets the TileEntity for a given block in this chunk
 void setChunkModified()
          Sets the isModified flag for this Chunk
 void setLightValue(EnumSkyBlock par1EnumSkyBlock, int par2, int par3, int par4, int par5)
          Sets the light value at the coordinate.
 
Methods inherited from class net.minecraft.world.chunk.Chunk
cleanChunkBlockTileEntity, enqueueRelightChecks, fillChunk, getBiomeArray, getBiomeGenForWorldCoords, getBlockStorageArray, getChunkCoordIntPair, getPrecipitationHeight, getTopFilledSegment, populateChunk, resetRelightChecks, setBiomeArray, setStorageArrays, updateSkylight
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmptyChunk

public EmptyChunk(World par1World,
                  int par2,
                  int par3)
Method Detail

isAtLocation

public boolean isAtLocation(int par1,
                            int par2)
Checks whether the chunk is at the X/Z location specified

Overrides:
isAtLocation in class Chunk

getHeightValue

public int getHeightValue(int par1,
                          int par2)
Returns the value in the height map at this x, z coordinate in the chunk

Overrides:
getHeightValue in class Chunk

generateSkylightMap

public void generateSkylightMap()
Generates the initial skylight map for the chunk upon generation or load.

Overrides:
generateSkylightMap in class Chunk

generateHeightMap

public void generateHeightMap()
Overrides:
generateHeightMap in class Chunk

getBlockID

public int getBlockID(int par1,
                      int par2,
                      int par3)
Return the ID of a block in the chunk.

Overrides:
getBlockID in class Chunk

getBlockLightOpacity

public int getBlockLightOpacity(int par1,
                                int par2,
                                int par3)
Overrides:
getBlockLightOpacity in class Chunk

setBlockIDWithMetadata

public boolean setBlockIDWithMetadata(int par1,
                                      int par2,
                                      int par3,
                                      int par4,
                                      int par5)
Sets a blockID of a position within a chunk with metadata. Args: x, y, z, blockID, metadata

Overrides:
setBlockIDWithMetadata in class Chunk

setBlockID

public boolean setBlockID(int par1,
                          int par2,
                          int par3,
                          int par4)
Sets a blockID for a position in the chunk. Args: x, y, z, blockID

Overrides:
setBlockID in class Chunk

getBlockMetadata

public int getBlockMetadata(int par1,
                            int par2,
                            int par3)
Return the metadata corresponding to the given coordinates inside a chunk.

Overrides:
getBlockMetadata in class Chunk

setBlockMetadata

public boolean setBlockMetadata(int par1,
                                int par2,
                                int par3,
                                int par4)
Set the metadata of a block in the chunk

Overrides:
setBlockMetadata in class Chunk

getSavedLightValue

public int getSavedLightValue(EnumSkyBlock par1EnumSkyBlock,
                              int par2,
                              int par3,
                              int par4)
Gets the amount of light saved in this block (doesn't adjust for daylight)

Overrides:
getSavedLightValue in class Chunk

setLightValue

public void setLightValue(EnumSkyBlock par1EnumSkyBlock,
                          int par2,
                          int par3,
                          int par4,
                          int par5)
Sets the light value at the coordinate. If enumskyblock is set to sky it sets it in the skylightmap and if its a block then into the blocklightmap. Args enumSkyBlock, x, y, z, lightValue

Overrides:
setLightValue in class Chunk

getBlockLightValue

public int getBlockLightValue(int par1,
                              int par2,
                              int par3,
                              int par4)
Gets the amount of light on a block taking into account sunlight

Overrides:
getBlockLightValue in class Chunk

addEntity

public void addEntity(Entity par1Entity)
Adds an entity to the chunk. Args: entity

Overrides:
addEntity in class Chunk

removeEntity

public void removeEntity(Entity par1Entity)
removes entity using its y chunk coordinate as its index

Overrides:
removeEntity in class Chunk

removeEntityAtIndex

public void removeEntityAtIndex(Entity par1Entity,
                                int par2)
Removes entity at the specified index from the entity array.

Overrides:
removeEntityAtIndex in class Chunk

canBlockSeeTheSky

public boolean canBlockSeeTheSky(int par1,
                                 int par2,
                                 int par3)
Returns whether is not a block above this one blocking sight to the sky (done via checking against the heightmap)

Overrides:
canBlockSeeTheSky in class Chunk

getChunkBlockTileEntity

public TileEntity getChunkBlockTileEntity(int par1,
                                          int par2,
                                          int par3)
Gets the TileEntity for a given block in this chunk

Overrides:
getChunkBlockTileEntity in class Chunk

addTileEntity

public void addTileEntity(TileEntity par1TileEntity)
Adds a TileEntity to a chunk

Overrides:
addTileEntity in class Chunk

setChunkBlockTileEntity

public void setChunkBlockTileEntity(int par1,
                                    int par2,
                                    int par3,
                                    TileEntity par4TileEntity)
Sets the TileEntity for a given block in this chunk

Overrides:
setChunkBlockTileEntity in class Chunk

removeChunkBlockTileEntity

public void removeChunkBlockTileEntity(int par1,
                                       int par2,
                                       int par3)
Removes the TileEntity for a given block in this chunk

Overrides:
removeChunkBlockTileEntity in class Chunk

onChunkLoad

public void onChunkLoad()
Called when this Chunk is loaded by the ChunkProvider

Overrides:
onChunkLoad in class Chunk

onChunkUnload

public void onChunkUnload()
Called when this Chunk is unloaded by the ChunkProvider

Overrides:
onChunkUnload in class Chunk

setChunkModified

public void setChunkModified()
Sets the isModified flag for this Chunk

Overrides:
setChunkModified in class Chunk

getEntitiesWithinAABBForEntity

public void getEntitiesWithinAABBForEntity(Entity par1Entity,
                                           AxisAlignedBB par2AxisAlignedBB,
                                           List par3List)
Fills the given list of all entities that intersect within the given bounding box that aren't the passed entity Args: entity, aabb, listToFill

Overrides:
getEntitiesWithinAABBForEntity in class Chunk

getEntitiesOfTypeWithinAAAB

public void getEntitiesOfTypeWithinAAAB(Class par1Class,
                                        AxisAlignedBB par2AxisAlignedBB,
                                        List par3List,
                                        IEntitySelector par4IEntitySelector)
Gets all entities that can be assigned to the specified class. Args: entityClass, aabb, listToFill

Overrides:
getEntitiesOfTypeWithinAAAB in class Chunk

needsSaving

public boolean needsSaving(boolean par1)
Returns true if this Chunk needs to be saved

Overrides:
needsSaving in class Chunk

getRandomWithSeed

public Random getRandomWithSeed(long par1)
Overrides:
getRandomWithSeed in class Chunk

isEmpty

public boolean isEmpty()
Overrides:
isEmpty in class Chunk

getAreLevelsEmpty

public boolean getAreLevelsEmpty(int par1,
                                 int par2)
Returns whether the ExtendedBlockStorages containing levels (in blocks) from arg 1 to arg 2 are fully empty (true) or not (false).

Overrides:
getAreLevelsEmpty in class Chunk