public class ScriptingContext
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
boolean |
commandLine |
Constructor and Description |
---|
ScriptingContext(boolean commandLine) |
Modifier and Type | Method and Description |
---|---|
MappingOp |
applyHeightMap(HeightMap heightMap)
Map a height map to a layer or to the terrain type, optionally using a
filter or other conditions.
|
MappingOp |
applyLayer(Layer layer)
Apply a layer to the world, optionally using a filter or other
conditions.
|
MappingOp |
applyTerrain(int terrainIndex)
Apply a layer to the world, optionally using a filter or other
conditions.
|
void |
checkGoCalled(java.lang.String commandName) |
CreateFilterOp |
createFilter() |
ImportHeightMapOp |
createWorld()
Import a height map as a new WorldPainter world.
|
ExportWorldOp |
exportWorld(World2 world)
Export a WorldPainter world as a new Minecraft map.
|
GetBiomeIdOp |
getBiomeId()
Get a biome ID by name.
|
GetHeightMapOp |
getHeightMap() |
GetLayerOp |
getLayer()
Get a WorldPainter layer from a file, an existing world, or from the
standard WorldPainter layers.
|
GetPlatformOp |
getMapFormat()
Get a map format by id or name.
|
GetTerrainOp |
getTerrain()
Load a WorldPainter .terrain file from the file system.
|
java.lang.String |
getVersion()
Get the WorldPainter version string.
|
GetWorldOp |
getWorld()
Load a WorldPainter .world file from the file system.
|
InstallCustomTerrainOp |
installCustomTerrain(MixedMaterial terrain)
Install a custom terrain in a world, returning the terrain index to use
for applying the terrain.
|
MergeWorldOp |
mergeWorld() |
SaveWorldOp |
saveWorld(World2 world)
Save a world to disk.
|
public java.lang.String getVersion()
public GetWorldOp getWorld()
java.io.IOException
java.lang.ClassNotFoundException
public GetLayerOp getLayer()
public GetTerrainOp getTerrain()
java.io.IOException
java.lang.ClassNotFoundException
public ImportHeightMapOp createWorld()
public ExportWorldOp exportWorld(World2 world) throws ScriptException
world
- The world to export.java.io.IOException
ScriptException
public MergeWorldOp mergeWorld()
public SaveWorldOp saveWorld(World2 world) throws ScriptException
world
- The world to save.ScriptException
public GetHeightMapOp getHeightMap()
public MappingOp applyHeightMap(HeightMap heightMap) throws ScriptException
ScriptException
public MappingOp applyLayer(Layer layer) throws ScriptException
ScriptException
public MappingOp applyTerrain(int terrainIndex) throws ScriptException
ScriptException
public InstallCustomTerrainOp installCustomTerrain(MixedMaterial terrain) throws ScriptException
terrain
- The terrain to install.ScriptException
public CreateFilterOp createFilter()
public GetPlatformOp getMapFormat()
public GetBiomeIdOp getBiomeId()
public void checkGoCalled(java.lang.String commandName)