Guest User

Logs

a guest
Dec 7th, 2014
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. package net.wuerfel21.derpyshiz.blocks;
  2.  
  3. import java.util.List;
  4.  
  5. import cpw.mods.fml.common.registry.GameRegistry;
  6. import cpw.mods.fml.relauncher.Side;
  7. import cpw.mods.fml.relauncher.SideOnly;
  8. import net.minecraft.block.BlockLog;
  9. import net.minecraft.client.renderer.texture.IIconRegister;
  10. import net.minecraft.creativetab.CreativeTabs;
  11. import net.minecraft.item.Item;
  12. import net.minecraft.item.ItemStack;
  13. import net.minecraft.util.IIcon;
  14.  
  15. public class DerpyLogs extends BlockLog {
  16.  
  17. public static final String[] field_150169_M = new String[] {"ebony", "magic"};
  18. public static final String[] types = field_150169_M;
  19.  
  20. public DerpyLogs() {
  21. super();
  22. this.setHarvestLevel("axe",1);
  23. }
  24.  
  25. @SideOnly(Side.CLIENT)
  26. public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_)
  27. {
  28. p_149666_3_.add(new ItemStack(p_149666_1_, 1, 0));
  29. p_149666_3_.add(new ItemStack(p_149666_1_, 1, 1));
  30. }
  31.  
  32. @SideOnly(Side.CLIENT)
  33. public void registerBlockIcons(IIconRegister reg)
  34. {
  35. this.field_150167_a = new IIcon[field_150169_M.length];
  36. this.field_150166_b = new IIcon[field_150169_M.length];
  37.  
  38. for (int i = 0; i < this.field_150167_a.length; ++i)
  39. {
  40. this.field_150167_a[i] = reg.registerIcon(this.getTextureName() + "_" + field_150169_M[i]);
  41. this.field_150166_b[i] = reg.registerIcon(this.getTextureName() + "_" + field_150169_M[i] + "_top");
  42. }
  43. }
  44.  
  45. @Override
  46. public int getHarvestLevel(int meta) {
  47. return meta%2==0?1:3;
  48. }
  49.  
  50. }
Advertisement
Add Comment
Please, Sign In to add comment