{"id":16142864,"url":"https://github.com/damatrix/rocksmc","last_synced_at":"2025-03-18T17:30:59.948Z","repository":{"id":83575262,"uuid":"376530195","full_name":"DaMatrix/RocksMC","owner":"DaMatrix","description":"fast and compact storage format for minecraft based on rocksdb (currently only supports cubic chunks)","archived":false,"fork":false,"pushed_at":"2021-06-27T11:08:56.000Z","size":127,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T22:23:22.247Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://daporkchop.net","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DaMatrix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-13T11:53:59.000Z","updated_at":"2024-11-28T16:37:30.000Z","dependencies_parsed_at":"2023-07-07T20:15:51.352Z","dependency_job_id":null,"html_url":"https://github.com/DaMatrix/RocksMC","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaMatrix%2FRocksMC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaMatrix%2FRocksMC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaMatrix%2FRocksMC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaMatrix%2FRocksMC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DaMatrix","download_url":"https://codeload.github.com/DaMatrix/RocksMC/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244269417,"owners_count":20426220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T00:07:34.109Z","updated_at":"2025-03-18T17:30:59.943Z","avatar_url":"https://github.com/DaMatrix.png","language":"Java","funding_links":["https://img.shields.io/badge/dynamic/json?color=e64413\u0026label=patreon\u0026query=data.attributes.patron_count\u0026suffix=%20patrons\u0026url=https%3A%2F%2Fwww.patreon.com%2Fapi%2Fcampaigns%2F727078","https://www.patreon.com/DaPorkchop_"],"categories":[],"sub_categories":[],"readme":"# RocksMC\n\n[![Build Status](https://jenkins.daporkchop.net/job/DaPorkchop_/job/RocksMC/job/master/badge/icon)](https://jenkins.daporkchop.net/job/DaPorkchop_/job/RocksMC/)\n![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/DaMatrix/RocksMC)\n![Lines of code](https://img.shields.io/tokei/lines/github/DaMatrix/RocksMC)\n[![Discord](https://img.shields.io/discord/428813657816956929?color=7289DA\u0026label=discord)](https://discord.gg/FrBHHCk)\n[![Patreon badge](https://img.shields.io/badge/dynamic/json?color=e64413\u0026label=patreon\u0026query=data.attributes.patron_count\u0026suffix=%20patrons\u0026url=https%3A%2F%2Fwww.patreon.com%2Fapi%2Fcampaigns%2F727078)](https://www.patreon.com/DaPorkchop_)\n\n*A fast, compact and powerful storage format for Minecraft, built using [rocksdb](https://github.com/facebook/rocksdb).*  \n*Currently only supports [Cubic Chunks](https://github.com/OpenCubicChunks/CubicChunks).*\n\n## TODO:\n\n- global saves\n- snapshots\n\n## Conversion\n\nRocksMC features a built-in converter between existing world formats based on [CubicChunksConverter](https://github.com/OpenCubicChunks/CubicChunksConverter). Access it by installing RocksMC, opening a single-player world, and running `/rocksmc converter`.\n\n## Concepts\n\n***NOTE: Currently, only local saves are implemented, global saves and snapshots are not.***\n\n### World\n\nA Minecraft world. Consists of one or more dimensions.  \nOn the client, worlds are stored in individual subdirectories of `.minecraft/saves/` (\ne.g. `.minecraft/saves/New World/`). Servers only have a single world, which is stored in a single directory (\nnamed `world` by default).\n\n### Dimension\n\nA dimension in a Minecraft world. Generally identified by name (e.g. `minecraft:overworld`, `minecraft:nether`), or by\nID (e.g. `0`, `1`, `-1`). Dimensions are each stored in separate folders. The default world (dimension 0,\nor `minecraft:overworld`) is stored in `\u003cworld_directory\u003e/`, all other dimensions are stored\nin `\u003cworld_directory\u003e/DIM\u003cdimension_id\u003e/`.  \nWhen using [Cubic Chunks](https://github.com/OpenCubicChunks/CubicChunks), each dimension can use a different storage\nformat.\n\n### Save\n\nA save consists of a directory with two children:\n\n- `db/`: contains the RocksDB\n- `snapshots/`: contains some number of subdirectories, each of which represents a RocksMC snapshot and contains a\n  RocksDB database checkpoint\n\n#### Local Save (Storage Format ID: `rocksmc:local`)\n\nA local save belongs to a single dimension using the `rocksmc:local` storage format, and is stored\nin `\u003cdimension_directory\u003e/rocksmc_local/`.\n\n#### Global Save (Storage Format ID: `rocksmc:global`)\n\nA global save belongs to a world, and is stored in `\u003cworld directory\u003e/rocksmc_global/`. Its RocksDB contains one storage\nfor every dimension in the world that uses the `rocksmc:global` storage format. They are kept separate by storing them\nin individual [column families](https://github.com/facebook/rocksdb/wiki/Column-Families).\n\n### Storage\n\nA storage contains the terrain data for a single dimension - the exact same data as would have been stored in the region\nfiles in a vanilla world.  \nConceptually, storages are implemented as a wrapper over some number of RocksDB column families.\n\n## Local vs Global\n\nThe primary advantage of global saves is that all dimensions can be stored in a single RocksDB, which provides three\nprimary benefits:\n\n- crash consistency across the entire world - in the event of a crash, all dimensions are guaranteed to be at the same\n  revision\n- global, atomic snapshots - snapshots will contain all dimensions at once at the same instance in time\n- open files limit - if multiple dimensions are open as local storages, they will each track their open files limit\n  individually. On systems where the maximum number of open files is restricted, this can become a serious obstacle for\n  large worlds\n\nHowever, for the vast majority of users, these benefits will be of little to no significance, especially compared to the\nsimplicity of being able to manage dimensions by manually working with the files and directories on disk (e.g. resetting\nthe terrain in a dimension by simply deleting the directory).\n\n## Identifying RocksMC objects\n\nVirtually every RocksMC command requires a save, storage or snapshot as an argument. This section explains the format\nfor identifying these objects.\n\nIf any part of an identifier contains whitespace or a `.`, that part must be placed in double quotes. For example, `Hello World!`\nshould be written as `\"Hello World!\"`.\n\n### Worlds\n\nAll RocksMC objects belong to a world, which are identified by their directory name. Some examples:\n\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eSide\u003c/th\u003e\n\u003cth\u003ePath to world directory\u003c/th\u003e\n\u003cth\u003eRocksMC world identifier\u003c/th\u003e\n\u003cth\u003eComment\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eClient\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e.minecraft/saves/test/\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003etest\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eClient\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e.minecraft/saves/New World/\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e\"New World\"\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eDouble quotes used because the name contains a space\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eServer\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003eworld/\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003eworld\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eClient/Server\u003c/td\u003e\n\u003ctd\u003e\u003cem\u003ecurrently open world\u003c/em\u003e\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e@\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eClient/Server\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e/home/user/Downloads/cool_world\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e$/home/user/Downloads/cool_world\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e$\u003c/code\u003e symbol indicates an absolute file path\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eClient/Server\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003eC:\\Users\\user\\Downloads\\Cool World\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e$\"C:\\Users\\user\\Downloads\\Cool World\"\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e$\u003c/code\u003e comes \u003cem\u003ebefore\u003c/em\u003e quotes\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n### Saves\n\nAssuming you have a world, you can now access the individual saves inside it.\n\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eSave Type\u003c/th\u003e\n\u003cth\u003eDimension\u003c/th\u003e\n\u003cth\u003eRocksMC save identifier\u003c/th\u003e\n\u003cth\u003eComment\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eLocal\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e-1\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003eDIM-1\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eLocal\u003c/td\u003e\n\u003ctd\u003e\u003cem\u003edefault dimension\u003c/em\u003e\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003ed\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003ed\u003c/code\u003e stands for “default”. This is generally dimension 0 (the overworld)\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eGlobal\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e*\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eGlobal save doesn’t need a dimension\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eLocal/Global\u003c/td\u003e\n\u003ctd\u003e\u003cem\u003ecurrent dimension\u003c/em\u003e\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e@\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eFinds the save used by the dimension that the command sender is currently in. Cannot be used from the server console\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n### Snapshots\n\nIdentifying individual snapshots inside a save is quite trivial: simply enter the name.\n\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eSnapshot name\u003c/th\u003e\n\u003cth\u003eRocksMC snapshot identifier\u003c/th\u003e\n\u003cth\u003eComment\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003easdf\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003easdf\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003emy new snapshot\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e\"my new snapshot\"\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eWhitespace still needs to be quoted\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cem\u003elatest snapshot\u003c/em\u003e\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e^\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eComputed based on filesystem creation time for the snapshot directory\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n### Putting it all together\n\nThese three parts are concatenated together (using a `.`) in order to build full object references. You can't access a snapshot without a save, or a save without a world. Thus, the full identifier syntax is:\n\n```\n\u003cworld_identifier\u003e[.\u003csave_identifier\u003e[.\u003csnapshot_identifier\u003e]]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamatrix%2Frocksmc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamatrix%2Frocksmc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamatrix%2Frocksmc/lists"}