    001    package net.minecraft.src;
    002
    003    import cpw.mods.fml.common.Side;
    004    import cpw.mods.fml.common.asm.SideOnly;
    005    import java.util.List;
    006    import java.util.Random;
    007
    008    public class EmptyChunk extends Chunk
    009    {
    010        public EmptyChunk(World par1World, int par2, int par3)
    011        {
    012            super(par1World, par2, par3);
    013        }
    014
    015        /**
    016         * Checks whether the chunk is at the X/Z location specified
    017         */
    018        public boolean isAtLocation(int par1, int par2)
    019        {
    020            return par1 == this.xPosition && par2 == this.zPosition;
    021        }
    022
    023        /**
    024         * Returns the value in the height map at this x, z coordinate in the chunk
    025         */
    026        public int getHeightValue(int par1, int par2)
    027        {
    028            return 0;
    029        }
    030
    031        /**
    032         * Generates the initial skylight map for the chunk upon generation or load.
    033         */
    034        public void generateSkylightMap() {}
    035
    036        @SideOnly(Side.CLIENT)
    037
    038        /**
    039         * Generates the height map for a chunk from scratch
    040         */
    041        public void generateHeightMap() {}
    042
    043        /**
    044         * Return the ID of a block in the chunk.
    045         */
    046        public int getBlockID(int par1, int par2, int par3)
    047        {
    048            return 0;
    049        }
    050
    051        public int getBlockLightOpacity(int par1, int par2, int par3)
    052        {
    053            return 255;
    054        }
    055
    056        /**
    057         * Sets a blockID of a position within a chunk with metadata. Args: x, y, z, blockID, metadata
    058         */
    059        public boolean setBlockIDWithMetadata(int par1, int par2, int par3, int par4, int par5)
    060        {
    061            return true;
    062        }
    063
    064        /**
    065         * Sets a blockID for a position in the chunk. Args: x, y, z, blockID
    066         */
    067        public boolean setBlockID(int par1, int par2, int par3, int par4)
    068        {
    069            return true;
    070        }
    071
    072        /**
    073         * Return the metadata corresponding to the given coordinates inside a chunk.
    074         */
    075        public int getBlockMetadata(int par1, int par2, int par3)
    076        {
    077            return 0;
    078        }
    079
    080        /**
    081         * Set the metadata of a block in the chunk
    082         */
    083        public boolean setBlockMetadata(int par1, int par2, int par3, int par4)
    084        {
    085            return false;
    086        }
    087
    088        /**
    089         * Gets the amount of light saved in this block (doesn't adjust for daylight)
    090         */
    091        public int getSavedLightValue(EnumSkyBlock par1EnumSkyBlock, int par2, int par3, int par4)
    092        {
    093            return 0;
    094        }
    095
    096        /**
    097         * Sets the light value at the coordinate. If enumskyblock is set to sky it sets it in the skylightmap and if its a
    098         * block then into the blocklightmap. Args enumSkyBlock, x, y, z, lightValue
    099         */
    100        public void setLightValue(EnumSkyBlock par1EnumSkyBlock, int par2, int par3, int par4, int par5) {}
    101
    102        /**
    103         * Gets the amount of light on a block taking into account sunlight
    104         */
    105        public int getBlockLightValue(int par1, int par2, int par3, int par4)
    106        {
    107            return 0;
    108        }
    109
    110        /**
    111         * Adds an entity to the chunk. Args: entity
    112         */
    113        public void addEntity(Entity par1Entity) {}
    114
    115        /**
    116         * removes entity using its y chunk coordinate as its index
    117         */
    118        public void removeEntity(Entity par1Entity) {}
    119
    120        /**
    121         * Removes entity at the specified index from the entity array.
    122         */
    123        public void removeEntityAtIndex(Entity par1Entity, int par2) {}
    124
    125        /**
    126         * Returns whether is not a block above this one blocking sight to the sky (done via checking against the heightmap)
    127         */
    128        public boolean canBlockSeeTheSky(int par1, int par2, int par3)
    129        {
    130            return false;
    131        }
    132
    133        /**
    134         * Gets the TileEntity for a given block in this chunk
    135         */
    136        public TileEntity getChunkBlockTileEntity(int par1, int par2, int par3)
    137        {
    138            return null;
    139        }
    140
    141        /**
    142         * Adds a TileEntity to a chunk
    143         */
    144        public void addTileEntity(TileEntity par1TileEntity) {}
    145
    146        /**
    147         * Sets the TileEntity for a given block in this chunk
    148         */
    149        public void setChunkBlockTileEntity(int par1, int par2, int par3, TileEntity par4TileEntity) {}
    150
    151        /**
    152         * Removes the TileEntity for a given block in this chunk
    153         */
    154        public void removeChunkBlockTileEntity(int par1, int par2, int par3) {}
    155
    156        /**
    157         * Called when this Chunk is loaded by the ChunkProvider
    158         */
    159        public void onChunkLoad() {}
    160
    161        /**
    162         * Called when this Chunk is unloaded by the ChunkProvider
    163         */
    164        public void onChunkUnload() {}
    165
    166        /**
    167         * Sets the isModified flag for this Chunk
    168         */
    169        public void setChunkModified() {}
    170
    171        /**
    172         * Fills the given list of all entities that intersect within the given bounding box that aren't the passed entity
    173         * Args: entity, aabb, listToFill
    174         */
    175        public void getEntitiesWithinAABBForEntity(Entity par1Entity, AxisAlignedBB par2AxisAlignedBB, List par3List) {}
    176
    177        /**
    178         * Gets all entities that can be assigned to the specified class. Args: entityClass, aabb, listToFill
    179         */
    180        public void getEntitiesOfTypeWithinAAAB(Class par1Class, AxisAlignedBB par2AxisAlignedBB, List par3List) {}
    181
    182        /**
    183         * Returns true if this Chunk needs to be saved
    184         */
    185        public boolean needsSaving(boolean par1)
    186        {
    187            return false;
    188        }
    189
    190        public Random getRandomWithSeed(long par1)
    191        {
    192            return new Random(this.worldObj.getSeed() + (long)(this.xPosition * this.xPosition * 4987142) + (long)(this.xPosition * 5947611) + (long)(this.zPosition * this.zPosition) * 4392871L + (long)(this.zPosition * 389711) ^ par1);
    193        }
    194
    195        public boolean isEmpty()
    196        {
    197            return true;
    198        }
    199
    200        /**
    201         * Returns whether the ExtendedBlockStorages containing levels (in blocks) from arg 1 to arg 2 are fully empty
    202         * (true) or not (false).
    203         */
    204        public boolean getAreLevelsEmpty(int par1, int par2)
    205        {
    206            return true;
    207        }
    208    }