ShreddedPaper
Multi-thread, single-server papermc implementation
Install / Use
/learn @MultiPaper/ShreddedPaperREADME
ShreddedPaper
ShreddedPaper is in public beta. Most features work for most players most of the time, however things can occasionally break.
1.21.11 Purpur fork that brings vertical scaling to Minecraft.
ShreddedPaper:
- Allows multiple threads to work together to run a single world
- When ticking a chunk on one thread, all other chunks in a certain radius are locked so that only this thread has access to them, preventing any race conditions between threads.
See HOW_IT_WORKS.md for more information on how ShreddedPaper works.
Developing a plugin for a multi-threaded server
In summary, a plugin must be careful of:
- Different threads updating certain data at the same time.
- One thread reading data while it is being updated by another thread.
- Code is to be executed on the chunk's thread, not simply the main thread.
See here for a more detailed tutorial
If your plugin already has support for Folia it is highly likely that it will already work with ShreddedPaper without any changes.
If you have a Folia check similar to the following:
try {
Class.forName("io.papermc.paper.threadedregions.RegionizedServer");
return true;
} catch (ClassNotFoundException e) {
return false;
}
You should remove it and instead check of the existence of Paper's region api:
try {
Bukkit.class.getMethod("getRegionScheduler");
return true;
} catch (NoSuchMethodException e) {
return false;
}
Using the ShreddedPaper API as a dependency
Add the following into your build.gradle:
repositories {
maven {
url "https://repo.clojars.org/"
}
}
dependencies {
compile "com.github.puregero:shreddedpaper-api:1.21.11-R0.1-SNAPSHOT"
}
Or in your pom.xml:
<repositories>
<repository>
<id>clojars</id>
<url>https://repo.clojars.org/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.puregero</groupId>
<artifactId>shreddedpaper-api</artifactId>
<version>1.21.11-R0.1-SNAPSHOT</version>
</dependency>
</dependencies>
Building
Requirements:
- You need
gitinstalled, with a configured user name and email. On windows you need to run from git bash. - You need
jdk21+ installed to compile (andjre21+ to run)
Build instructions:
- Patch paper with:
./gradlew applyAllPatches - Build the shreddedpaper jar with:
./gradlew createMojmapPaperclipJar - Get the shreddedpaper jar from
shreddedpaper-server/build/libs/shreddedpaper-paperclip-*-mojmap.jar
Publishing to maven local
Publish to your local maven repository with: ./gradlew publishToMavenLocal
Note for mac users: The latest macOS version includes an incompatible version of
diff and you'll need to install a compatible one. Use brew install diffutils
to install it, and then reopen the terminal window.
If diff --version returns the following, it is incompatible and will not work:
Apple diff (based on FreeBSD diff)
Licensing
All code is licensed under GPLv3.
Acknowledgements
ShreddedPaper uses PaperMC's paperweight framework found here.
Related Skills
node-connect
337.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
337.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.2kCommit, push, and open a PR
