Interface BlockEvent.Place
- Enclosing interface:
- BlockEvent
public static interface BlockEvent.Place
-
Method Summary
Modifier and TypeMethodDescriptionplaceBlock
(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, @Nullable net.minecraft.world.entity.Entity placer) Invoked when a block is placed.
-
Method Details
-
placeBlock
EventResult placeBlock(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, @Nullable @Nullable net.minecraft.world.entity.Entity placer) Invoked when a block is placed.- Parameters:
level
- The level the block is in.pos
- The position of the block.state
- The future state of the block.placer
- The entity who is placing it. Can benull
, e.g. when a dispenser places something.- Returns:
- A
EventResult
determining the outcome of the event, the execution of the vanilla block placing may be cancelled by the result.
-