Interface CarvingContext<C>

Type Parameters:
C - the custom carver configuration type
All Superinterfaces:
Wrapper

@NullMarked @AsOf("4.0.0") public interface CarvingContext<C> extends Wrapper
The mask-only output context supplied to a CustomCarver. Minecraft 26.3 owns the block and fluid states produced for carved positions.
Since:
4.0.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Decides whether a position inside an ellipsoid should remain uncarved.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canReach(double x, double z, int currentStep, int totalSteps, float thickness)
    Checks whether a carving path can still reach the current target chunk.
    void
    carve(int x, int y, int z)
    Marks an absolute world position as carved when it lies in the target chunk.
    default boolean
    carveEllipsoid(double x, double y, double z, double horizontalRadius, double verticalRadius)
    Marks the positions inside an ellipsoid as carved using the default ellipsoid boundary check.
    boolean
    carveEllipsoid(double x, double y, double z, double horizontalRadius, double verticalRadius, CarvingContext.CarveSkipChecker checker)
    Marks the positions inside an ellipsoid as carved.
    The chunk whose carving mask is being written.
    The configuration supplied to the custom carver.
    int
    The maximum generation y-coordinate available to the carver.
    int
    The minimum generation y-coordinate available to the carver.
    The random source for the current carving operation.
    The chunk from which the carver started.

    Methods inherited from interface Wrapper

    asHandle, toMinecraft, unwrap
  • Method Details

    • config

      @AsOf("4.0.0") C config()
      The configuration supplied to the custom carver.
      Returns:
      the custom carver configuration
      Since:
      4.0.0
    • random

      @AsOf("4.0.0") Random random()
      The random source for the current carving operation.
      Returns:
      the carving random source
      Since:
      4.0.0
    • sourceChunk

      @AsOf("4.0.0") ChunkLocation sourceChunk()
      The chunk from which the carver started.
      Returns:
      the source chunk location
      Since:
      4.0.0
    • chunkLocation

      @AsOf("4.0.0") ChunkLocation chunkLocation()
      The chunk whose carving mask is being written.
      Returns:
      the target chunk location
      Since:
      4.0.0
    • minGenY

      @AsOf("4.0.0") int minGenY()
      The minimum generation y-coordinate available to the carver.
      Returns:
      the minimum generation y-coordinate
      Since:
      4.0.0
    • maxGenY

      @AsOf("4.0.0") int maxGenY()
      The maximum generation y-coordinate available to the carver.
      Returns:
      the maximum generation y-coordinate
      Since:
      4.0.0
    • carve

      @AsOf("4.0.0") void carve(int x, int y, int z)
      Marks an absolute world position as carved when it lies in the target chunk.
      Parameters:
      x - the absolute x-coordinate
      y - the absolute y-coordinate
      z - the absolute z-coordinate
      Since:
      4.0.0
    • carveEllipsoid

      @AsOf("4.0.0") boolean carveEllipsoid(double x, double y, double z, double horizontalRadius, double verticalRadius, CarvingContext.CarveSkipChecker checker)
      Marks the positions inside an ellipsoid as carved.
      Parameters:
      x - the absolute x-coordinate of the ellipsoid center
      y - the absolute y-coordinate of the ellipsoid center
      z - the absolute z-coordinate of the ellipsoid center
      horizontalRadius - the horizontal radius of the ellipsoid
      verticalRadius - the vertical radius of the ellipsoid
      checker - the callback deciding whether an otherwise eligible position is skipped
      Returns:
      whether at least one position was marked as carved
      Since:
      4.0.0
    • carveEllipsoid

      @AsOf("4.0.0") default boolean carveEllipsoid(double x, double y, double z, double horizontalRadius, double verticalRadius)
      Marks the positions inside an ellipsoid as carved using the default ellipsoid boundary check.
      Parameters:
      x - the absolute x-coordinate of the ellipsoid center
      y - the absolute y-coordinate of the ellipsoid center
      z - the absolute z-coordinate of the ellipsoid center
      horizontalRadius - the horizontal radius of the ellipsoid
      verticalRadius - the vertical radius of the ellipsoid
      Returns:
      whether at least one position was marked as carved
      Since:
      4.0.0
    • canReach

      @AsOf("4.0.0") boolean canReach(double x, double z, int currentStep, int totalSteps, float thickness)
      Checks whether a carving path can still reach the current target chunk.
      Parameters:
      x - the current relative x-coordinate
      z - the current relative z-coordinate
      currentStep - the current path step
      totalSteps - the total number of path steps
      thickness - the current carving thickness
      Returns:
      whether the path can still reach the target chunk
      Since:
      4.0.0