Skip to content
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

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

dordsor21
Copy link
Member

 - Add new extent that does an action on chunk GET load
 - closes #1826
@dordsor21 dordsor21 requested a review from a team as a code owner July 15, 2023 12:00
@github-actions github-actions bot added the Feature This PR adds a new feature label Jul 15, 2023
@github-actions
Copy link

Please take a moment and address the merge conflicts of your pull request. Thanks!

Copy link

Please take a moment and address the merge conflicts of your pull request. Thanks!

@NotMyFault
Copy link
Member

Please rebase for 1.20.3/4

Copy link

github-actions bot commented Mar 4, 2024

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
@dordsor21 dordsor21 requested a review from SirYwell March 16, 2024 15:44
});
IQueueExtent<IQueueChunk> queue;
Extent ext = source instanceof AbstractDelegateExtent ex ? ex.getExtent() : source;
ParallelQueueExtent parallel = new ExtentTraverser<>(source).findAndGet(ParallelQueueExtent.class);
Copy link
Member

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.

Copy link
Member Author

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?

Copy link
Member

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

Copy link
Member

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

Copy link

Please take a moment and address the merge conflicts of your pull request. Thanks!

# 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
@SirYwell
Copy link
Member

I'm only seeing any FAWE block changes only after rejoining, not sure why though.

@dordsor21
Copy link
Member Author

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

Copy link
Member

@SirYwell SirYwell left a 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.

Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature This PR adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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