public static class BlockEvent.BreakEvent extends BlockEvent
BlockEvent.BreakEvent, BlockEvent.CreateFluidSourceEvent, BlockEvent.CropGrowEvent, BlockEvent.EntityMultiPlaceEvent, BlockEvent.EntityPlaceEvent, BlockEvent.FarmlandTrampleEvent, BlockEvent.FluidPlaceBlockEvent, BlockEvent.HarvestDropsEvent, BlockEvent.MultiPlaceEvent, BlockEvent.NeighborNotifyEvent, BlockEvent.PlaceEvent, BlockEvent.PortalSpawnEvent
Event.HasResult, Event.Result
Modifier and Type | Field and Description |
---|---|
private int |
exp |
private EntityPlayer |
player
Reference to the Player who broke the block.
|
Constructor and Description |
---|
BreakEvent(World world,
BlockPos pos,
IBlockState state,
EntityPlayer player) |
Modifier and Type | Method and Description |
---|---|
int |
getExpToDrop()
Get the experience dropped by the block after the event has processed
|
EntityPlayer |
getPlayer() |
void |
setExpToDrop(int exp)
Set the amount of experience dropped by the block after the event has processed
|
getPos, getState, getWorld
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
private final EntityPlayer player
private int exp
public BreakEvent(World world, BlockPos pos, IBlockState state, EntityPlayer player)
public EntityPlayer getPlayer()
public int getExpToDrop()
public void setExpToDrop(int exp)
exp
- 1 or higher to drop experience, else nothing will drop