Guest User

Untitled

a guest
Jul 31st, 2017
83
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.mod.drakania.items;
  2.  
  3. import net.minecraft.entity.item.EntityTNTPrimed;
  4. import net.minecraft.entity.player.EntityPlayer;
  5. import net.minecraft.entity.projectile.EntitySnowball;
  6. import net.minecraft.item.Item;
  7. import net.minecraft.item.ItemStack;
  8. import net.minecraft.world.World;
  9. import net.minecraftforge.event.world.ExplosionEvent;
  10.  
  11. public class ItemTnt extends Item
  12. {
  13. @Override
  14. public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_)
  15. {
  16.  
  17.  
  18. {
  19. if (!p_77659_3_.capabilities.isCreativeMode)
  20. {
  21. --p_77659_1_.stackSize;
  22. }
  23.  
  24. p_77659_2_.playSoundAtEntity(p_77659_3_, "game.tnt.primed", 1F, 1F / (itemRand.nextFloat() * 0.4F + 0.8F));
  25.  
  26. if (!p_77659_2_.isRemote)
  27. {
  28. p_77659_2_.spawnEntityInWorld(new EntityTNTPrimed(p_77659_2_, getMaxDamage(), getMaxDamage(), getMaxDamage(), p_77659_3_));
  29. }
  30.  
  31. return p_77659_1_;
  32. }
  33. }
  34. }
RAW Paste Data