Advertisement
TeNNoX

ItemBomb

Dec 19th, 2011
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.04 KB | None | 0 0
  1. // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
  2. // Jad home page: http://www.kpdus.com/jad.html
  3. // Decompiler options: packimports(3) braces deadcode fieldsfirst
  4.  
  5. package net.minecraft.src;
  6.  
  7. import java.util.Random;
  8.  
  9. // Referenced classes of package net.minecraft.src:
  10. //            Item, EntityPlayer, PlayerCapabilities, ItemStack,
  11. //            World, EntityEgg
  12.  
  13. public class ItemBomb extends Item
  14. {
  15.  
  16.     public ItemBomb(int i)
  17.     {
  18.         super(i);
  19.         maxStackSize = 16;
  20.     }
  21.  
  22.     public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
  23.     {
  24.         System.out.println("shoot");
  25.         if(!entityplayer.capabilities.depleteBuckets)
  26.         {
  27.             itemstack.stackSize--;
  28.         }
  29.         world.playSoundAtEntity(entityplayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
  30.         if(!world.multiplayerWorld)
  31.         {
  32.             world.entityJoinedWorld(new EntityBomb(world, entityplayer));
  33.         }
  34.         return itemstack;
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement