BoneExplosion [UNSOLVED]

Discussion in 'Spigot Plugin Development' started by fujiboy4, May 22, 2015.

  1. On mineplex, for the skeleton kit, you can do a large bone explosion. I myself want to know how to create something like this. A few things to keep track of.

    + I have disabled picking up items
    + I have disabled dropping items

    Thanks guys! :)
     
  2. Maybe try dropped items with velocitys and Threads..
    I only know a German Tutorial for that :/
     
  3. For packets, i suggest using a for loop (asyncly) to send every player the bone item drop entities, then send velocity packets, preferably randomized, as randomized will usually work for this type of thing. If you want it to look more precise, and less random, use math.
     
  4. Well in theory just use the random number generator java already provides you with. Then using the Vector.subtract(Vector) method you can use the random number generator to generate random x and y's around the player within 2-5 blocks and then create a bunch of dropped item entities that cannot be picked up and set their velocity each to a different random location like this randomLocation.toVector().subtract(playerLoc);
    Now with that done you get the UUID of each dropped item entity and store it in a list. Run a delayed task or whatever you want to use and after for however many seconds and then run through that UUID list to get the items and remove them from the world. Your done! Want further help? Tag me
     
  5. I just don't know how to summon the items...
     
  6. try using
    Code (Text):
    Item item = (Item)world.spawnEntity(player.getLocation() , EntityType.DROPPED_ITEM);
    at the player.getLocation you can add/subtract from the location to spread the bones
     
  7. World#dropItem(Location, ItemStack)