Class StairsPlacementRule

java.lang.Object
net.minestom.server.instance.block.rule.BlockPlacementRule
net.minestom.server.instance.block.rule.vanilla.StairsPlacementRule

public class StairsPlacementRule extends BlockPlacementRule
  • Constructor Details

    • StairsPlacementRule

      public StairsPlacementRule(@NotNull @NotNull Block block)
  • 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 class BlockPlacementRule
      Parameters:
      instance - the instance of the block
      blockPosition - the block position
      block - 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 player)
      Description copied from class: BlockPlacementRule
      Called when the block is placed.
      Specified by:
      blockPlace in class BlockPlacementRule
      Parameters:
      instance - the instance of the block
      block - the block placed
      blockFace - the block face
      blockPosition - the block position
      player - the player who placed the block
      Returns:
      the block to place, null to cancel