-
-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: improved entity operations #2356
base: main
Are you sure you want to change the base?
Conversation
dordsor21
commented
Jul 15, 2023
- Add new extent that does an action on chunk GET load allowing for "unloaded" entities to be edited
- closes Copying + pasting entities works only over a distance of viewdistance + 2 chunks #1826
- Add new extent that does an action on chunk GET load - closes #1826
Please take a moment and address the merge conflicts of your pull request. Thanks! |
Please take a moment and address the merge conflicts of your pull request. Thanks! |
Please rebase for 1.20.3/4 |
Please take a moment and address the merge conflicts of your pull request. Thanks! |
# Conflicts: # worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/chunk/ChunkHolder.java
worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/OncePerChunkExtent.java
Outdated
Show resolved
Hide resolved
worldedit-core/src/main/java/com/fastasyncworldedit/core/math/LocalBlockVector2Set.java
Outdated
Show resolved
Hide resolved
worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/OncePerChunkExtent.java
Outdated
Show resolved
Hide resolved
...rc/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_20_R2/PaperweightGetBlocks.java
Outdated
Show resolved
Hide resolved
...rc/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_20_R2/PaperweightGetBlocks.java
Outdated
Show resolved
Hide resolved
}); | ||
IQueueExtent<IQueueChunk> queue; | ||
Extent ext = source instanceof AbstractDelegateExtent ex ? ex.getExtent() : source; | ||
ParallelQueueExtent parallel = new ExtentTraverser<>(source).findAndGet(ParallelQueueExtent.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to work, I'm getting a Could not find IQueueExtent instance for entity retrieval, falling back to default method.
From a quick look, findAndGet
calls find(Object)
instead of find(Class)
. Replacing the call with find((Class<Extent>) clazz)
makes that work, but it seems like I'm running in some kind of deadlock then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you able to find what causes the deadlock?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got the following exception after >10 seconds:
java.lang.NullPointerException: Cannot read field "r" because "levelChunk" is null
at com.sk89q.worldedit.bukkit.adapter.impl.fawe.v1_20_R3.PaperweightGetBlocks_Copy.<init>(PaperweightGetBlocks_Copy.java:54) ~[FastAsyncWorldEdit-Bukkit-2.9.2-SNAPSHOT.jar:?]
at com.sk89q.worldedit.bukkit.adapter.impl.fawe.v1_20_R3.PaperweightGetBlocks.call(PaperweightGetBlocks.java:380) ~[FastAsyncWorldEdit-Bukkit-2.9.2-SNAPSHOT.jar:?]
at com.fastasyncworldedit.core.queue.implementation.chunk.ChunkHolder.call(ChunkHolder.java:1044) ~[FastAsyncWorldEdit-Bukkit-2.9.2-SNAPSHOT.jar:?]
at com.fastasyncworldedit.core.queue.implementation.chunk.ChunkHolder.call(ChunkHolder.java:1015) ~[FastAsyncWorldEdit-Bukkit-2.9.2-SNAPSHOT.jar:?]
at com.fastasyncworldedit.core.queue.implementation.chunk.ChunkHolder.call(ChunkHolder.java:35) ~[FastAsyncWorldEdit-Bukkit-2.9.2-SNAPSHOT.jar:?]
I'll try to find out more
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay that seems to happen after pasting only, not sure what went wrong with copying before, I cannot reproduce it anymore
Please take a moment and address the merge conflicts of your pull request. Thanks! |
.../main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/PaperweightGetBlocks.java
Outdated
Show resolved
Hide resolved
# Conflicts: # worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/PaperweightGetBlocks.java # worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/PaperweightGetBlocks_Copy.java # worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/PaperweightPostProcessor.java
I'm only seeing any FAWE block changes only after rejoining, not sure why though. |
I can't replicate this, but I have, however, found that copy now copies entities in the full chunks aha |
worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't reproduce the invisible change issue anymore. The changes seem to work from my testing and the code looks good.
Please take a moment and address the merge conflicts of your pull request. Thanks! |
# Conflicts: # worldedit-bukkit/adapters/adapter-1_20_5/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_20_R4/PaperweightGetBlocks.java