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
.HasResult
MinecraftForge.EVENT_BUS
.PlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.ItemCraftedEvent, PlayerEvent.ItemPickupEvent, PlayerEvent.ItemSmeltedEvent, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.PlayerChangedDimensionEvent, PlayerEvent.PlayerLoggedInEvent, PlayerEvent.PlayerLoggedOutEvent, PlayerEvent.PlayerRespawnEvent, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.Visibility
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.EyeHeight
Modifier and Type | Field and Description |
---|---|
private float |
newSpeed |
private float |
originalSpeed |
private BlockPos |
pos |
private BlockState |
state |
Constructor and Description |
---|
BreakSpeed(PlayerEntity player,
BlockState state,
float original,
BlockPos pos) |
Modifier and Type | Method and Description |
---|---|
float |
getNewSpeed() |
float |
getOriginalSpeed() |
BlockPos |
getPos() |
BlockState |
getState() |
void |
setNewSpeed(float newSpeed) |
getPlayer
getEntityLiving
getEntity
private final BlockState state
private final float originalSpeed
private float newSpeed
private final BlockPos pos
public BreakSpeed(PlayerEntity player, BlockState state, float original, BlockPos pos)
public BlockState getState()
public float getOriginalSpeed()
public float getNewSpeed()
public void setNewSpeed(float newSpeed)
public BlockPos getPos()