-
-
Notifications
You must be signed in to change notification settings - Fork 906
fix: block nbt population #4737
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
base: main
Are you sure you want to change the base?
Conversation
Bukkit/src/main/java/com/plotsquared/bukkit/schematic/StateWrapper.java
Outdated
Show resolved
Hide resolved
|
I've attempted to use the native NMS methods for loading and updating the block states, which seems to work partially. Performance-wise it doesn't seem too bad. It'll be slower than the previous approach ig, but based on my testing the mean duration for a tile entity update (tag conversion, loading + updating) was roughly 500μs (lowest being like 50μs, and highest 10ms). I could do some additional benchmarks with the previous logic ig. But as it does not work 100% yet and is quite untested, I've not prioritized that high yet. EDIT: Signs don't work because the methods applying the NBT data require the SignEntity to be related to a ServerLevel, which there isn't in WorldGen / block population. Will see how I can workaround that |
|
Please take a moment and address the merge conflicts of your pull request. Thanks! |
ba8d8a5 to
8002d17
Compare
no need to use different implementations for spigot vs paper anymore
latest 1.19.4 FAWE has support for it
|
I've tested with a few tile entities (and extensively with signs) - everything seems to work so far (except one thing on a spigot server, where some sign lines were just raw JSON - but I feel like the schematic is kinda broken). But I would appreciate further testing. |
Overview
Fixes #4552
Fixes #4708
Description
NBT format changed in the last few versions. Now uses the native methods "provided" by minecraft to set data via the original NBT data.
Submitter Checklist
@since TODO.