Class AxisPlacementRule
java.lang.Object
net.minestom.server.instance.block.rule.BlockPlacementRule
net.minestom.server.instance.block.rule.vanilla.AxisPlacementRule
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionblockPlace
(@NotNull Instance instance, @NotNull Block block, @NotNull BlockFace blockFace, @NotNull Point blockPosition, @NotNull Player pl) Called when the block is placed.@NotNull Block
blockUpdate
(@NotNull Instance instance, @NotNull Point blockPosition, @NotNull Block block) Called when the block state id can be updated (for instance if a neighbour block changed).Methods inherited from class net.minestom.server.instance.block.rule.BlockPlacementRule
getBlock
-
Constructor Details
-
AxisPlacementRule
-
-
Method Details
-
blockUpdate
@NotNull public @NotNull Block blockUpdate(@NotNull @NotNull Instance instance, @NotNull @NotNull Point blockPosition, @NotNull @NotNull Block block) Description copied from class:BlockPlacementRule
Called when the block state id can be updated (for instance if a neighbour block changed).- Specified by:
blockUpdate
in classBlockPlacementRule
- Parameters:
instance
- the instance of the blockblockPosition
- the block positionblock
- the current block- Returns:
- the updated block
-
blockPlace
public Block blockPlace(@NotNull @NotNull Instance instance, @NotNull @NotNull Block block, @NotNull @NotNull BlockFace blockFace, @NotNull @NotNull Point blockPosition, @NotNull @NotNull Player pl) Description copied from class:BlockPlacementRule
Called when the block is placed.- Specified by:
blockPlace
in classBlockPlacementRule
- Parameters:
instance
- the instance of the blockblock
- the block placedblockFace
- the block faceblockPosition
- the block positionpl
- the player who placed the block- Returns:
- the block to place,
null
to cancel
-