-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
/is reset resetting chunks from other player's islands #405
Comments
What config do you have? You can drag and drop it to this ticket (may need to zip it) |
@ProSl3nderMan You put the same config (BentoBox's) in both files :-) I'm really after your island size and protection size settings. |
How embarrassing... here: |
Also, to help, could you give me the center coordinates of the two islands in the first example shown in the video? |
The island not being reset: x:0 y:120 z:-128 |
Okay, thanks. I can replicate this now. |
Might be our chunk-based island-deleter working too well? :laugh: @ProSl3nderMan Thanks for the explanatory video. That helps us a lot. |
The problem was with the way that chunk coordinates were being calculated. The correct way is to use signed right shift >> 4 but I was doing divide /16. Divide doesn't work with negative values correctly. |
#405 Adds test class for DeleteIslandChunks class.
Use bit shift instead of dividing? I didn't know we could use bit shifting in Java. |
Yes, that is how actually Minecraft calculates chunk values, by doing >> 4. I double checked Dinnerbone's own code after seeing the difference with negative coordinates. |
@ProSl3nderMan Thanks for the report and the video! |
Description
All islands with a positive x and negative x coords on the SAME island will loose 2 blocks in their negative x side if the player to their negative x side resets their island. This also happens with islands that have positive z and negative z coords on the SAME island, they will loose 2 blocks in their negative z side if the player to their negative z side resets their island. Now, I cannot explain this in greater detail because of how confusing it can be, please watch this video to get a good explanation of what is happening:
https://www.youtube.com/watch?v=mSiEf-7lBRY&feature=youtu.be
Steps to reproduce the behavior:
To text for the positive z and negative z coords islands, do the same exact steps as above but replace x with z.
Watch this video for a better explanation and a tutorial on how I produced these bugs:
https://www.youtube.com/watch?v=mSiEf-7lBRY&feature=youtu.be
Expected behavior
What I expect to happen is when the player resets their island, it does not take out 2 blocks into another player's island. Only islands with half positive and half negative coords loose 2 blocks, and they only loose the 2 blocks in the negative side of their island.
Screenshots
Instead of screenshots, I made a video:
https://www.youtube.com/watch?v=mSiEf-7lBRY&feature=youtu.be
Server Information:
I do believe this problem can be fixed in the util class "DeleteIslandChunks," the problem should be how the chunks are being calculated/found. I would try fixing myself but I am not good with that type of math.
The text was updated successfully, but these errors were encountered: