Fortune Probability

Discussion in 'Plugin Development' started by Yoshlind, Apr 15, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    Yoshlind

    Hello, I'll be making a plugin that will require the same fortune probability as default Minecraft, does anyone know what the probability for the amount of blocks dropped is for each fortune?
     
  2. Depends on the block.
    Lapis drops very much with fortune but diamonds not so much. You could give the pickaxe fortune for 1 tick when the block is beeing destroyed by a player.
     
  3. Offline

    Yoshlind

    How'd I go about incorporating this in an auto inventory, since the blocks are never dropped and from what I can see theres no method to get the blocks dropped?
     
  4. Offline

    schwabfl

  5. Offline

    Europia79

    Just make it a configurable amount. Then the server owner/admin can adjust it later.

    What are you talking about ? What blocks are never dropped ? Are you talking about regular Minecraft blocks ? Or are you talking about some custom Blocks from a mod ?

    When blocks are destroyed, they are dropped as type Item (which extends Entity).

    https://hub.spigotmc.org/javadocs/b...(org.bukkit.Location, double, double, double)

    You can use getNearbyEntities() to get dropped blocks. You have to loop thru the Collection<Entity> and see if they're instanceof Item. If so, cast to Item.
     
  6. Offline

    SirMonkeyFood

    @Europia79 I think he's talking about making the blocks automatically go into a player's inventory
     
Thread Status:
Not open for further replies.

Share This Page