Class BlockEvent.EntityMultiPlaceEvent

java.lang.Object
net.neoforged.bus.api.Event
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.
  • Field Details

  • Constructor Details

    • EntityMultiPlaceEvent

      public EntityMultiPlaceEvent(@NotNull @NotNull List<BlockSnapshot> blockSnapshots, @NotNull @NotNull BlockState placedAgainst, @Nullable @Nullable Entity entity)
  • Method Details

    • getReplacedBlockSnapshots

      public 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