Interface CarvingContext<C>
- Type Parameters:
C- the custom carver configuration type
- All Superinterfaces:
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 ClassesModifier and TypeInterfaceDescriptionstatic interfaceDecides whether a position inside an ellipsoid should remain uncarved. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanReach(double x, double z, int currentStep, int totalSteps, float thickness) Checks whether a carving path can still reach the current target chunk.voidcarve(int x, int y, int z) Marks an absolute world position as carved when it lies in the target chunk.default booleancarveEllipsoid(double x, double y, double z, double horizontalRadius, double verticalRadius) Marks the positions inside an ellipsoid as carved using the default ellipsoid boundary check.booleancarveEllipsoid(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.config()The configuration supplied to the custom carver.intmaxGenY()The maximum generation y-coordinate available to the carver.intminGenY()The minimum generation y-coordinate available to the carver.random()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
-
random
-
sourceChunk
The chunk from which the carver started.- Returns:
- the source chunk location
- Since:
- 4.0.0
-
chunkLocation
The chunk whose carving mask is being written.- Returns:
- the target chunk location
- Since:
- 4.0.0
-
minGenY
The minimum generation y-coordinate available to the carver.- Returns:
- the minimum generation y-coordinate
- Since:
- 4.0.0
-
maxGenY
The maximum generation y-coordinate available to the carver.- Returns:
- the maximum generation y-coordinate
- Since:
- 4.0.0
-
carve
Marks an absolute world position as carved when it lies in the target chunk.- Parameters:
x- the absolute x-coordinatey- the absolute y-coordinatez- 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 centery- the absolute y-coordinate of the ellipsoid centerz- the absolute z-coordinate of the ellipsoid centerhorizontalRadius- the horizontal radius of the ellipsoidverticalRadius- the vertical radius of the ellipsoidchecker- 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 centery- the absolute y-coordinate of the ellipsoid centerz- the absolute z-coordinate of the ellipsoid centerhorizontalRadius- the horizontal radius of the ellipsoidverticalRadius- 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-coordinatez- the current relative z-coordinatecurrentStep- the current path steptotalSteps- the total number of path stepsthickness- the current carving thickness- Returns:
- whether the path can still reach the target chunk
- Since:
- 4.0.0
-