Class BlockEvent.EntityPlaceEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.level.BlockEvent
net.minecraftforge.event.level.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(@NotNull @NotNull BlockSnapshot blockSnapshot, @NotNull @NotNull BlockState placedAgainst, @Nullable @Nullable Entity entity)
  • Method Details

    • getEntity

      @Nullable public @Nullable Entity getEntity()
    • getBlockSnapshot

      public BlockSnapshot getBlockSnapshot()
    • getPlacedBlock

      public BlockState getPlacedBlock()
    • getPlacedAgainst

      public BlockState getPlacedAgainst()