2012-10-22 07:29:28 +00:00
|
|
|
package net.minecraftforge.event.entity.player;
|
2012-08-06 10:35:57 +00:00
|
|
|
|
2012-12-13 05:58:35 +00:00
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraft.world.World;
|
2012-08-07 08:24:06 +00:00
|
|
|
import net.minecraftforge.event.Cancelable;
|
2012-10-22 07:29:28 +00:00
|
|
|
import net.minecraftforge.event.Event;
|
2012-08-06 10:35:57 +00:00
|
|
|
|
2012-08-07 08:24:06 +00:00
|
|
|
@Cancelable
|
2012-10-22 07:29:28 +00:00
|
|
|
@Event.HasResult
|
2012-08-06 10:35:57 +00:00
|
|
|
public class UseHoeEvent extends PlayerEvent
|
|
|
|
{
|
2012-10-22 07:29:28 +00:00
|
|
|
/**
|
|
|
|
* This event is fired when a player attempts to use a Hoe on a block, it
|
|
|
|
* can be canceled to completely prevent any further processing.
|
|
|
|
*
|
|
|
|
* You can also set the result to ALLOW to mark the event as processed
|
|
|
|
* and damage the hoe.
|
|
|
|
*
|
|
|
|
* setResult(ALLOW) is the same as the old setHandeled();
|
|
|
|
*/
|
2012-08-06 10:35:57 +00:00
|
|
|
|
|
|
|
public final ItemStack current;
|
|
|
|
public final World world;
|
|
|
|
public final int x;
|
|
|
|
public final int y;
|
|
|
|
public final int z;
|
|
|
|
|
|
|
|
private boolean handeled = false;
|
|
|
|
|
|
|
|
public UseHoeEvent(EntityPlayer player, ItemStack current, World world, int x, int y, int z)
|
|
|
|
{
|
|
|
|
super(player);
|
|
|
|
this.current = current;
|
|
|
|
this.world = world;
|
|
|
|
this.x = x;
|
|
|
|
this.y = y;
|
|
|
|
this.z = z;
|
|
|
|
}
|
|
|
|
}
|