Interface BlockEvent.Place
- Enclosing interface:
- BlockEvent
public static interface BlockEvent.Place
-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.InteractionResultplaceBlock(net.minecraft.world.level.Level world, 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
net.minecraft.world.InteractionResult placeBlock(net.minecraft.world.level.Level world, 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:
world- 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:
- Any other value than
InteractionResult.PASScancels the block placement.
-