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