001    package net.minecraft.src;
002    
003    public class BlockSourceImpl implements IBlockSource
004    {
005        private final World worldObj;
006        private final int xPos;
007        private final int yPos;
008        private final int zPos;
009    
010        public BlockSourceImpl(World par1World, int par2, int par3, int par4)
011        {
012            this.worldObj = par1World;
013            this.xPos = par2;
014            this.yPos = par3;
015            this.zPos = par4;
016        }
017    
018        public World getWorld()
019        {
020            return this.worldObj;
021        }
022    
023        public double getX()
024        {
025            return (double)this.xPos + 0.5D;
026        }
027    
028        public double getY()
029        {
030            return (double)this.yPos + 0.5D;
031        }
032    
033        public double getZ()
034        {
035            return (double)this.zPos + 0.5D;
036        }
037    
038        public int getXInt()
039        {
040            return this.xPos;
041        }
042    
043        public int getYInt()
044        {
045            return this.yPos;
046        }
047    
048        public int getZInt()
049        {
050            return this.zPos;
051        }
052    
053        public int func_82620_h()
054        {
055            return this.worldObj.getBlockMetadata(this.xPos, this.yPos, this.zPos);
056        }
057    
058        public TileEntity func_82619_j()
059        {
060            return this.worldObj.getBlockTileEntity(this.xPos, this.yPos, this.zPos);
061        }
062    }