Class BlockEvent.EntityMultiPlaceEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.level.BlockEvent
net.neoforged.neoforge.event.level.BlockEvent.EntityPlaceEvent
net.neoforged.neoforge.event.level.BlockEvent.EntityMultiPlaceEvent
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
- Enclosing class:
BlockEvent
public static class BlockEvent.EntityMultiPlaceEvent
extends BlockEvent.EntityPlaceEvent
implements net.neoforged.bus.api.ICancellableEvent
Fired when a single block placement triggers the
creation of multiple blocks(e.g. placing a bed block). The block returned
by
BlockEvent.state
and its related methods is the block where
the placed block would exist if the placement only affected a single
block.-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.level.BlockEvent
BlockEvent.BlockToolModificationEvent, BlockEvent.BreakEvent, BlockEvent.EntityMultiPlaceEvent, BlockEvent.EntityPlaceEvent, BlockEvent.FarmlandTrampleEvent, BlockEvent.FluidPlaceBlockEvent, BlockEvent.NeighborNotifyEvent, BlockEvent.PortalSpawnEvent
-
Field Summary
-
Constructor Summary
ConstructorDescriptionEntityMultiPlaceEvent
(List<BlockSnapshot> blockSnapshots, BlockState placedAgainst, @Nullable Entity entity) -
Method Summary
Modifier and TypeMethodDescriptionGets a list of BlockSnapshots for all blocks which were replaced by the placement of the new blocks.Methods inherited from class net.neoforged.neoforge.event.level.BlockEvent.EntityPlaceEvent
getBlockSnapshot, getEntity, getPlacedAgainst, getPlacedBlock
Methods inherited from class net.neoforged.neoforge.event.level.BlockEvent
getLevel, getPos, getState
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
-
blockSnapshots
-
-
Constructor Details
-
EntityMultiPlaceEvent
public EntityMultiPlaceEvent(List<BlockSnapshot> blockSnapshots, BlockState placedAgainst, @Nullable @Nullable Entity entity)
-
-
Method Details
-
getReplacedBlockSnapshots
Gets a list of BlockSnapshots for all blocks which were replaced by the placement of the new blocks. Most of these blocks will just be of type AIR.- Returns:
- immutable list of replaced BlockSnapshots
-