Interface RandomOffsetPlacement

All Superinterfaces:
PlacementModifier, Wrapper

@NullMarked @AsOf("3.0.0") public interface RandomOffsetPlacement extends PlacementModifier
Applies an offset to the current position. The offset is only random when the given provider is not a constant. The X and Z axes share the same provider but are sampled individually, so their resulting offsets may differ.
Since:
3.0.0
See Also:
  • Method Details

    • xzSpread

      @AsOf("3.0.0") IntProvider xzSpread()
      The offset applied to both the X and Z axes, sampled individually per axis.
      Returns:
      the horizontal spread provider
      Since:
      3.0.0
    • ySpread

      @AsOf("3.0.0") IntProvider ySpread()
      The offset applied to the Y axis.
      Returns:
      the vertical spread provider
      Since:
      3.0.0
    • toBuilder

      @AsOf("3.0.0") default RandomOffsetPlacement.Builder toBuilder()
      Converts this object back to a builder.
      Returns:
      a builder with the same values as this object
      Since:
      3.0.0
    • of

      @AsOf("3.0.0") static RandomOffsetPlacement of(IntProvider xzSpread, IntProvider ySpread)
      Creates a new random offset placement.
      Parameters:
      xzSpread - the offset applied to both the X and Z axes, between -16 and 16 (inclusive)
      ySpread - the offset applied to the Y axis, between -16 and 16 (inclusive)
      Returns:
      a new random offset placement
      Since:
      3.0.0
    • builder

      @AsOf("3.0.0") static RandomOffsetPlacement.Builder builder()
      Creates a new builder.
      Returns:
      a new builder
      Since:
      3.0.0