FastAsyncWorldEdit

FastAsyncWorldEdit

152k Downloads

Server Crashes when Copying

Kihsomray opened this issue ยท 5 comments

commented

Server Implementation

Paper

Server Version

1.18.1

Describe the bug

I'm working on a new feature in my plugin where regions (WG, GriefPrevention, Residence) are copied to a hashmap of clipboards before a world is reset. Once the world has been reset, all the regions are pasted back into their original spots.

When I run this operation, the console is spammed with a ton of bugs.

To Reproduce

  1. Install CWR Premium and WG/Residence/Grief Prevention.
  2. Enable the saving for regions in worlds.yml.
  3. Run /cwr regen

Expected behaviour

This operation works fine with the regular WorldEdit:

  1. Copy a bunch of regions
  2. Paste them after the world resets

Screenshots / Videos

No response

Error log (if applicable)

https://gist.github.com/Kihsomray/8d96916ff5c09668e641b4c24464012b

Fawe Debugpaste

https://athion.net/ISPaster/paste/view/328dd06b824145a8a47b78f46ee84f0f

Fawe Version

FastAsyncWorldEdit version 2.0.2-SNAPSHOT-111;a237856

Checklist

Anything else?

No response

commented

Without seeing the code I can only surmise that you are doing something; wrong most likely improperly defining the region of the clipboard and attempting to set blocks outside of the initial region. It also seems like you are not running the copying asynchronously, so are simply stalling the main thread with a large number of operations

commented

Without seeing the code I can only surmise that you are doing something; wrong most likely improperly defining the region of the clipboard and attempting to set blocks outside of the initial region. It also seems like you are not running the copying asynchronously, so are simply stalling the main thread with a large number of operations

Class it's being run from: https://paste.gg/p/anonymous/c825bdbece21424e945048d716516f33
For testing purposes, I have set the delay in the runnable to be 5 seconds which should be plenty of time to copy the regions I'm testing async before I unload the world.

WorldGuard Class: https://paste.gg/p/anonymous/c8a6b7e5c9dc4715819bd1b46cf10581
My FAWE Class: https://paste.gg/p/anonymous/ac51a33c7d63490ab7f58ad46db6347d
World Edit Class: https://paste.gg/p/anonymous/b35ca31c15cf47f3be8d15b905891366

commented

Try using by instead of 0 in the creation of ForwardExtentCopy in WorldEdit.class ?

commented

Try using by instead of 0 in the creation of ForwardExtentCopy in WorldEdit.class ?

That worked! However, the reference point of the paste is so off. I used minimum point when copying and pasting. Why does it paste in the sky?

Updated WorldEdit Class: https://paste.gg/p/anonymous/4d096d2c9efd46959b170375bacc4786
floating_chunk PNG

commented

Are you pasting it at the bottom of the region and not at y=0? The origin of the clipboard defaults to the minimum point. If you want to paste normalised to zero, then set the clipboard's origin to bx, 0, bz