public class World2 extends InstanceKeeper implements java.io.Serializable, java.lang.Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
World2.BorderSettings |
static class |
World2.Warning |
InstanceKeeper.InstantiationListener<T>
Modifier and Type | Field and Description |
---|---|
static int |
BIOME_ALGORITHM_AUTO_BIOMES
Deprecated.
|
static int |
BIOME_ALGORITHM_CUSTOM_BIOMES
Deprecated.
|
static int |
BIOME_ALGORITHM_NONE
Deprecated.
|
static long |
DEFAULT_LAND_SEED |
static long |
DEFAULT_OCEAN_SEED |
static java.lang.String |
METADATA_KEY_NAME
A string containing the name of the world.
|
static java.lang.String |
METADATA_KEY_PLUGINS
An optional two dimensional
String [][2] array containing the
plugins installed in the WorldPainter instance which saved the file. |
static java.lang.String |
METADATA_KEY_TIMESTAMP
A
Date containing the time at which this file was saved. |
static java.lang.String |
METADATA_KEY_WP_BUILD
A
String containing the WorldPainter build with which this file
was saved. |
static java.lang.String |
METADATA_KEY_WP_VERSION
A
String containing the WorldPainter version with which this file
was saved. |
Constructor and Description |
---|
World2(Platform platform,
int minHeight,
int maxHeight) |
World2(Platform platform,
long minecraftSeed,
TileFactory tileFactory) |
Modifier and Type | Method and Description |
---|---|
void |
addDimension(Dimension dimension) |
void |
addHistoryEntry(int key,
java.io.Serializable... args) |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener) |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener) |
void |
clearLayerData(Layer layer) |
<T> java.util.Optional<T> |
getAttribute(org.pepsoft.util.AttributeKey<T> key) |
World2.BorderSettings |
getBorderSettings() |
long |
getChangeNo() |
java.util.List<java.io.File> |
getDataPacks() |
int |
getDifficulty() |
Dimension |
getDimension(Dimension.Anchor anchor) |
Dimension |
getDimension(int dim)
Deprecated.
Use
#getDimension(Anchor) . |
java.util.Set<Dimension> |
getDimensions() |
java.util.Set<Dimension> |
getDimensionsWithRole(Dimension.Role role,
boolean inverted,
int id) |
WorldExportSettings |
getExportSettings() |
GameType |
getGameType() |
Generator |
getGenerator()
Deprecated.
|
java.lang.String |
getGeneratorOptions()
Deprecated.
|
java.util.List<HistoryEntry> |
getHistory() |
java.io.File |
getImportedFrom()
The
level.dat file of the map this world was Imported from. |
int |
getMaxHeight() |
java.io.File |
getMergedWith()
The
level.dat file of the map with which this world was last Merged. |
java.util.Map<java.lang.String,java.lang.Object> |
getMetadata() |
int |
getMinHeight() |
MixedMaterial |
getMixedMaterial(int index) |
java.lang.String |
getName() |
Platform |
getPlatform() |
java.awt.Point |
getSpawnPoint() |
Dimension.Anchor |
getSpawnPointDimension() |
java.awt.Point |
getTileCoordinates(int worldX,
int worldY) |
java.awt.Point |
getTileCoordinates(java.awt.Point worldCoords) |
Direction |
getUpIs() |
boolean |
isAllowCheats() |
boolean |
isAllowMerging() |
boolean |
isAskToConvertToAnvil() |
boolean |
isAskToRotate() |
boolean |
isCreateGoodiesChest() |
boolean |
isDimensionPresent(Dimension.Anchor anchor) |
boolean |
isExtendedBlockIds() |
boolean |
isMapFeatures() |
long |
measureSize() |
Dimension |
removeDimension(Dimension.Anchor anchor) |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener) |
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener) |
void |
save(java.util.zip.ZipOutputStream out) |
void |
setAllowCheats(boolean allowCheats) |
void |
setAllowMerging(boolean allowMerging) |
void |
setAskToConvertToAnvil(boolean askToConvertToAnvil) |
void |
setAskToRotate(boolean askToRotate) |
<T> void |
setAttribute(org.pepsoft.util.AttributeKey<T> key,
T value) |
void |
setCreateGoodiesChest(boolean createGoodiesChest) |
void |
setDataPacks(java.util.List<java.io.File> dataPacks) |
void |
setDifficulty(int difficulty) |
void |
setExportSettings(WorldExportSettings exportSettings) |
void |
setExtendedBlockIds(boolean extendedBlockIds) |
void |
setGameType(GameType gameType) |
void |
setImportedFrom(java.io.File importedFrom) |
void |
setMapFeatures(boolean mapFeatures) |
void |
setMaxHeight(int maxHeight) |
void |
setMergedWith(java.io.File mergedWith) |
void |
setMetadata(java.util.Map<java.lang.String,java.lang.Object> metadata) |
void |
setMinHeight(int minHeight) |
void |
setMixedMaterial(int index,
MixedMaterial material) |
void |
setName(java.lang.String name) |
void |
setPlatform(Platform platform) |
void |
setSpawnPoint(java.awt.Point spawnPoint) |
void |
setSpawnPointDimension(Dimension.Anchor spawnPointDimension) |
void |
setUpIs(Direction upIs) |
void |
transform(CoordinateTransform transform,
org.pepsoft.util.ProgressReceiver progressReceiver)
Transforms all dimensions of this world horizontally.
|
void |
transform(Dimension.Anchor anchor,
CoordinateTransform transform,
org.pepsoft.util.ProgressReceiver progressReceiver)
Transforms one dimension horizontally.
|
setInstantiationListener
@Deprecated public static final int BIOME_ALGORITHM_NONE
@Deprecated public static final int BIOME_ALGORITHM_CUSTOM_BIOMES
@Deprecated public static final int BIOME_ALGORITHM_AUTO_BIOMES
public static final long DEFAULT_OCEAN_SEED
public static final long DEFAULT_LAND_SEED
public static final java.lang.String METADATA_KEY_WP_VERSION
String
containing the WorldPainter version with which this file
was saved.public static final java.lang.String METADATA_KEY_WP_BUILD
String
containing the WorldPainter build with which this file
was saved.public static final java.lang.String METADATA_KEY_TIMESTAMP
Date
containing the time at which this file was saved.public static final java.lang.String METADATA_KEY_PLUGINS
String
[][2] array containing the
plugins installed in the WorldPainter instance which saved the file. One
row per plugin, which each row containing two elements, the first being
the plugin name, the second being the plugin version.
May be null
if no non-standard plugins were present.
public static final java.lang.String METADATA_KEY_NAME
public World2(Platform platform, int minHeight, int maxHeight)
public World2(Platform platform, long minecraftSeed, TileFactory tileFactory)
public long getChangeNo()
public java.lang.String getName()
public void setName(java.lang.String name)
public boolean isCreateGoodiesChest()
public void setCreateGoodiesChest(boolean createGoodiesChest)
public java.awt.Point getTileCoordinates(int worldX, int worldY)
public java.awt.Point getTileCoordinates(java.awt.Point worldCoords)
public java.awt.Point getSpawnPoint()
public void setSpawnPoint(java.awt.Point spawnPoint)
public java.io.File getImportedFrom()
level.dat
file of the map this world was Imported from.public void setImportedFrom(java.io.File importedFrom)
public boolean isMapFeatures()
public void setMapFeatures(boolean mapFeatures)
public GameType getGameType()
public void setGameType(GameType gameType)
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
@Deprecated public Dimension getDimension(int dim)
#getDimension(Anchor)
.public boolean isDimensionPresent(Dimension.Anchor anchor)
public Dimension getDimension(Dimension.Anchor anchor)
public java.util.Set<Dimension> getDimensions()
public java.util.Set<Dimension> getDimensionsWithRole(Dimension.Role role, boolean inverted, int id)
public final void addDimension(Dimension dimension)
public Dimension removeDimension(Dimension.Anchor anchor)
public MixedMaterial getMixedMaterial(int index)
public void setMixedMaterial(int index, MixedMaterial material)
public int getMinHeight()
public void setMinHeight(int minHeight)
public int getMaxHeight()
public void setMaxHeight(int maxHeight)
@Deprecated public Generator getGenerator()
Dimension.getGenerator()
.public Platform getPlatform()
public void setPlatform(Platform platform)
public boolean isAskToConvertToAnvil()
public void setAskToConvertToAnvil(boolean askToConvertToAnvil)
public boolean isAskToRotate()
public void setAskToRotate(boolean askToRotate)
public Direction getUpIs()
public void setUpIs(Direction upIs)
public boolean isAllowMerging()
public void setAllowMerging(boolean allowMerging)
public boolean isAllowCheats()
public void setAllowCheats(boolean allowCheats)
@Deprecated public java.lang.String getGeneratorOptions()
Dimension.getGenerator()
.null
if the surface dimension
generator is not a custom generator.public boolean isExtendedBlockIds()
public void setExtendedBlockIds(boolean extendedBlockIds)
public int getDifficulty()
public void setDifficulty(int difficulty)
public WorldExportSettings getExportSettings()
public void setExportSettings(WorldExportSettings exportSettings)
public java.util.List<HistoryEntry> getHistory()
public void addHistoryEntry(int key, java.io.Serializable... args)
public java.util.Map<java.lang.String,java.lang.Object> getMetadata()
public void setMetadata(java.util.Map<java.lang.String,java.lang.Object> metadata)
public World2.BorderSettings getBorderSettings()
public java.io.File getMergedWith()
level.dat
file of the map with which this world was last Merged.public void setMergedWith(java.io.File mergedWith)
public java.util.List<java.io.File> getDataPacks()
public void setDataPacks(java.util.List<java.io.File> dataPacks)
public Dimension.Anchor getSpawnPointDimension()
public void setSpawnPointDimension(Dimension.Anchor spawnPointDimension)
public <T> java.util.Optional<T> getAttribute(org.pepsoft.util.AttributeKey<T> key)
public <T> void setAttribute(org.pepsoft.util.AttributeKey<T> key, T value)
public void transform(CoordinateTransform transform, org.pepsoft.util.ProgressReceiver progressReceiver) throws org.pepsoft.util.ProgressReceiver.OperationCancelled
transform
- The coordinate transform to apply.progressReceiver
- A progress receiver which will be informed of
rotation progress.org.pepsoft.util.ProgressReceiver.OperationCancelled
public void transform(Dimension.Anchor anchor, CoordinateTransform transform, org.pepsoft.util.ProgressReceiver progressReceiver) throws org.pepsoft.util.ProgressReceiver.OperationCancelled
anchor
- The anchor of the dimension to transform.transform
- The coordinate transform to apply.progressReceiver
- A progress receiver which will be informed of
rotation progress.org.pepsoft.util.ProgressReceiver.OperationCancelled
public void clearLayerData(Layer layer)
public long measureSize()
public void save(java.util.zip.ZipOutputStream out) throws java.io.IOException
java.io.IOException