Back to mods

Modrinth · Minecraft mod

Papyrus

A mod that provides various named mappings to the Fabric loader MappingResolver

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which Papyrus release matches 1.19?

Updated 2 years ago
Best match for your filters 0.2.0+java.17
Game version 1.18, 1.18.1, 1.18.2
Loader Fabric

Papyrus 0.2.0+java.17 targets 1.18, 1.18.1, 1.18.2 with Fabric. Installation on the client is optional. Installation on the dedicated server is optional. No extra mods listed for this file.

Where it goes

Is Papyrus required on the client, server, or both?

Installation on the client is optional. Installation on the dedicated server is optional.

Client Optional
Dedicated server Optional
Loader for this release Fabric
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

The source marks this as usable on both the client and server.

What else does Papyrus 0.2.0+java.17 need?

0.2.0+java.17 on 1.19. Every mod below is checked against that same setup.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add Papyrus without breaking your instance.

Built for Papyrus 0.2.0+java.17 on 1.19. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 0.2.0+java.17. It targets 1.18, 1.18.1, 1.18.2 with Fabric; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    Installation on the client is optional. Installation on the dedicated server is optional.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 0.2.0+java.17. It opens that exact file at the source.

About this project

What does Papyrus add?

Papyrus

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 tiny v2 format at
${game_dir}/cache/papyrus/${mapping}_${version}.tiny

Using Papyrus

To use Papyrus just add the maven repository which hosts Papyrus to your gradle build script:

# Kotlin DSL
repositories {
    maven("https://maven.nelind.dk/releases") {
        name = "Nelind Maven"
    }
}

# Groovy DSL
repositories {
    maven {
        name 'Nelind Maven'
        url 'https://maven.nelind.dk/releases'
    }
}

and then include Papyrus JIJ with the standard loom "include" gradle configuration:

# Kotlin DSL
modRuntimeOnly(include("dk.nelind:papyrus:(version)")!!)

# Groovy DSL
modRuntimeOnly include("dk.nelind:papyrus:(version)")

You can also choose to not include Papyrus JIJ in that case make sure to manually add Papyrus as a dependency in your
fabric.mod.json. If you need to access Papyrus internals you can also add Papyrus with the modApi configuration instead of the
modRuntimeOnly configuration.

Then in your fabric.mod.json you need to tell Papyrus what mappings you need access to and the version thereof:

{
  ...
  "custom": {
    "papyrus": {
      "mappings": [
        "mojmap",
        "yarn:build.1"
      ]
    }
  }
}

Then get and use the MappingResolver with any of the added mapping namespaces:

MappingResolver mappingResolver = FabricLoader.getInstance().getMappingResolver();
String runtimeClassNameFromYarnName = mappingResolver.mapClassName("yarn:build.1", yarnClassName);
String runtimeClassNameFromMojmapName = mappingResolver.mapClassname("mojmap", mojmapClassName);

Usage notes:

  • Papyrus injects the added mappings at preLaunch so you should only use Papyrus at some point after that.
    If the here and there talks about possible future fabric loader plugins go somewhere where it makes sense for
    Papyrus to become a loader plugin it will. Hopefully making extra mappings available at preLaunch

  • Mojmap handles inherited class members differently from Intermediary and Yarn!
    Intermediary and Yarn only give mappings for members defined directly in a class in said classes mapping
    definition whereas Mojmap gives names for all members a class has, inherited or not. In practice this means that if you
    ask the mapping resolver for a Mojmap method name in a class where the class has inherited the method while the runtime
    mappings are either Intermediary or Yarn you'll get null because the resolver can find that name (in Mojmap) but
    there is no defined name for that method in the runtime mapping. What does this mean for you? If you're using
    Mojmap names as the input to the mapping resolver you should use the class name of the class a method or field is
    declared on not the class you want to modify
    . Alternatively you can have a null check and programmatically find the
    class's super class and ask the mapping resolver for the member name with that class as the owning class.

Provided mappings

Mappings Namespace used in mapping resolver
Mojang Mappings mojmap
Yarn yarn

Note on versioning

Since Papyrus is almost entirely independent of the version of the game itself. The mod version indicates the java
version said build was built against. For example Papyrus x.y.z+java.17 is built against java 17 and as such supports
any game version that's also built against java 17 (that being any version from 1.18 to 1.20.4 inclusively).

Project description from Modrinth.

Pick your setup

Papyrus by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

17 available setups

Showing the newest 12 of 17 game versions. Older files are in the list below.

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

Papyrus versions and loaders

2 of 4 releases match
Clear filters

Looking for an older file? The official Modrinth project page is in Resources.