This mod is a submission in NeoForge's Server-Side Summer modjam.
Mass Resource Interchange (MRI) is a Minecraft Plugin/Mod that can sync player data across servers. Inspired by HuskSync and the clusterio Factorio mod, but with my own spin on things. I feel like there's a bit more that a cross-API/cross-version implementation will allow, and I'm excited to see where this goes. Can't wait for serialization hell.
The main goal during Serverside Summer is to produce something stable, portable, and hopefully useful, all the while showing off some really cool core ideas to show real-world use cases for this kind of API.
There are some amazing projects that accomplish similar feats already, like fabric-transfer-api and Common-Storage-Lib, I’m not reinventing the wheel because I think I can do it better, I’m doing it because I think an API like this has wider potential across a multitude of boundaries (I'm hoping to incorporate some compatibility layers with those libraries at some point). And in my usual fashion, after the proof of concept is complete and stable, I’ll be porting it across most (and eventually all) major Minecraft versions/platforms.
You can write a mod that defines additional storage backends, which you can then use in MRI's main config. SQLite is the default storage backend to avoid errors during initial setup and in cases where servers aren't using the mod in a multiserver setup.
Currently, the mod supports:
On that same note you can write a mod that defines additional sections in MRI's config, which you can then use when designing your own addons. Do note however, that you'll need to handle updating your own config via Configurate's transformation/serialization system.
At the moment MRI only handles player inventories since the other aspects of the mod are item-focused, so I'll need to think of ways to generalize the API further to allow for more data types. Maybe some sort of extensible serialization API similar to how you can define additional storage backends.
If you run into any issues with modded items, please open an issue on the GitHub repository and add the playersync
and integration labels (still need to put together some templates for common issues).
Enable players to store items in a backpack that can be accessed across servers.
| Command | Permission | Description |
|---|---|---|
/backpack |
mri.backpack.open |
Opens the backpack inventory for the player. |
/backpack <player> |
mri.backpack.open.others |
View the backpack inventory of the specified player. |
/backpack create <player> <size> |
mri.backpack.create |
Creates a new backpack for the player. |
/backpack delete <player> |
mri.backpack.delete |
Deletes the player's backpack. |
/backpack item <player> |
mri.backpack.item |
Gives the player a backpack item. |
/backpack item <player> |
mri.backpack.item.others |
Gives the specified player a backpack item. |
mri.backpack.open and mri.backpack.open.others permissions also apply when the player uses the backpack item in-game.Similar to backpacks, but placable in the world via commands. Though they're currently only (safely) accessable via one server, thinking of taking things in a couple directions: