net.minecraftforge.event.world

## Class BlockEvent.HarvestDropsEvent

- java.lang.Object
- - net.minecraftforge.event.Event
  - - net.minecraftforge.event.world.BlockEvent
    - - net.minecraftforge.event.world.BlockEvent.HarvestDropsEvent

- Enclosing class:
    BlockEvent

      public static class BlockEvent.HarvestDropsEvent
      extends BlockEvent

  Fired when a block is about to drop it's harvested items. The `drops` array can be amended, as can the `dropChance`. Note well: the `harvester` player field is null in a variety of scenarios. Code expecting null. The `dropChance` is used to determine which items in this array will actually drop, compared to a random number. If you wish, you can pre-filter yourself, and set `dropChance` to 1.0f to always drop the contents of the `drops` array. `isSilkTouching` is set if this is considered a silk touch harvesting operation, vs a normal harvesting operation. Act accordingly.
  Author:
    cpw

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class net.minecraftforge.event.world.BlockEvent

      `BlockEvent.BreakEvent, BlockEvent.HarvestDropsEvent`

    - ### Nested classes/interfaces inherited from class net.minecraftforge.event.Event

      `Event.HasResult, Event.Result`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `float` | `dropChance`
    `ArrayList<ItemStack>` | `drops`
    `int` | `fortuneLevel`
    `EntityPlayer` | `harvester`
    `boolean` | `isSilkTouching`

    - ### Fields inherited from class net.minecraftforge.event.world.BlockEvent

      `block, blockMetadata, world, x, y, z`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BlockEvent.HarvestDropsEvent(int x, int y, int z, World world, Block block, int blockMetadata, int fortuneLevel, float dropChance, ArrayList<ItemStack> drops, EntityPlayer harvester, boolean isSilkTouching)`

  - ### Method Summary

    - ### Methods inherited from class net.minecraftforge.event.Event

      `getListenerList, getResult, hasResult, isCancelable, isCanceled, setCanceled, setResult`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### fortuneLevel

          public final int fortuneLevel

    - #### drops

          public final ArrayList<ItemStack> drops

    - #### isSilkTouching

          public final boolean isSilkTouching

    - #### dropChance

          public float dropChance

    - #### harvester

          public final EntityPlayer harvester

  - ### Constructor Detail

    - #### BlockEvent.HarvestDropsEvent

          public BlockEvent.HarvestDropsEvent(int x,
                                      int y,
                                      int z,
                                      World world,
                                      Block block,
                                      int blockMetadata,
                                      int fortuneLevel,
                                      float dropChance,
                                      ArrayList<ItemStack> drops,
                                      EntityPlayer harvester,
                                      boolean isSilkTouching)