{"id":24359,"library":"pymctranslate","title":"PyMcTranslate","description":"PyMcTranslate is a Python library for translating Minecraft data files (e.g., block state mappings, item IDs) between different Minecraft versions. It automates the conversion of data structures used by tools and mods, supporting versioned translation maps. Current version 1.2.43, release cadence is irregular.","status":"active","version":"1.2.43","language":"python","source_language":"en","source_url":"https://github.com/minecraft-data/pymctranslate","tags":["minecraft","translation","versioning","data-conversion"],"install":[{"cmd":"pip install pymctranslate","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Used for reading/writing NBT data in Minecraft save formats","package":"nbtlib","optional":false}],"imports":[{"note":"The main class is TranslationManager, not Translator.","wrong":"from pymctranslate import Translator","symbol":"TranslationManager","correct":"from pymctranslate import TranslationManager"}],"quickstart":{"code":"from pymctranslate import TranslationManager\n\nmanager = TranslationManager()\n# Translate block 'minecraft:stone' from version 1.12.2 to 1.16.5\ntranslated = manager.translate('minecraft:stone', source='1.12.2', target='1.16.5')\nprint(translated)\n# Output: 'minecraft:stone' (or block state data)","lang":"python","description":"Initialize a TranslationManager and use .translate() to convert identifiers between versions."},"warnings":[{"fix":"Call manager.update() after initialization to ensure latest maps.","message":"Translation maps are stored in local cache. If cache is outdated or missing, translation may fail or return original identifier. Always call manager.update() to refresh maps before first use.","severity":"breaking","affected_versions":"all"},{"fix":"Use string like '1.12.2', not '1.12' or 'minecraft 1.12.2'.","message":"The library uses semantic versioning for Minecraft versions (e.g., '1.12.2'). Do not include 'minecraft:' prefix in the version string; only the numeric version.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace manager.translate_slot(...) with manager.translate(..., slot=...).","message":"The method 'translate_slot' has been deprecated since v1.2.0, use 'translate' with appropriate slot parameter instead.","severity":"deprecated","affected_versions":">=1.2.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure Python >=3.10 and install via pip: pip install pymctranslate","cause":"Installed in a Python environment lower than 3.10 or pip not found.","error":"ModuleNotFoundError: No module named 'pymctranslate'"},{"fix":"Run manager.update() to download latest maps. Verify the identifier is correct for the source version (e.g., 'minecraft:stone' exists in 1.12.2).","cause":"Translation maps not downloaded or outdated; or the identifier does not exist in source version.","error":"ValueError: Cannot find translation for 'minecraft:stone' from 1.12.2 to 1.16.5"},{"fix":"Use manager.translate(identifier, source, target, slot='...') instead.","cause":"Using deprecated method name that was removed in recent version.","error":"AttributeError: 'TranslationManager' object has no attribute 'translate_slot'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}