001 package net.minecraftforge.event.entity.player;
002
003 import net.minecraft.entity.player.EntityPlayer;
004 import net.minecraft.item.ItemStack;
005 import net.minecraft.world.World;
006 import net.minecraftforge.event.Cancelable;
007 import net.minecraftforge.event.Event;
008
009 @Cancelable
010 @Event.HasResult
011 public class UseHoeEvent extends PlayerEvent
012 {
013 /**
014 * This event is fired when a player attempts to use a Hoe on a block, it
015 * can be canceled to completely prevent any further processing.
016 *
017 * You can also set the result to ALLOW to mark the event as processed
018 * and damage the hoe.
019 *
020 * setResult(ALLOW) is the same as the old setHandeled();
021 */
022
023 public final ItemStack current;
024 public final World world;
025 public final int x;
026 public final int y;
027 public final int z;
028
029 private boolean handeled = false;
030
031 public UseHoeEvent(EntityPlayer player, ItemStack current, World world, int x, int y, int z)
032 {
033 super(player);
034 this.current = current;
035 this.world = world;
036 this.x = x;
037 this.y = y;
038 this.z = z;
039 }
040 }