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.
  • Field Details

    • entity

      private final Entity entity
    • blockSnapshot

      private final BlockSnapshot blockSnapshot
    • placedBlock

      private final BlockState placedBlock
    • placedAgainst

      private final BlockState placedAgainst
  • Constructor Details

  • Method Details

    • getEntity

      @Nullable public @Nullable Entity getEntity()
    • getBlockSnapshot

      public BlockSnapshot getBlockSnapshot()
    • getPlacedBlock

      public BlockState getPlacedBlock()
    • getPlacedAgainst

      public BlockState getPlacedAgainst()