Package net.minecraftforge.event.world
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.
-
-
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 BlockSnapshot
blockSnapshot
private Entity
entity
private BlockState
placedAgainst
private BlockState
placedBlock
-
Constructor Summary
Constructors Constructor Description EntityPlaceEvent(BlockSnapshot blockSnapshot, BlockState placedAgainst, Entity entity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BlockSnapshot
getBlockSnapshot()
Entity
getEntity()
BlockState
getPlacedAgainst()
BlockState
getPlacedBlock()
-
Methods inherited from class net.minecraftforge.event.world.BlockEvent
getPos, getState, getWorld
-
-
-
-
Field Detail
-
entity
private final Entity entity
-
blockSnapshot
private final BlockSnapshot blockSnapshot
-
placedBlock
private final BlockState placedBlock
-
placedAgainst
private final BlockState placedAgainst
-
-
Constructor Detail
-
EntityPlaceEvent
public EntityPlaceEvent(@Nonnull BlockSnapshot blockSnapshot, @Nonnull BlockState placedAgainst, @Nullable Entity entity)
-
-
Method Detail
-
getEntity
@Nullable public Entity getEntity()
-
getBlockSnapshot
public BlockSnapshot getBlockSnapshot()
-
getPlacedBlock
public BlockState getPlacedBlock()
-
getPlacedAgainst
public BlockState getPlacedAgainst()
-
-