public abstract class AbstractLayerExporter<L extends Layer> extends java.lang.Object implements LayerExporter
LayerExporter
implementations.Modifier and Type | Class and Description |
---|---|
static interface |
AbstractLayerExporter.ChunksInTilesVisitor
A visitor of chunks.
|
Modifier and Type | Field and Description |
---|---|
protected Dimension |
dimension |
protected L |
layer |
protected int |
maxHeight
One more than the highest height supported by both the selected platform and configured on the dimension.
|
protected int |
maxZ
The highest height blocks should actually be placed or removed.
|
protected int |
minHeight
The lowest height supported by both the selected platform and configured on the dimension.
|
protected int |
minZ
The lowest height blocks should actually be placed or removed, taking into account such things as whether the
dimension is bottomless.
|
protected Platform |
platform |
protected ExporterSettings |
settings |
Constructor and Description |
---|
AbstractLayerExporter(Dimension dimension,
Platform platform,
ExporterSettings settings,
L layer) |
Modifier and Type | Method and Description |
---|---|
Dimension |
getDimension() |
L |
getLayer() |
protected boolean |
visitChunksForLayerInAreaForEditing(MinecraftWorld world,
Layer layer,
java.awt.Rectangle area,
Dimension dimension,
AbstractLayerExporter.ChunksInTilesVisitor visitor)
Visits the existent chunks in a particular rectangular area, and containing a particular layer, for editing.
|
protected final Dimension dimension
protected final Platform platform
protected final int minHeight
protected final int maxHeight
protected final int minZ
protected final int maxZ
protected final ExporterSettings settings
public AbstractLayerExporter(Dimension dimension, Platform platform, ExporterSettings settings, L layer)
public final Dimension getDimension()
public final L getLayer()
getLayer
in interface LayerExporter
protected final boolean visitChunksForLayerInAreaForEditing(MinecraftWorld world, Layer layer, java.awt.Rectangle area, Dimension dimension, AbstractLayerExporter.ChunksInTilesVisitor visitor)
false
.dimension
- The dimension in which to check which tiles contain the layer.world
- The MinecraftWorld
in which to visit the existent chunks.layer
- The layer to which to constrain the visited tiles.area
- The area in block coordinates in which to visit the chunks.visitor
- The visitor to invoke for each existing chunk that is in the specified area, and which is on a
tile containing the specified layer.true
is all chunks were visited, false
if the visitor returned false
.