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.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.Visibility
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing
Event.HasResult, Event.Result
Constructor and Description |
---|
HarvestCheck(EntityPlayer player,
IBlockState state,
boolean success) |
Modifier and Type | Method and Description |
---|---|
boolean |
canHarvest() |
IBlockState |
getTargetBlock() |
void |
setCanHarvest(boolean success) |
getEntityPlayer
getEntityLiving
getEntity
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
public HarvestCheck(EntityPlayer player, IBlockState state, boolean success)
public IBlockState getTargetBlock()
public boolean canHarvest()
public void setCanHarvest(boolean success)