Package net.minecraftforge.event.world
Class BlockEvent.EntityMultiPlaceEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.event.world.BlockEvent
-
- net.minecraftforge.event.world.BlockEvent.EntityPlaceEvent
-
- net.minecraftforge.event.world.BlockEvent.EntityMultiPlaceEvent
-
- Enclosing class:
- BlockEvent
public static class BlockEvent.EntityMultiPlaceEvent extends BlockEvent.EntityPlaceEvent
Fired when a single block placement triggers the creation of multiple blocks(e.g. placing a bed block). The block returned byBlockEvent.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.minecraftforge.event.world.BlockEvent
BlockEvent.BlockToolInteractEvent, BlockEvent.BreakEvent, BlockEvent.CreateFluidSourceEvent, BlockEvent.CropGrowEvent, BlockEvent.EntityMultiPlaceEvent, BlockEvent.EntityPlaceEvent, BlockEvent.FarmlandTrampleEvent, BlockEvent.FluidPlaceBlockEvent, BlockEvent.NeighborNotifyEvent, BlockEvent.PortalSpawnEvent
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<BlockSnapshot>
blockSnapshots
-
Constructor Summary
Constructors Constructor Description EntityMultiPlaceEvent(java.util.List<BlockSnapshot> blockSnapshots, BlockState placedAgainst, Entity entity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<BlockSnapshot>
getReplacedBlockSnapshots()
Gets a list of BlockSnapshots for all blocks which were replaced by the placement of the new blocks.-
Methods inherited from class net.minecraftforge.event.world.BlockEvent.EntityPlaceEvent
getBlockSnapshot, getEntity, getPlacedAgainst, getPlacedBlock
-
Methods inherited from class net.minecraftforge.event.world.BlockEvent
getPos, getState, getWorld
-
-
-
-
Field Detail
-
blockSnapshots
private final java.util.List<BlockSnapshot> blockSnapshots
-
-
Constructor Detail
-
EntityMultiPlaceEvent
public EntityMultiPlaceEvent(@Nonnull java.util.List<BlockSnapshot> blockSnapshots, @Nonnull BlockState placedAgainst, @Nullable Entity entity)
-
-
Method Detail
-
getReplacedBlockSnapshots
public java.util.List<BlockSnapshot> 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
-
-