    001package net.minecraftforge.event.entity.player;
    002
    003import net.minecraft.entity.player.EntityPlayer;
    004import net.minecraft.item.ItemStack;
    005import net.minecraft.util.MovingObjectPosition;
    006import net.minecraft.world.World;
    007import net.minecraftforge.event.Cancelable;
    008import net.minecraftforge.event.Event;
    009
    010@Cancelable
    011@Event.HasResult
    012public class FillBucketEvent extends PlayerEvent
    013{
    014    /**
    015     * This event is fired when a player attempts to use a Empty bucket, it
    016     * can be canceled to completely prevent any further processing.
    017     *
    018     * If you set the result to 'ALLOW', it means that you have processed
    019     * the event and wants the basic functionality of adding the new
    020     * ItemStack to your inventory and reducing the stack size to process.
    021     * setResult(ALLOW) is the same as the old setHandeled();
    022     */
    023
    024    public final ItemStack current;
    025    public final World world;
    026    public final MovingObjectPosition target;
    027
    028    public ItemStack result;
    029
    030    public FillBucketEvent(EntityPlayer player, ItemStack current, World world, MovingObjectPosition target)
    031    {
    032        super(player);
    033        this.current = current;
    034        this.world = world;
    035        this.target = target;
    036    }
    037}