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 007 public class BlockSandStone extends Block 008 { 009 public static final String[] SAND_STONE_TYPES = new String[] {"default", "chiseled", "smooth"}; 010 public BlockSandStone(int par1) 011 { 012 super(par1, 192, Material.rock); 013 this.setCreativeTab(CreativeTabs.tabBlock); 014 } 015 016 /** 017 * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata 018 */ 019 public int getBlockTextureFromSideAndMetadata(int par1, int par2) 020 { 021 return par1 != 1 && (par1 != 0 || par2 != 1 && par2 != 2) ? (par1 == 0 ? 208 : (par2 == 1 ? 229 : (par2 == 2 ? 230 : 192))) : 176; 022 } 023 024 /** 025 * Returns the block texture based on the side being looked at. Args: side 026 */ 027 public int getBlockTextureFromSide(int par1) 028 { 029 return par1 == 1 ? this.blockIndexInTexture - 16 : (par1 == 0 ? this.blockIndexInTexture + 16 : this.blockIndexInTexture); 030 } 031 032 /** 033 * Determines the damage on the item the block drops. Used in cloth and wood. 034 */ 035 public int damageDropped(int par1) 036 { 037 return par1; 038 } 039 040 @SideOnly(Side.CLIENT) 041 042 /** 043 * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks) 044 */ 045 public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List) 046 { 047 par3List.add(new ItemStack(par1, 1, 0)); 048 par3List.add(new ItemStack(par1, 1, 1)); 049 par3List.add(new ItemStack(par1, 1, 2)); 050 } 051 }