public abstract class ArbitraryShape
extends java.lang.Object
getMaterial(int, int, int, com.sk89q.worldedit.world.block.BaseBlock)
method.Constructor and Description |
---|
ArbitraryShape(Region extent) |
Modifier and Type | Method and Description |
---|---|
int |
generate(EditSession editSession,
Pattern pattern,
boolean hollow)
Generates the shape.
|
protected Region |
getExtent() |
protected abstract BaseBlock |
getMaterial(int x,
int y,
int z,
BaseBlock defaultMaterial)
Override this function to specify the shape to generate.
|
protected final Region extent
public ArbitraryShape(Region extent)
protected Region getExtent()
protected abstract BaseBlock getMaterial(int x, int y, int z, BaseBlock defaultMaterial)
x
- X coordinate to be queriedy
- Y coordinate to be queriedz
- Z coordinate to be querieddefaultMaterial
- The material returned by the pattern for the current block.public int generate(EditSession editSession, Pattern pattern, boolean hollow) throws MaxChangedBlocksException
editSession
- The EditSession to use.pattern
- The pattern to generate default materials from.hollow
- Specifies whether to generate a hollow shape.MaxChangedBlocksException
- if the maximum blocks changed is exceeded