Advertisement
Guest User

Untitled

a guest
Jul 5th, 2013
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.44 KB | None | 0 0
  1. package wert.drillgorg;
  2.  
  3. import java.util.ArrayList;
  4. import java.util.Random;
  5.  
  6. import cpw.mods.fml.relauncher.Side;
  7. import cpw.mods.fml.relauncher.SideOnly;
  8.  
  9. import net.minecraft.block.Block;
  10. import net.minecraft.block.BlockStem;
  11. import net.minecraft.client.renderer.texture.IconRegister;
  12. import net.minecraft.item.Item;
  13. import net.minecraft.item.ItemStack;
  14. import net.minecraft.util.Icon;
  15. import net.minecraft.world.World;
  16. import net.minecraftforge.common.ForgeDirection;
  17.  
  18. public class LadderPumpkinStem extends BlockStem{
  19.  
  20.     @SideOnly(Side.CLIENT)
  21.     private Icon theIcon;
  22.  
  23.     protected LadderPumpkinStem(int par1) {
  24.         super(par1, Drillgorg.ladderPumpkin);
  25.     }
  26.    
  27.     @SideOnly(Side.CLIENT)
  28.     public Icon func_94368_p()
  29.     {
  30.         return this.theIcon;
  31.     }
  32.    
  33.     //@Override
  34.     public ArrayList<ItemStack> getBlockDropped(World world, int x, int y, int z, int metadata, int fortune)
  35.     {
  36.         ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
  37.         for (int i = 0; i < 3; i++)
  38.         {
  39.             if (world.rand.nextInt(15) <= metadata)
  40.             {
  41.                 ret.add(new ItemStack(Drillgorg.ladderPumpkinSeed));
  42.             }
  43.         }
  44.         return ret;
  45.     }
  46.  
  47.     @SideOnly(Side.CLIENT)
  48.     public void registerIcons(IconRegister par1IconRegister)
  49.     {
  50.         this.blockIcon = par1IconRegister.registerIcon("stem_straight");
  51.         this.theIcon = par1IconRegister.registerIcon("stem_bent");
  52.     }
  53.  
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement