Class BlockEvent.EntityPlaceEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.world.BlockEvent
net.minecraftforge.event.world.BlockEvent.EntityPlaceEvent
Direct Known Subclasses:
BlockEvent.EntityMultiPlaceEvent
Enclosing class:
BlockEvent

public static class BlockEvent.EntityPlaceEvent extends BlockEvent
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

    • EntityPlaceEvent

      public EntityPlaceEvent(@Nonnull BlockSnapshot blockSnapshot, @Nonnull BlockState placedAgainst, @Nullable Entity entity)
  • Method Details

    • getEntity

      @Nullable public Entity getEntity()
    • getBlockSnapshot

      public BlockSnapshot getBlockSnapshot()
    • getPlacedBlock

      public BlockState getPlacedBlock()
    • getPlacedAgainst

      public BlockState getPlacedAgainst()