FastAsyncWorldEdit
FastAsyncWorldEdit copied to clipboard
feat: allow placement of minecraft gen features and structures
- closes #2343
This only works if the EditSession is backed by an actual World, I think this should be outlined in the Javadocs.
noticed upstream has this functionality, will change to match them and cherry-pick where appropriate
Please take a moment and address the merge conflicts of your pull request. Thanks!
As there's a mix of structures and features here, what exactly do we add what WE doesn't add?
StructureTypeis in the WE source here, but the commands and the tools for it are in the FAWE source, that's a bit confusing to me right now.
The various Tool/Factory classes are in FAWE because they are classes added by FAWE. The actual command methods are in com.sk89q because all commands are there, and are effectively just class edits, not new classes.
This implementation was in line with how we handle tree generation, and if we can avoid using an InvocationHandler when it's not needed I think we should (the same for any reflection really)
Please rebase for 1.20.3/4
Please take a moment and address the merge conflicts of your pull request. Thanks!
For some reason there is a folder with a . instead of nested folders for the 1.20.4 adapter
From a quick test, it looks like e.g. //structure bastion_remnant throws an exception. I don't know if we can fix it, but I think it should at least be handled in a way that doesn't spam the console making it look like FAWE is doing something wrong.
Similarly, features and structures often cannot be placed with messages "Failed to generated structure. Is it a valid spot for it?" and "This feature cannot go here. Ensure the area meets the requirements." In fact, I wasn't able to spawn any feature for now. Can we somehow lift those restrictions? Otherwise, this is very limiting in its use.
From a quick test, it looks like e.g.
//structure bastion_remnantthrows an exception. I don't know if we can fix it, but I think it should at least be handled in a way that doesn't spam the console making it look like FAWE is doing something wrong.
Yes probably worth doing that
Similarly, features and structures often cannot be placed with messages "Failed to generated structure. Is it a valid spot for it?" and "This feature cannot go here. Ensure the area meets the requirements." In fact, I wasn't able to spawn any feature for now. Can we somehow lift those restrictions? Otherwise, this is very limiting in its use.
I tried, but no. Minecraft generation code is complete spaghetti and it would require an incredible amount of reflection and likely need us to perform changes to the byte code. The command in upstream WE has the same limitations
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 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 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 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 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!