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

Fix loading schematic from clipboard; #1

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

HarvelsX
Copy link

@HarvelsX HarvelsX commented Jul 4, 2023

No description provided.

@Phoenix616
Copy link
Member

Phoenix616 commented Jul 18, 2023

Sorry for only getting to this now, I must've missed the email about it.

What exact issue does this fix? And is it really necessary to get rid of the pre-loading of the BlockData for it? Because that was intentionally done to improve the speed of the generation. (Adapting the blocks every time is just way more expensive than doing it once and keeping them in memory)

@HarvelsX
Copy link
Author

What exact issue does this fix?

@Phoenix616, initially the plugin was incorrectly getting blocks from the schematic, causing the world to be empty.

And is it really necessary to get rid of the pre-loading of the BlockData for it? Because that was intentionally done to improve the speed of the generation. (Adapting the blocks every time is just way more expensive than doing it once and keeping them in memory)

Oh, I did not think of that. I will go back to the previous implementation, but I will try to make the loading asynchronous, so that I do not slow down the main thread.

@Phoenix616
Copy link
Member

Well the current code worked for me when I used it in the past so this seems a bit weird. Something must've changed with schematics maybe? I'll try to test it myself when I find the time but feel free to adjust it to keep the pre-caching.

@HarvelsX
Copy link
Author

@Phoenix616, tested only with a large schematic, but with it the previous method of getting blocks from the schematic did not work correctly. Commits above make schematic load asynchronous and lazy to get it later from the future.

@HarvelsX
Copy link
Author

Here's a scheme that the previous method of getting blocks doesn't work with.
art-plot.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants