The TranslatorΒΆ
Amulet is built on top of a powerful translator which allows editing data in any version of the users choice regardless of which platform and game version the data originated in.
The translator will be further expanded upon in further examples but this should introduce it and explain some of the methods to get you started.
The translator for the level is found in
translation_manager
and can be used
to find which platforms and versions are supported.
platforms()
will give a list of the valid platforms and
version_numbers()
will give a list of versions numbers for a given platform.
import amulet
# load the level
level = amulet.load_level("level")
level.translation_manager.platforms()
# ['bedrock', 'java', 'universal']
level.translation_manager.version_numbers("bedrock")
# [(1, 10, 0), (1, 11, 0), (1, 12, 0), (1, 13, 0), (1, 14, 0), ...]
# close the world
level.close()