pryingtuna85649

blue planks

Jun 18th, 2014
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 KB | None | 0 0
  1. package com.wizardofoz.basic.block;
  2.  
  3. import com.wizardofoz.basic.OzMod;
  4.  
  5. import cpw.mods.fml.relauncher.Side;
  6. import cpw.mods.fml.relauncher.SideOnly;
  7. import net.minecraft.block.Block;
  8. import net.minecraft.block.material.Material;
  9. import net.minecraft.client.renderer.texture.IIconRegister;
  10. import net.minecraft.creativetab.CreativeTabs;
  11. import net.minecraft.util.IIcon;
  12.  
  13. public class PlankBlockBlue extends Block {
  14.  
  15. public static final String[] field_150096_a = new String[] {"Blue"};
  16. @SideOnly(Side.CLIENT)
  17. private IIcon[] field_150095_b;
  18. private static final String __OBFID = "CL_00000335";
  19.  
  20. public PlankBlockBlue(Material p_i45394_1_) {
  21. super(p_i45394_1_);
  22. this.setCreativeTab(OzMod.OzTab);
  23. }
  24.  
  25. /**
  26. * Gets the block's texture. Args: side, meta
  27. */
  28. @SideOnly(Side.CLIENT)
  29. public IIcon getIcon(int p_149691_1_, int p_149691_2_)
  30. {
  31. if (p_149691_2_ < 0 || p_149691_2_ >= this.field_150095_b.length)
  32. {
  33. p_149691_2_ = 0;
  34. }
  35.  
  36. return this.field_150095_b[p_149691_2_];
  37. }
  38.  
  39. /**
  40. * Determines the damage on the item the block drops. Used in cloth and wood.
  41. */
  42. public int damageDropped(int p_149692_1_)
  43. {
  44. return p_149692_1_;
  45. }
  46.  
  47. /**
  48. * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
  49. */
  50. //@SideOnly(Side.CLIENT)
  51. //public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_)
  52. //{
  53. //p_149666_3_.add(new ItemStack(p_149666_1_, 1, 0));
  54. //p_149666_3_.add(new ItemStack(p_149666_1_, 1, 1));
  55. //p_149666_3_.add(new ItemStack(p_149666_1_, 1, 2));
  56. //p_149666_3_.add(new ItemStack(p_149666_1_, 1, 3));
  57. //p_149666_3_.add(new ItemStack(p_149666_1_, 1, 4));
  58. //p_149666_3_.add(new ItemStack(p_149666_1_, 1, 5));
  59. //}
  60.  
  61. @SideOnly(Side.CLIENT)
  62. public void registerBlockIcons(IIconRegister p_149651_1_)
  63. {
  64. this.field_150095_b = new IIcon[field_150096_a.length];
  65.  
  66. for (int i = 0; i < this.field_150095_b.length; ++i)
  67. {
  68. this.field_150095_b[i] = p_149651_1_.registerIcon(this.getTextureName() + "_" + field_150096_a[i]);
  69. }
  70. }
  71.  
  72. }
Advertisement
Add Comment
Please, Sign In to add comment