public static class PlayerEvent.HarvestCheck extends PlayerEvent
EntityPlayer#canHarvestBlock(IBlockState)
.ForgeEventFactory#doPlayerHarvestCheck(EntityPlayer, IBlockState, boolean)
.state
contains the IBlockState
that is being checked for harvesting. success
contains the boolean value for whether the Block will be successfully harvested. 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 BlockState |
state |
private boolean |
success |
Constructor and Description |
---|
HarvestCheck(PlayerEntity player,
BlockState state,
boolean success) |
Modifier and Type | Method and Description |
---|---|
boolean |
canHarvest() |
BlockState |
getTargetBlock() |
void |
setCanHarvest(boolean success) |
getPlayer
getEntityLiving
getEntity
private final BlockState state
private boolean success
public HarvestCheck(PlayerEntity player, BlockState state, boolean success)
public BlockState getTargetBlock()
public boolean canHarvest()
public void setCanHarvest(boolean success)