Class LivingDestroyBlockEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.event.entity.EntityEvent
-
- net.minecraftforge.event.entity.living.LivingEvent
-
- net.minecraftforge.event.entity.living.LivingDestroyBlockEvent
-
public class LivingDestroyBlockEvent extends LivingEvent
Fired when the ender dragon or wither attempts to destroy a block and when ever a zombie attempts to break a door. Basically a event version ofBlock#canEntityDestroy(IBlockState, IBlockAccess, BlockPos, Entity)
This event isCancelable
.
If this event is canceled, the block will not be destroyed.
This event does not have a result.Event.HasResult
This event is fired on theMinecraftForge.EVENT_BUS
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent, LivingEvent.LivingVisibilityEvent
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.Size
-
-
Field Summary
Fields Modifier and Type Field Description private BlockPos
pos
private BlockState
state
-
Constructor Summary
Constructors Constructor Description LivingDestroyBlockEvent(LivingEntity entity, BlockPos pos, BlockState state)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BlockPos
getPos()
BlockState
getState()
-
Methods inherited from class net.minecraftforge.event.entity.living.LivingEvent
getEntityLiving
-
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
-
-
-
-
Field Detail
-
pos
private final BlockPos pos
-
state
private final BlockState state
-
-
Constructor Detail
-
LivingDestroyBlockEvent
public LivingDestroyBlockEvent(LivingEntity entity, BlockPos pos, BlockState state)
-
-
Method Detail
-
getState
public BlockState getState()
-
getPos
public BlockPos getPos()
-
-