FastAsyncWorldEdit icon indicating copy to clipboard operation
FastAsyncWorldEdit copied to clipboard

feature: support paper chunk system

Open SirYwell opened this issue 3 years ago • 2 comments

Overview

Description

This PR adds support for the new chunk system in paper.

Current state: Feel free to compile and test it yourself.

Issues (and whether they are fixed)

  • [x] Changes aren't sent to the client due to a UnsupportedOperationException

Submitter Checklist

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

SirYwell avatar Jul 23 '22 21:07 SirYwell

By the look of it, all this does is remove the Optional object holder and remove the call to chunkHolder.getTickingChunkFuture().getNow(ChunkHolder.UNLOADED_LEVEL_CHUNK), which is what actually loads in the chunk.

So, the error you are getting about UnsupportedOperationException is actually just FAWE trying to operate on the chunk that it couldn't load in.

anonyco avatar Jul 25 '22 00:07 anonyco

By the look of it, all this does is remove the Optional object holder and remove the call to chunkHolder.getTickingChunkFuture().getNow(ChunkHolder.UNLOADED_LEVEL_CHUNK), which is what actually loads in the chunk.

No, it does not load the chunk as we call getNow. It's basically our current way to get the chunk without loading it on spigot. The method isn't implemented in the new chunk system at the moment, see https://github.com/PaperMC/Paper/blob/4ec2e6e64fea5fdad52e156625252031cff1aef5/patches/server/0929-Rewrite-chunk-system.patch#L14553-L14554.

We also don't really need it, as getChunkAtIfLoadedImmediately does exactly what we want on paper. We can also probably just use getTickingChunk() directly, but I'd need to look into that first.

SirYwell avatar Jul 25 '22 06:07 SirYwell

I'd like to integrate this in the next release.

SirYwell avatar Sep 03 '22 17:09 SirYwell

Expediting merge due to no negative feedback.

NotMyFault avatar Sep 04 '22 21:09 NotMyFault