Interface LevelStemEditor
Modifies a loaded world's dimension type and/or chunk generator during runtime.
Operations with this editor are transient, but you are advised to not use this on
production servers.
- Since:
- 2.3.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionApplies the queued edits to a given world.chunkGenerator(ChunkGenerator generator) Swaps the chunk generator on a given world.static LevelStemEditorcreate()Creates a new editor backed by the runtime reference-swap implementation.Swaps the dimension type on a given world.Reverts a world previously edited by this editor, restoring its original dimension type and/or chunk generator state, and clears the corresponding snapshots.
-
Method Details
-
create
Creates a new editor backed by the runtime reference-swap implementation.- Returns:
- a new editor instance
- Since:
- 2.3.0
-
chunkGenerator
Swaps the chunk generator on a given world.- Parameters:
generator- the chunk generator to swap in- Returns:
- this editor instance
- Since:
- 3.0.0
-
dimension
Swaps the dimension type on a given world.- Parameters:
dimensionType- the dimension type to swap in- Returns:
- this editor instance
- Since:
- 3.0.0
-
apply
Applies the queued edits to a given world.- Parameters:
world- the world to edit- Since:
- 2.3.0
-
restore
Reverts a world previously edited by this editor, restoring its original dimension type and/or chunk generator state, and clears the corresponding snapshots.- Parameters:
world- the world to revert- Returns:
- this editor instance
- Throws:
IllegalStateException- if this editor never edited the given world- Since:
- 3.0.0
-