Papyrus
by nelind
Papyrus gives Fabric mod developers named mappings at runtime, so code can reference classes and members by their readable names instead of intermediary identifiers.
What it does
Papyrus provides named mappings through the Fabric loader's MappingResolver, letting a mod use readable names for classes and members while the game runs. On first run it fetches the mappings for the game version and keeps them in the game directory as cached tiny v2 files, so later launches do not need to fetch them again. Papyrus injects the added mappings before launch, which means a mod that needs them has to be prepared before the game starts.
Developers can reach game internals through reflection using named classes, and the mod offers a more developer friendly route to mappings than working with intermediary names directly. Mojmap treats the members of parent classes in its own way, and Papyrus accounts for that when it resolves names. A project that needs access to Papyrus internals must add it with the modApi configuration rather than modRuntimeOnly, and its fabric.mod.json must declare which mappings and version it needs.
Papyrus is a library published for Fabric only, with 17 game versions across 1.18 – 1.21.1. It works on either side, and neither the client nor the server needs it. The code is open source under the MIT License, and the source code and issue tracker are public.
Key features
Named runtime mappings
Classes and members can be looked up by readable names through the Fabric MappingResolver, with added namespaces available after resolution.
Cached mapping files
Mappings for a given game version are fetched on the first run and stored as tiny v2 files in the game directory cache.
Reflection access
Named classes can be reached through reflection, which suits code that inspects game internals by name.
Inherited member handling
Member resolution accounts for how Mojmap treats inherited class members compared with Intermediary and Yarn.
Compatibility
Latest build for each game version and loader.
1.21.x2 of 2 versions with builds
1.20.x7 of 7 versions with builds
1.19.x5 of 5 versions with builds
1.18.x3 of 3 versions with builds
Only full game releases are shown. This mod publishes no snapshot builds.
Questions
Does a Fabric mod need Papyrus to be installed on the server?
How should a mod include Papyrus?
Where does Papyrus store its mapping files?
In the catalog
Papyrus is one of 3,514 Library mods on ModsFinder, and one of 2,348 Library mods for Fabric. 32,366 mods support Minecraft 1.21.1.
Similar mods
What the author says
Papyrus provides various named mappings to the Fabric loader MappingResolver. This allows for more developer friendly access to mappings at runtime for example for using named classes in reflection instead of intermediary. Papyrus downloads mappings on the first run on any given version and stores cached mappings in…
Official listing
- Modrinth page
- modrinth.com/mod/papyrus
- Owner
- nelind
- Published
- 2024-06-07
- Updated on Modrinth
- 2024-09-22
- Facts verified
- 2026-10-15