Closed janchaloupka closed 2 years ago
Should probably be using WorldInfo.getMinHeight()
and WorldInfo.getMaxHeight()
for world height checks.
Thanks again! Might need to think about a way to update existing regions.
Should probably be using
WorldInfo.getMinHeight()
andWorldInfo.getMaxHeight()
for world height checks.
Thanks for the suggestion. I updated the code and now it should be more future-proof.
Thanks again! Might need to think about a way to update existing regions.
No problem! I propose to create new command (something like /usb wg updateall
or /usb wg update all
) that will update all island regions.
Of course this would require the admins to run this command. Maybe the plugin could also check its version number on startup and if the config version is older than this version it could run the command automatically.
It would be a good idea to also check other parts of the code for hardcoded world limits (ex. https://github.com/uskyblock/uSkyBlock/blob/c96543beb006838f2f3b1d220a52402dd05d8f7e/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/island/level/ChunkSnapshotLevelLogic.java#L80). For example, everything that is built below or above old limits is not counted towards island level or biome change is not applied below and above old limits.
I checked all parts of the source code and (hopefully) fixed every hardcoded world height reference.
What's fixed:
Thanks very much all, will review and merge when I'm back at the PC with some spare time. Somewhere this week :)
The problem with the failing build is because of the outdated reference to FAWE dependency. I have it fixed in my local repository. I can push it if it's not already fixed in another branch.
Feel free to push.
Looks good to me, updating a single region in my test server (/usb wg update) changed the coordinates correctly:
Lets merge... Build might fail, there seems to be a new method in OfflinePlayer that we need to expand in our NullPlayer. Will commit afterwards.
Some of the players on our server are complaining that they cannot build below Y0 after the new 1.18 update. I briefly looked into the code and found that the minimum and maximum region height values are hard coded to the old world limits.
I propose to change these values to reflect the new world height limits.
(moved to uskyblock/uSkyBlock repo as per request https://github.com/rlf/uSkyBlock/pull/1288#issuecomment-1023485736)