Amulet Core API Reference¶
Contents:
amulet.apipackageamulet.api.blockmoduleamulet.api.block_entitymoduleamulet.api.chunkpackageamulet.api.data_typespackageamulet.api.entitymoduleamulet.api.errorsmoduleamulet.api.levelpackageamulet.api.partial_3d_arraypackageamulet.api.registrypackageamulet.api.selectionpackageamulet.api.wrapperpackage
amulet.level.formatspackageamulet.utilspackage
- amulet.load_level(path)[source]¶
Load and return a
WorldorStructureclass exposing the data atpathCalls
load_format()to try and find aFormatWrapperthat can open the data.If one is found it will wrap it with either a
WorldorStructureclass and return it.- Parameters
path (
str) – The file path to a file or directory for the object to be loaded.- Return type
- Returns
A World or Structure class instance containing the data.
- Raises
LoaderNoneMatched: If no loader could be found that can open the data at path.
Exception: Other errors.
- amulet.load_format(path)[source]¶
Find a valid subclass of
FormatWrapperand return the data wrapped in the class. This exposes a low level API to read and write the world data.Inspects the data at the given path to find a valid subclass of
FormatWrapper.If a valid wrapper is found it is set up and returned.
This is not recommended for new users and does not include a history system.
- Parameters
path (
str) – The file path to a file or directory for the object to be loaded.- Return type
- Returns
An instance of WorldFormatWrapper or StructureFormatWrapper containing the data at path.
- Raises
LoaderNoneMatched: If no loader could be found that can open the data at path.
Exception: Other errors.