public static class PlayerEvent.BreakSpeed extends PlayerEvent
EntityPlayer.canHarvestBlock(IBlockState).ForgeEventFactory.getBreakSpeed(EntityPlayer, IBlockState, float, BlockPos).state contains the block being broken. originalSpeed contains the original speed at which the player broke the block. newSpeed contains the newSpeed at which the player will break the block. pos contains the coordinates at which this event is occurring. Y value -1 means location is unknown.Cancelable.HasResultMinecraftForge.EVENT_BUS.PlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.VisibilityLivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEventEntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructingEvent.HasResult, Event.Result| Modifier and Type | Field and Description |
|---|---|
private float |
newSpeed |
private float |
originalSpeed |
private BlockPos |
pos |
private IBlockState |
state |
| Constructor and Description |
|---|
BreakSpeed(EntityPlayer player,
IBlockState state,
float original,
BlockPos pos) |
| Modifier and Type | Method and Description |
|---|---|
float |
getNewSpeed() |
float |
getOriginalSpeed() |
BlockPos |
getPos() |
IBlockState |
getState() |
void |
setNewSpeed(float newSpeed) |
getEntityPlayergetEntityLivinggetEntitygetListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setupprivate final IBlockState state
private final float originalSpeed
private float newSpeed
private final BlockPos pos
public BreakSpeed(EntityPlayer player, IBlockState state, float original, BlockPos pos)
public IBlockState getState()
public float getOriginalSpeed()
public float getNewSpeed()
public void setNewSpeed(float newSpeed)
public BlockPos getPos()