2012-08-06 22:07:53 +00:00
|
|
|
package net.minecraftforge.event.entity.player;
|
|
|
|
|
2012-12-13 05:58:35 +00:00
|
|
|
import net.minecraft.block.Block;
|
|
|
|
import net.minecraft.entity.Entity;
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
2012-09-27 00:54:15 +00:00
|
|
|
import net.minecraftforge.event.Cancelable;
|
2012-08-06 22:07:53 +00:00
|
|
|
import net.minecraftforge.event.entity.living.LivingEvent;
|
|
|
|
|
|
|
|
public class PlayerEvent extends LivingEvent
|
|
|
|
{
|
|
|
|
public final EntityPlayer entityPlayer;
|
|
|
|
public PlayerEvent(EntityPlayer player)
|
|
|
|
{
|
|
|
|
super(player);
|
|
|
|
entityPlayer = player;
|
|
|
|
}
|
2012-09-27 00:54:15 +00:00
|
|
|
|
|
|
|
public static class HarvestCheck extends PlayerEvent
|
|
|
|
{
|
|
|
|
public final Block block;
|
|
|
|
public boolean success;
|
|
|
|
|
|
|
|
public HarvestCheck(EntityPlayer player, Block block, boolean success)
|
|
|
|
{
|
|
|
|
super(player);
|
|
|
|
this.block = block;
|
|
|
|
this.success = success;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Cancelable
|
|
|
|
public static class BreakSpeed extends PlayerEvent
|
|
|
|
{
|
|
|
|
public final Block block;
|
|
|
|
public final int metadata;
|
|
|
|
public final float originalSpeed;
|
|
|
|
public float newSpeed = 0.0f;
|
|
|
|
|
|
|
|
public BreakSpeed(EntityPlayer player, Block block, int metadata, float original)
|
|
|
|
{
|
|
|
|
super(player);
|
|
|
|
this.block = block;
|
|
|
|
this.metadata = metadata;
|
|
|
|
this.originalSpeed = original;
|
2012-09-27 04:17:26 +00:00
|
|
|
this.newSpeed = original;
|
2012-09-27 00:54:15 +00:00
|
|
|
}
|
|
|
|
}
|
2012-08-06 22:07:53 +00:00
|
|
|
}
|