TranslationManager class¶
- class PyMCTranslate.py3.api.translation_manager.translation_manager.TranslationManager(json_path)[source]¶
Bases:
object
The TranslationManager is a container for a number of different Version classes.
Each Version class contains the data for a given game platform and version.
The TranslationManager exists to be a loader and accessor for the Version classes as well as containing some extra data.
Important
This class should not be directly initiated. You should instead use
PyMCTranslate.new_translation_manager()
to request that a new translation manager be created.Important
If you are using this library with Amulet an instance of this class will already exist in
World.translation_manager
.If you are for some reason directly interacting with the amulet_core’s
WorldFormatWrapper
class it too has atranslation_manager
attribute.- property biome_registry: NumericalRegistry¶
A class used to register the biome string name that pairs with the arbitrary numerical id stored in chunk.
- property block_registry: NumericalRegistry¶
A class used to register the block string name that pairs with the arbitrary numerical id stored in chunk. This is only used in worlds where the blocks ids are stored in numerical format.
- get_version(platform, version_number)[source]¶
Get a Version class for the requested platform and version number
- Parameters
- Return type
- Returns
The Version class for the given inputs.
- Raise
Raises a KeyError if it does not exist.
- platforms()[source]¶
Get a list of all the platforms there are Version classes for. Currently these are ‘java’, ‘bedrock’ and ‘universal’
- transform_universal_block(block, transform, mode=RotateMode.Nearest)[source]¶
Rotate the given universal block by the given angle.
- property universal_format: Version¶
A simple way to access the Version class for the Universal format.
- Returns
The Version class for the Universal format.