Class BlockEvent.EntityPlaceEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.level.BlockEvent
net.neoforged.neoforge.event.level.BlockEvent.EntityPlaceEvent
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
- Direct Known Subclasses:
BlockEvent.EntityMultiPlaceEvent
- Enclosing class:
BlockEvent
public static class BlockEvent.EntityPlaceEvent
extends BlockEvent
implements net.neoforged.bus.api.ICancellableEvent
Called when a block is placed.
If a Block Place event is cancelled, the block will not be placed.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.level.BlockEvent
BlockEvent.BlockToolModificationEvent, BlockEvent.BreakEvent, BlockEvent.CreateFluidSourceEvent, BlockEvent.CropGrowEvent, BlockEvent.EntityMultiPlaceEvent, BlockEvent.EntityPlaceEvent, BlockEvent.FarmlandTrampleEvent, BlockEvent.FluidPlaceBlockEvent, BlockEvent.NeighborNotifyEvent, BlockEvent.PortalSpawnEvent
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
Modifier and TypeFieldDescriptionprivate final BlockSnapshot
private final Entity
private final BlockState
private final BlockState
-
Constructor Summary
ConstructorDescriptionEntityPlaceEvent
(BlockSnapshot blockSnapshot, BlockState placedAgainst, @Nullable Entity entity) -
Method Summary
Methods inherited from class net.neoforged.neoforge.event.level.BlockEvent
getLevel, getPos, getState
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
-
entity
-
blockSnapshot
-
placedBlock
-
placedAgainst
-
-
Constructor Details
-
EntityPlaceEvent
public EntityPlaceEvent(BlockSnapshot blockSnapshot, BlockState placedAgainst, @Nullable @Nullable Entity entity)
-
-
Method Details
-
getEntity
-
getBlockSnapshot
-
getPlacedBlock
-
getPlacedAgainst
-