Class AxisPlacementRule

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

public class AxisPlacementRule extends BlockPlacementRule
  • Constructor Details

    • AxisPlacementRule

      public AxisPlacementRule(@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 pl)
      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
      pl - the player who placed the block
      Returns:
      the block to place, null to cancel