001    package net.minecraft.src;
002    
003    public class ChunkPosition
004    {
005        /** The x coordinate of this ChunkPosition */
006        public final int x;
007    
008        /** The y coordinate of this ChunkPosition */
009        public final int y;
010    
011        /** The z coordinate of this ChunkPosition */
012        public final int z;
013    
014        public ChunkPosition(int par1, int par2, int par3)
015        {
016            this.x = par1;
017            this.y = par2;
018            this.z = par3;
019        }
020    
021        public ChunkPosition(Vec3 par1Vec3)
022        {
023            this(MathHelper.floor_double(par1Vec3.xCoord), MathHelper.floor_double(par1Vec3.yCoord), MathHelper.floor_double(par1Vec3.zCoord));
024        }
025    
026        public boolean equals(Object par1Obj)
027        {
028            if (!(par1Obj instanceof ChunkPosition))
029            {
030                return false;
031            }
032            else
033            {
034                ChunkPosition var2 = (ChunkPosition)par1Obj;
035                return var2.x == this.x && var2.y == this.y && var2.z == this.z;
036            }
037        }
038    
039        public int hashCode()
040        {
041            return this.x * 8976890 + this.y * 981131 + this.z;
042        }
043    }