Skip to content

Backport many patches from Spigot, Paper, and some Paper forks#157

Merged
cswhite2000 merged 3 commits intoElectroid:mainfrom
calcastor:upstream
Feb 16, 2026
Merged

Backport many patches from Spigot, Paper, and some Paper forks#157
cswhite2000 merged 3 commits intoElectroid:mainfrom
calcastor:upstream

Conversation

@calcastor
Copy link
Contributor

@calcastor calcastor commented Feb 15, 2026

This is a large patch bringing over virtually all of Overcast Community's internal SportPaper changes. I have intentionally excluded the following patches:

  1. Unix domain socket support and relevant API change; this has a build error without another patch we use that I was not aware of and still need to look into
  2. Velocity natives backport; this would make SportPaper require Java 21
  3. "Use ASM for event executors." backport; ASM increases jar size and honestly I don't know how widely useful this would be to justify that increase in jar size
  4. A private patch we use to improve combat

All of the changes here have been run in production for over 2 months.

A comprehensive list of all changes:

Scripts, workflow, and submodules:

  1. Rebases all scripts against Paper 1.16.5, maintaining SportPaper specific changes
  2. Stop building against anything other than Java 21 on GitHub; should still be possible to go down to Java 8 locally
  3. Update submodules to be able to build SportPaper using Java 25 and only use the one SpecialSource jar from upstream Spigot we actually need to use

API

  1. "Move Paper-specific code to com.destroystokyo namespace"; this makes building against both legacy and modern by way of JarIntersector simpler as there are more shared events between modern and legacy than we are able to use without a namespace change.
  2. Backport server tick events, an improved asynchronous chunk API using java 8+ features, and teleportAsync from Paper 1.13.2+; this allows for Grim Anticheat to use native tick events when running on SportPaper when combined with the above change. Some of this comes from KigPaper.
  3. Migrate from Trove to fastutil; fastutil is in upstream Paper and has been used in SportPaper for a long time. To reduce jar size, migrate entirely away from Trove.
  4. Update several dependencies in API; this includes Apache Commons, SnakeYAML, and JUnit.
  • We maintain commons 2.6 because even modern Paper is doing that

Server:

  1. Changes that go along with the above API changes, including a tree-wide switch to Apache Commons 3.x
  2. "Apply item attributes on slot change" from KigPaper
  3. Splits "Add Tuinity flush patches" up as relevant patches from upstream Paper, including upstream changes, using latest available patches:
  • "Disable Explicit Network Manager Flushing"
  • "Optimize Network Manager and add advanced packet support"
  • "Allow controlled flushing for network manager"
  • "Consolidate flush calls for entity tracker packets"
  • "Optimise non-flush packet sending"
  1. "Optimize VarInt reading and writing"; uses code from Velocity and references a PandaSpigot patch doing the same thing
  2. "Use BigDecimal to improve accuracy of TPS results"; cleanup that made the server tick events patch easier
  3. "Make falling block height nerf respect doEntityDrops" from Paper
  4. "Fix hopper suck in patch bug" from Spigot, I think
  5. "Branchless NibbleArray" from Spigot
  6. "Don't tick blocks if neighbor chunks aren't loaded" from Spigot
  7. "Remove DataWatcher Locking" from Spigot
  8. "SPIGOT-2380: Hitting in the air will always load the chunk at 0,0"
  9. "Fix CraftEntity hashCode" from Paper, I think
  10. "Configurable RCON IP address" from Paper
  11. "SPIGOT-5142: Ignore invalid firework effects"
  12. "SPIGOT-5428: Better handling of some ItemMeta"; analogous to the above patch
  13. "Cache BlockState.hashCode" from Spigot
  14. "Reduce IO ops opening a new region file." from Paper
  15. "Cleanup allocated favicon ByteBuf" from Paper
  16. "Lazily track plugin scoreboards by default" from Paper
  17. "SPIGOT-1401: Issues placing blocks adjacent to eachother"; fixes directionality issue when placing furnaces and other containers
  18. "Fix MC-117075: TE Unload Lag Spike" from Paper
  19. "MC-135506: Experience should save as Integers" from Spigot?
  20. "Performance improvement for Chunk.getEntities" from Paper

Supersedes #149 as it also includes those changes

Edit:

Should someone need to refer back to this, this PR also updates the MySQL and JDBC connectors.

nbttagcompound.setShort("Health", (short) ((byte) this.d));
nbttagcompound.setShort("Age", (short) this.b);
- nbttagcompound.setShort("Value", (short) this.value);
+ nbttagcompound.setInt("Value", this.value); // Paper - save as Integer
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like it could cause issues https://minecraft.wiki/w/Experience#Data_values

Does Sportpaper handle this gracefully if the sizes don't match?

and if someone were to make a world with this on a sportpaper server, does minecraft 1.8 handle this gracefully if loaded directly in singleplayer?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea, it made sense given that it was in upstream Paper in older versions and when reading details about the issue, but the issue has since been resolved as of 1.17. value is stored as an int in EntityExperienceOrb to begin with on legacy.

I'm just inclined to drop it if we're concerned.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this is handled gracefully as long its a number, at least server side
So this is should be fine to keep.

nbttagcompound.setShort("Health", (short) ((byte) this.d));
nbttagcompound.setShort("Age", (short) this.b);
- nbttagcompound.setShort("Value", (short) this.value);
+ nbttagcompound.setInt("Value", this.value); // Paper - save as Integer
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this is handled gracefully as long its a number, at least server side
So this is should be fine to keep.

@cswhite2000 cswhite2000 merged commit 44f0c38 into Electroid:main Feb 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants