001package net.minecraft.world; 002 003import cpw.mods.fml.relauncher.Side; 004import cpw.mods.fml.relauncher.SideOnly; 005import net.minecraft.block.material.Material; 006import net.minecraft.tileentity.TileEntity; 007import net.minecraft.util.Vec3Pool; 008import net.minecraft.world.biome.BiomeGenBase; 009 010public interface IBlockAccess 011{ 012 /** 013 * Returns the block ID at coords x,y,z 014 */ 015 int getBlockId(int i, int j, int k); 016 017 /** 018 * Returns the TileEntity associated with a given block in X,Y,Z coordinates, or null if no TileEntity exists 019 */ 020 TileEntity getBlockTileEntity(int i, int j, int k); 021 022 @SideOnly(Side.CLIENT) 023 024 /** 025 * Any Light rendered on a 1.8 Block goes through here 026 */ 027 int getLightBrightnessForSkyBlocks(int i, int j, int k, int l); 028 029 /** 030 * Returns the block metadata at coords x,y,z 031 */ 032 int getBlockMetadata(int i, int j, int k); 033 034 @SideOnly(Side.CLIENT) 035 float getBrightness(int i, int j, int k, int l); 036 037 @SideOnly(Side.CLIENT) 038 039 /** 040 * Returns how bright the block is shown as which is the block's light value looked up in a lookup table (light 041 * values aren't linear for brightness). Args: x, y, z 042 */ 043 float getLightBrightness(int i, int j, int k); 044 045 /** 046 * Returns the block's material. 047 */ 048 Material getBlockMaterial(int i, int j, int k); 049 050 @SideOnly(Side.CLIENT) 051 052 /** 053 * Returns true if the block at the specified coordinates is an opaque cube. Args: x, y, z 054 */ 055 boolean isBlockOpaqueCube(int i, int j, int k); 056 057 /** 058 * Indicate if a material is a normal solid opaque cube. 059 */ 060 boolean isBlockNormalCube(int i, int j, int k); 061 062 @SideOnly(Side.CLIENT) 063 064 /** 065 * Returns true if the block at the specified coordinates is empty 066 */ 067 boolean isAirBlock(int i, int j, int k); 068 069 @SideOnly(Side.CLIENT) 070 071 /** 072 * Gets the biome for a given set of x/z coordinates 073 */ 074 BiomeGenBase getBiomeGenForCoords(int i, int j); 075 076 @SideOnly(Side.CLIENT) 077 078 /** 079 * Returns current world height. 080 */ 081 int getHeight(); 082 083 @SideOnly(Side.CLIENT) 084 085 /** 086 * set by !chunk.getAreLevelsEmpty 087 */ 088 boolean extendedLevelsInChunkCache(); 089 090 @SideOnly(Side.CLIENT) 091 092 /** 093 * Returns true if the block at the given coordinate has a solid (buildable) top surface. 094 */ 095 boolean doesBlockHaveSolidTopSurface(int i, int j, int k); 096 097 /** 098 * Return the Vec3Pool object for this world. 099 */ 100 Vec3Pool getWorldVec3Pool(); 101 102 /** 103 * Is this block powering in the specified direction Args: x, y, z, direction 104 */ 105 int isBlockProvidingPowerTo(int i, int j, int k, int l); 106}