Class LivingDestroyBlockEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityEvent
net.neoforged.neoforge.event.entity.living.LivingEvent
net.neoforged.neoforge.event.entity.living.LivingDestroyBlockEvent
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
public class LivingDestroyBlockEvent
extends LivingEvent
implements net.neoforged.bus.api.ICancellableEvent
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 of
This event is
If this event is canceled, the block will not be destroyed.
This event does not have a result.
This event is fired on the
IBlockExtension.canEntityDestroy(BlockState, BlockGetter, BlockPos, Entity)
This event is
ICancellableEvent
.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 the
NeoForge.EVENT_BUS
.-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingTickEvent, LivingEvent.LivingVisibilityEvent
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size
Nested classes/interfaces inherited from class net.neoforged.bus.api.Event
net.neoforged.bus.api.Event.HasResult, net.neoforged.bus.api.Event.Result
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLivingDestroyBlockEvent
(LivingEntity entity, BlockPos pos, BlockState state) -
Method Summary
Methods inherited from class net.neoforged.neoforge.event.entity.living.LivingEvent
getEntity
Methods inherited from class net.neoforged.bus.api.Event
getResult, hasResult, setResult
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
Field Details
-
pos
-
state
-
-
Constructor Details
-
LivingDestroyBlockEvent
-
-
Method Details
-
getState
-
getPos
-