{{lowercase title}} {{about|the directory used by Bedrock Edition|the directory used by ''Java Edition''|.minecraft}} {{distinguish|Mojang.com}} {{exclusive|bedrock|education}} {{File|directory|'''com.mojang'''|inline=1}} is a directory used internally by ''Minecraft'' Bedrock Edition. It contains worlds, [[JSON]] data, and other files necessary for the game to run. == Location == {{/path}} === Android quirks === On Android, there are two distinct {{File|directory|'''com.mojang'''|inline=1}} directories - internal and external. If the ''File Storage Location'' option is set to ''Application'', all data is stored in the internal directory. If it's set to ''External'', some data (such as worlds) is stored in the external directory, but the internal directory is still used for other data. The external directory can be viewed and edited by users, though it might require workarounds in newer Android versions. The internal directory cannot be viewed or edited without root access. It's not possible to migrate worlds and other data between those directories without root access. The user ID is usually 0, but differs if the user is a secondary user. /storage/emulated/''user ID'' is often presented as ''Internal storage'' or similar by file managers, or when you access the device via MTP (connected to a Linux, macOS or Windows computer). == Directory structure ==
* {{File|directory|com.mojang}} ** {{File|directory|behavior_packs}}: Contains [[behavior pack]]s, see {{slink||Behavior packs}}. ** {{File|directory|development_behavior_packs}}{{info needed|What is in this directory?}} ** {{File|directory|development_resource_packs}}{{info needed|What is in this directory?}} ** {{File|directory|development_skin_packs}}{{info needed|What is in this directory?}} ** {{File|directory|logs}} *** {{File|file|ClientCorrelation.dat}}{{info needed}} ** {{File|directory|minecraftpe}} *** {{File|file|catalog_info.json}} *** {{File|file|clientId.txt}} *** {{File|file|custom.png}} *** {{File|file|global_resource_packs.json}} *** {{File|directory|hs}}{{note|This file has no extension. It is a plaintext list of UUIDs, separated by newlines.{{info needed|What are the UUIDs for? I've heard people say this is for rolling out the new Bedrock UI, but I can not confirm nor deny that.}}}} *** {{File|file|[[options.txt]]}} *** {{File|file|telemetry_info.json}} *** {{File|file|valid_known_packs.json}} ** {{File|directory|minecraftWorlds}}: Contains [[world]]s. *** {{File|directory|''internal world ID''}} **** {{File|directory|behavior_packs}}: Contains world behavior packs, see {{slink||Behavior packs}}. **** {{File|directory|db}} ***** {{File|file|''region ID''.dat}}The region ID is a 6-digit number. The region containing the player{{verify}} is a .log instead of a .dat. ***** {{File|file|CURRENT.dat}} ***** {{File|file|LOCK.dat}}{{info needed|Not all worlds have this. Does is depend on the version in which the world was created?}} ***** {{File|file|MANIFEST-.dat}} **** {{File|file|[[Bedrock Edition level format#level.dat|level.dat]]}} **** {{File|file|level.dat_old}} **** {{File|file|levelname.txt}} **** {{File|directory|resource_packs}}: Contains world [[resource pack]]s, see {{slink||Resource packs}}. **** {{File|file|world_behavior_packs.json}} **** {{File|file|world_icon.jpeg}} **** {{File|file|world_resource_packs.json}} ** {{File|directory|resource_packs}}: Contains [[resource pack]]s, see {{slink||Resource packs}}. ** {{File|directory|skin_packs}} *** {{File|file|''skin pack name''}}{{info needed|How are skin packs structured?}} ** {{File|directory|Screenshots}}{{sic}}: Contains [[screenshot]]s, see [[Screenshot#Bedrock Edition]]. *** {{File|directory|''XUID''}}: Contains screenshots made on a specific Xbox account. The XUID is the ID of the player's Xbox account. **** {{File|file|''YYYY''-''MM''-''DD''_''HH''.''mm''.''ss''[''sequence''].jpeg}}: Screenshot in JPEG format. **** {{File|file|''YYYY''-''MM''-''DD''_''HH''.''mm''.''ss''[''sequence''].mc}}: Additional file of unknown format{{info needed}}. One for each screenshot, has the same name as the screenshot, but with .mc suffix instead of .jpeg. ** {{File|file|ud''id''.dat}} (there may be more than one) ** {{File|directory|world_templates}}{{info needed|What is in this directory?}} ** {{File|file|xal}}{{verify|Exists in PE 1.16.0+?}}{{info needed|Is it the account data for XBL?}}{{verify|Is this a regular file and not a directory?}}
Each world and the {{File|directory|com.mojang|inline=1}} directory itself has a {{File|directory|resource_packs|inline=1}} and a {{File|directory|behavior_packs|inline=1}} directory. === Resource packs === [[Resource pack]]s have the following directory structure:
* {{File|directory|''resource pack name''}}{{info needed|Is this a complete list?}} ** {{File|file|manifest.json}} ** {{File|file|pack_icon.png}} ** {{File|directory|shaders}} *** {{File|directory|glsl}} **** {{File|file|renderchunk.dat}} *** {{File|directory|hlsl}} **** {{File|file|renderchunk.fragment.dat}} ** {{File|directory|text}} *** {{File|file|''language''.lang}} *** {{File|file|languages.json}}
=== Behavior packs === [[Behavior packs]]s can contain anything that a resource pack contains, plus additional files.{{verify}}
* {{File|directory|''behavior pack name''}}{{info needed}} ** Resource pack files, see {{slink||Resource packs}}. ** {{File|directory|loot_tables}} *** {{File|directory|blocks}}{{verify}} **** {{File|file|''block name''.json}} *** {{File|directory|entities}} **** {{File|file|''entity name''.json}} ** {{File|directory|recipes}} *** {{File|file|''item name''.json}}
== History == {{HistoryTable |{{HistoryLine|pocket alpha}} |{{HistoryLine||v0.1.0|Added the {{File|directory|com.mojang|inline=1}} directory at the path /storage/emulated//games/com.mojang. |The file hierarchy of com.mojang is as follows:
* {{File|directory|com.mojang}} ** {{File|directory|minecraftWorlds}} *** {{File|directory|''world name''}} **** {{File|file|chunks.dat}}: Stores [[chunk]] data. **** {{File|file|[[Bedrock Edition level format#level.dat|level.dat]]}}: Stores information about the world. **** {{File|file|[[Bedrock Edition level format/v0.1.0 alpha#player.dat|player.dat]]}}: Stores [[player]] data.
}} |{{HistoryLine||v0.2.0|Added {{File|file|entities.dat|inline=1}} under {{File|directory|''world name''|inline=1}}, which stores [[entity]] data. |{{File|file|player.dat|inline=1}} is no longer created nor used by the game and the data previously in there has been moved to {{File|file|level.dat|inline=1}}. Existing {{File|file|player.dat|inline=1}} files still remain.}} |{{HistoryLine||v0.3.3|This version creates unused duplicate directories under com.mojang/../games/com.mojang/minecraftWorlds. {{File|directory|minecraftWorlds|inline=1}} does not have any additional files.}} |{{HistoryLine||v0.5.0|Added {{File|file|level.dat_old|inline=1}} under {{File|directory|''world name''|inline=1}}, which is a backup of {{File|file|level.dat|inline=1}}.}} |{{HistoryLine||v0.7.0|Added the {{File|directory|minecraftpe|inline=1}} directory under {{File|directory|com.mojang|inline=1}}. |{{File|directory|minecraftpe|inline=1}} contains two files: {{File|file|clientId.txt|inline=1}} and {{File|file|[[options.txt]]|inline=1}}. |Added the {{File|directory|players|inline=1}} directory under {{File|directory|''world name''|inline=1}}.}} |{{HistoryLine||v0.7.3|Added the {{File|directory|_LevelCache|inline=1}} directory under {{File|directory|minecraftWorlds|inline=1}}, whose usage is not currently known.}} |{{HistoryLine||v0.9.0|dev=build 1| {{Collapse|title=Due to the switch to the [[Bedrock Edition level format/History#LevelDB based format|LevelDB level format]], the file hierarchy of com.mojang is now as follows, with temporary files from worlds using the previous level format being struck through:|content=
* {{File|directory|com.mojang}} ** {{File|directory|minecraftpe}} *** {{File|file|clientId.txt}} *** {{File|file|options.txt}} ** {{File|directory|minecraftWorlds}} *** {{File|directory|_LevelCache}} *** {{File|directory|''world name''}} **** {{File|directory|db}} ***** {{File|file|######.ldb}} ***** {{File|file|######.log}} ***** {{File|file|CURRENT}}: The content of this file is MANIFEST-######. ***** {{File|file|LOCK}}: An empty file. ***** {{File|file|MANIFEST-######}} **** {{File|file|chunks.dat}} **** {{File|file|entities.dat}} **** {{File|file|importedchunks.dat}}: Lets the game know which chunks have been converted to the new level format. **** {{File|file|level.dat}}
}} |{{File|file|level.dat_old|inline=1}} files are no longer created nor updated by the game, but any existing ones are still functional.}} |{{HistoryLine|||dev=build 4|Added {{File|file|LOG|inline=1}} and {{File|file|LOG.old|inline=1}} files under {{File|directory|db|inline=1}}.}} |{{HistoryLine|||dev=build 8|Removed the {{File|directory|_LevelCache|inline=1}} directory.}} |{{HistoryLine||v0.11.0|dev=build 1|Added the {{File|directory|snooper|inline=1}} directory under {{File|directory|minecraftpe|inline=1}}. |{{File|file|snooper|inline=1}} contains at least one file named {{File|file|bundle#.txt|inline=1}}, and a file named {{File|file|meta.txt|inline=1}}. |For newly-created worlds, the directory name is now {{File|directory|''internal world ID''|inline=1}} instead of {{File|directory|''world name''|inline=1}}. |Added {{File|file|levelname.txt|inline=1}} under {{File|directory|''internal world ID''|inline=1}}. |level.dat_old is now created if the player goes to a given world's edit menu and changes any settings in it. Doing this also deletes the world's level.dat file, though it is created again upon world reentry.}} |{{HistoryLine||v0.13.0|dev=build 1|The snooper directory has been moved from com.mojang/minecraftpe/snooper to com.mojang/snooper. The old snooper directory still remains, but is no longer updated.}} |{{HistoryLine||v0.14.2|snooper is no longer created nor updated by the game.}} |{{HistoryLine||v0.15.0|dev=build 1|Added r.txt file under minecraftpe. The content of this file is Vanilla. |LOG and LOG.old files are no longer generated by the game.}} |{{HistoryLine|||dev=build 2|Added r2.txt file under minecraftpe. The content of this file is Minecraft. |r.txt is no longer created by the game. |level.dat_old is once again created by the game whenever the player exits a world.}} |{{HistoryLine|||dev=release|Added resource_packs.txt file under minecraftpe. The content of this file is Minecraft. |r2.txt is no longer created by the game.}} |{{HistoryLine||v0.16.0|dev=build 1|resource_packs.txt is now an empty file by default. |resource_packs.txt files are now created for each individual world under .}} |{{HistoryLine|||dev=build 4|Added global_resource_packs.txt file under minecraftpe. This file is empty by default.}} |{{HistoryLine|||dev=build 5|Added two directories under com.mojang: behavior_packs and resource_packs. Both are empty by default. |Added Perf_Log.csv file under com.mojang. |Replaced global_resource_packs.txt with global_resource_packs.json. |Added two directories under : behavior_packs and resource_packs. Both are empty by default. |Added two files under : world_behavior_packs.json and world_resource_packs.json. |resource_packs.txt files are no longer generated by the game. | {{Collapse|title=The file hierarchy of com.mojang is now as follows:|content=
* {{File|directory|com.mojang}} ** {{File|directory|behavior_packs}} ** {{File|directory|minecraftpe}} *** {{File|file|clientId.txt}} *** {{File|file|global_resource_packs.json}} *** {{File|file|options.txt}} ** {{File|directory|minecraftWorlds}} *** {{File|directory|}} **** {{File|directory|behavior_packs}} **** {{File|directory|db}} ***** {{File|file|######.ldb}} ***** {{File|file|######.log}} ***** {{File|file|CURRENT}} ***** {{File|file|LOCK}} ***** {{File|file|MANIFEST-######}} **** {{File|directory|resource_packs}} **** {{File|file|chunks.dat}} **** {{File|file|entities.dat}} **** {{File|file|importedchunks.dat}} **** {{File|file|level.dat}} **** {{File|file|levelname.txt}} **** {{File|file|world_behavior_packs.json}} **** {{File|file|world_resource_packs.json}} ** {{File|directory|resource_packs}} ** {{File|file|Perf_Log.csv}}
}} }} |{{HistoryLine|bedrock}} |{{HistoryLine||1.18.0|dev=beta 1.18.0.21|Changed the path of the {{File|directory|com.mojang|inline=1}} directory on Android due to API changes. |New path: /data/user//com.mojang.minecraftpe/games/com.mojang (internal) and /storage/emulated//Android/data/com.mojang.minecraftpe/files/games/com.mojang (external).}} |{{HistoryLine||1.20.0|dev=Preview 1.20.0.22|The files {{File|file|.nomedia|inline=1}} and {{File|file|ud''id''.dat|inline=1}}, and directories {{File|directory|logs|inline=1}}, {{File|directory|minecraftpe|inline=1}} and {{File|directory|xal|inline=1}} in the external {{File|directory|com.mojang|inline=1}} directory on Android are no longer used.{{bug|MCPE-176675||Settings lost because some files and folders are no longer generated within external storage}}}} |{{HistoryLine||1.20.10|dev=Preview 1.20.10.20|The directory {{File|directory|logs|inline=1}} in the external {{File|directory|com.mojang|inline=1}} directory on Android is once again used.}} |{{HistoryLine||1.20.70|dev=Preview 1.20.70.20|The directory {{File|directory|minecraftpe|inline=1}}, and the files {{File|file|.nomedia|inline=1}} and {{File|file|ud''id''.dat|inline=1}} in the external {{File|directory|com.mojang|inline=1}} directory on Android are once again used.}} }} == Notes == {{Notelist}} == References == {{Reflist}} == Navigation == {{Navbox Bedrock Edition}} [[Category:Development]] [[es:Com.mojang]] [[fr:Com.mojang]] [[lzh:Com.mojang]] [[pt:Com.mojang]] [[zh:Com.mojang]]