Advertisement
HalestormXV

Untitled

Feb 10th, 2016
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.66 KB | None | 0 0
  1.     public boolean onItemUse(ItemStack itemstack, EntityPlayer player, World world, int x, int y, int z, int meta, float p_77648_8_, float p_77648_9_, float p_77648_10_)
  2.     {
  3.         if (!player.canPlayerEdit(x, y, z, meta, itemstack))
  4.         {
  5.             return false;
  6.         }
  7.         else
  8.         {
  9.            
  10.             for (float degrees = 0.0F; degrees < 360.0F; degrees += 20.0F)
  11.             {
  12.                 double angle = Math.toRadians(degrees);
  13.                 double vx = (player.posX + radius) * Math.cos(angle) -player.posZ * Math.sin(angle);
  14.                 double vz = player.posX * Math.sin(angle) + player.posZ * Math.cos(angle);
  15.  
  16.                 world.createExplosion(player,(int)vx, player.posY, (int)vz, 3.2F, true);
  17.             }
  18.         }
  19.         return true;
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement