-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add Block / Item ID conversion and add support for larger ids / data in schematic files #14
base: master
Are you sure you want to change the base?
Conversation
see https://github.com/spacebuilder2020/worldedit-gtnh/blob/master/src/main/java/com/sk89q/worldedit/forge/ForgeWorldEdit.java#L125 long term fix: update data to be of type short instead of byte
…. (to maintain compat with vanilla)
Initially, I wanted to preserve the ability to set a block to -1, so I did not do any unsigned casting on the second byte of the data block. However, looking at this code, it seems -1 is for wild card and that doesn't seem like a feature that you would expect to get from a schematic since that is a snapshot of a world region so I am thinking it may be best to change the code to do an unsigned cast to int on the data short. Thoughts? Update: After more testing, determined that there were blocks that were being set to -1 erroneously, and since -1 was for wild cards and caused the copy to stop when pasting in, I have since updated logic to always do a unsigned cast. |
…t is only applicable for wildcards and causes the paste to fail.
Replace calls to toUnsignedInt with bitwise equivalent for consistency with rest of code.
No description provided.