FastAsyncWorldEdit icon indicating copy to clipboard operation
FastAsyncWorldEdit copied to clipboard

Copying + pasting entities works only over a distance of viewdistance + 2 chunks

Open TheoRetisch1 opened this issue 3 years ago • 9 comments

Server Implementation

Paper

Server Version

1.18.2

Describe the bug

When using //copy -e not all entities are copied in larger selections, while copying blocks always works correctly. Entities are copied only up to a distance of configured viewdistance + 2 chunks. After this distance is exceeded only blocks are considered. This behavior also applies to schematics, //paste -e and //move -e. However, //stack -e works correctly.

To Reproduce

  1. Find a chunk border using f3+g.
  2. Place two blocks, each holding an entity (e.g. an item frame).
  3. Select the blocks + entities and enter //stack 400 -e stacking
  4. Select all stacked blocks and entities (selection size: 1604)
  5. Move to your starting position next to the chunk border and enter //copy -e while all chunks are still loaded (output: 1604 blocks + 802 entities copied)
  6. Wait for 30s (paper.yml: delay-chunk-unloads-by: 30s) until all chunky are unloaded and enter //copy -e again (output: 1604 blocks + 192 entities copied). [view-distance = 12, simulation-distance= 4]

Expected behaviour

All entities in the selection should be copied, regardless of whether the chunks are loaded or not.

Screenshots / Videos

No response

Error log (if applicable)

No response

Fawe Debugpaste

https://athion.net/ISPaster/paste/view/88c3858f83354ec3a5f7038c52269046

Fawe Version

FastAsyncWorldEdit version 2.3.1-SNAPSHOT-210;fd00635

Checklist

  • [X] I have included a Fawe debugpaste.
  • [X] I am using the newest build from https://ci.athion.net/job/FastAsyncWorldEdit/ and the issue still persists.

Anything else?

No response

TheoRetisch1 avatar Jun 17 '22 13:06 TheoRetisch1

Might be related to https://github.com/PaperMC/Paper/issues/5872

SirYwell avatar Jun 17 '22 13:06 SirYwell

~~This will almost certainly be it, as FAWE starts using the chunk as soon as it's loaded~~

dordsor21 avatar Jun 17 '22 13:06 dordsor21

The methods in BukkitWorld for getting entities ultimately only ever get the loaded entities https://github.com/IntellectualSites/FastAsyncWorldEdit/blob/main/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java#L142-L165 which is completed before any chunks are loaded by FAWE in ForwardExtentCopy

dordsor21 avatar Jun 17 '22 15:06 dordsor21

Why did you close this? Having a system to load chunks for operations that otherwise wouldn't is a reasonable addition imo

dordsor21 avatar Aug 19 '22 17:08 dordsor21

Why did you close this? Having a system to load chunks for operations that otherwise wouldn't is a reasonable addition imo

You labeled this issue as upstream issue, which implies this is a WorldEdit issue. If you feel this is worth an addition, feel free to reopen and apply the enhancement label.

NotMyFault avatar Aug 19 '22 17:08 NotMyFault

The upstream label was there cos it's also an upstream issue, not necessarily meaning it can/should only be fixed there

dordsor21 avatar Aug 20 '22 08:08 dordsor21

Maybe related to this problem:

When I copy entities, the absolute coordinates are saved or used.

  1. select area and copy with entities //copy -e
  2. save clipboard //schem save test resp. //schem save test_sponge sponge
  3. open Schematic with NBTExplorer

Test Setup:

File in NBT Explorer:

Foorcee avatar Nov 11 '22 17:11 Foorcee

Can't reproduce the issue of this ticket anymore in 1.19.4 Paper-513 and FAWE-401, I tried as said, but the amount of entities stays the same after 1 minute even. Could be fixed by Paper

OneLiteFeather avatar Apr 16 '23 22:04 OneLiteFeather

Maybe related to this problem:

When I copy entities, the absolute coordinates are saved or used.

1. select area and copy with entities //copy -e

2. save clipboard //schem save test resp. //schem save test_sponge sponge

3. open Schematic with NBTExplorer

Test Setup:

File in NBT Explorer:

Can you open an extra issue for that? It seems to be a problem regarding schematics and entity coordinates, I also came to the same result that pasting the schematic won't have the entities in the loaded and pasted selection, it is different from this issue.

OneLiteFeather avatar Apr 16 '23 23:04 OneLiteFeather