Advertisement
HalestormXV

Untitled

Feb 10th, 2016
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.70 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.             ChunkCoordinates location = player.getPlayerCoordinates();
  10.             for (float degrees = 0.0F; degrees < 360.0F; degrees += 20.0F)
  11.             {
  12.                 double angle = Math.toRadians(degrees);
  13.  
  14.                 double vx = player.posX* Math.cos(angle) -player.posZ * Math.sin(angle);
  15.                 double vz = player.posX * Math.sin(angle) + player.posZ * Math.cos(angle);
  16.  
  17.                 world.createExplosion(player,(int)vx, player.posY, (int)vz, 3.2F, true);
  18.             }
  19.         }
  20.         return true;
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement