Skip to content

26.1 compiles#3506

Open
emmanuelvlad wants to merge 9 commits intoIntellectualSites:feat/mc-26.1from
emmanuelvlad:feat/mc-26.1
Open

26.1 compiles#3506
emmanuelvlad wants to merge 9 commits intoIntellectualSites:feat/mc-26.1from
emmanuelvlad:feat/mc-26.1

Conversation

@emmanuelvlad
Copy link
Copy Markdown

@emmanuelvlad emmanuelvlad commented Apr 8, 2026

Overview

Made it compile on 26.1
Renamed adapter 26.1 to 26_1 (to keep the same syntax)
Removed reobf for new Minecraft versions (26.1 and above)

Submitter Checklist

  • Make sure you are opening from a topic branch (/feature/fix/docs/ branch (right side)) and not your main branch.
  • Ensure that the pull request title represents the desired changelog entry.
  • New public fields and methods are annotated with @since TODO.
  • I read and followed the contribution guidelines.

@emmanuelvlad emmanuelvlad requested a review from a team as a code owner April 8, 2026 00:21
@SirYwell
Copy link
Copy Markdown
Member

SirYwell commented Apr 8, 2026

Renamed adapter 26.1 to 26_1 (to keep the same syntax)

This was intentional to be closer to the WE adapters.

@emmanuelvlad
Copy link
Copy Markdown
Author

Renamed adapter 26.1 to 26_1 (to keep the same syntax)

This was intentional to be closer to the WE adapters.

Oops, thought it was a mistake, I renamed it back to 26.1

? PrimaryLevelData.SpecialWorldProperty.DEBUG
: PrimaryLevelData.SpecialWorldProperty.NONE;
PrimaryLevelData newWorldData = new PrimaryLevelData(newWorldSettings, newOpts, specialWorldProperty, Lifecycle.stable());
PaperWorldLoader.LoadedWorldData loadedWorldData = new PaperWorldLoader.LoadedWorldData(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This only works on Paper I guess? Is there an easy way to make it work on Spigot? Otherwise it might make sense to fail regeneration more gracefully on Spigot.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Indeed, paperweight overrides the only constructor on ServerLevel, requiring an extra argument PaperWorldLoader.LoadedWorldData

I added a throw exception on regenerations if the server is not Paper, let me know if it's what you had in mind!

@SirYwell
Copy link
Copy Markdown
Member

The server currently crashes after using //regen due to the world being closed but not properly removed:

[17:26:38 ERROR]: Exception stopping the server
java.lang.IllegalStateException: Trying to schedule save when SavedDataStorage is already closed
	at net.minecraft.world.level.storage.SavedDataStorage.scheduleSave(SavedDataStorage.java:151) ~[paper-26.1.2.jar:26.1.2-5-d61d8df]
	at net.minecraft.world.level.storage.SavedDataStorage.saveAndJoin(SavedDataStorage.java:221) ~[paper-26.1.2.jar:26.1.2-5-d61d8df]
	at net.minecraft.server.level.ServerLevel.saveLevelData(ServerLevel.java:1490) ~[paper-26.1.2.jar:26.1.2-5-d61d8df]
	at net.minecraft.server.level.ServerLevel.save(ServerLevel.java:1467) ~[paper-26.1.2.jar:26.1.2-5-d61d8df]
	at net.minecraft.server.MinecraftServer.saveAllChunks(MinecraftServer.java:968) ~[paper-26.1.2.jar:26.1.2-5-d61d8df]
	at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:1091) ~[paper-26.1.2.jar:26.1.2-5-d61d8df]
	at net.minecraft.server.dedicated.DedicatedServer.stopServer(DedicatedServer.java:941) ~[paper-26.1.2.jar:26.1.2-5-d61d8df]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1408) ~[paper-26.1.2.jar:26.1.2-5-d61d8df]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:304) ~[paper-26.1.2.jar:26.1.2-5-d61d8df]
	at java.base/java.lang.Thread.run(Thread.java:1474) ~[?:?]

Not sure yet what the best approach here is, maybe a simple MinecraftServer#removeLevel call in removeWorldFromWorldsMap is fine?

@emmanuelvlad
Copy link
Copy Markdown
Author

Sadly I cannot make FAWE run on spigot, neither the latest build on 1.21.11 works on my end.
Though I fixed an issue on spigot where it failed to detect the server's version

@SirYwell
Copy link
Copy Markdown
Member

I'm okay with Spigot not working, but the //regen bug I mentioned above needs to be fixed.

@emmanuelvlad
Copy link
Copy Markdown
Author

The issue is that we pass the original SavedDataStorage into the new ServerLevel constructor, closing it in cleanup caused that error since it's using the reference of the original world

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