2012-08-06 22:07:53 +00:00
|
|
|
package net.minecraftforge.event.entity.player;
|
2012-08-06 02:15:13 +00:00
|
|
|
|
2012-12-13 05:58:35 +00:00
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
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 02:15:13 +00:00
|
|
|
|
2012-08-07 08:24:06 +00:00
|
|
|
@Cancelable
|
2012-10-22 07:29:28 +00:00
|
|
|
@Event.HasResult
|
2012-08-06 02:15:13 +00:00
|
|
|
public class BonemealEvent extends PlayerEvent
|
|
|
|
{
|
2012-10-22 07:29:28 +00:00
|
|
|
/**
|
|
|
|
* This event is called when a player attempts to use Bonemeal 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 use up a bonemeal from the stack but do no further processing.
|
|
|
|
*
|
|
|
|
* setResult(ALLOW) is the same as the old setHandeled()
|
|
|
|
*/
|
|
|
|
|
2012-08-06 02:15:13 +00:00
|
|
|
public final World world;
|
|
|
|
public final int ID;
|
|
|
|
public final int X;
|
|
|
|
public final int Y;
|
|
|
|
public final int Z;
|
|
|
|
|
|
|
|
public BonemealEvent(EntityPlayer player, World world, int id, int x, int y, int z)
|
|
|
|
{
|
|
|
|
super(player);
|
|
|
|
this.world = world;
|
|
|
|
this.ID = id;
|
|
|
|
this.X = x;
|
|
|
|
this.Y = y;
|
|
|
|
this.Z = z;
|
|
|
|
}
|
|
|
|
}
|