From c63efa917df79863cc520ea79d96790f745904ff Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 5 Sep 2013 16:24:50 -0400 Subject: [PATCH] Add some javadoc to the HarvestBlock event. --- common/net/minecraftforge/event/world/BlockEvent.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/common/net/minecraftforge/event/world/BlockEvent.java b/common/net/minecraftforge/event/world/BlockEvent.java index 215e71e32..f86d37bd7 100644 --- a/common/net/minecraftforge/event/world/BlockEvent.java +++ b/common/net/minecraftforge/event/world/BlockEvent.java @@ -25,6 +25,17 @@ public class BlockEvent extends Event { this.blockMetadata = blockMetadata; } + /** + * Fired when a block is about to drop it's harvested items. The {@link #drops} array can be amended, as can the {@link #dropChance}. + * Note well: the {@link #harvester} player field is null in a variety of scenarios. Code expecting null. + * + * The {@link #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 {@link #dropChance} to 1.0f to always drop the contents of the {@link #drops} array. + * + * {@link #isSilkTouching} is set if this is considered a silk touch harvesting operation, vs a normal harvesting operation. Act accordingly. + * + * @author cpw + */ public static class HarvestDropsEvent extends BlockEvent { public final int fortuneLevel; public final ArrayList drops;