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
Implement shared ticket level per-player view distance API #2572
Conversation
Spigot-Server-Patches/0418-ticketlevel-per-player-view-distance-api.patch
Outdated
Show resolved
Hide resolved
Spigot-Server-Patches/0418-ticketlevel-per-player-view-distance-api.patch
Outdated
Show resolved
Hide resolved
Spigot-Server-Patches/0418-ticketlevel-per-player-view-distance-api.patch
Outdated
Show resolved
Hide resolved
Spigot-Server-Patches/0418-ticketlevel-per-player-view-distance-api.patch
Outdated
Show resolved
Hide resolved
Spigot-Server-Patches/0418-ticketlevel-per-player-view-distance-api.patch
Outdated
Show resolved
Hide resolved
Spigot-Server-Patches/0418-ticketlevel-per-player-view-distance-api.patch
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You really need to use a lot of OFBHELPERs and explain all the changes. It needs to be in a state where its the changes are understandable without resorting to different mappings.
Spigot-Server-Patches/0418-Ticket-level-per-player-view-distance-API.patch
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You really need to use a lot of OFBHELPERs and explain all the changes. It needs to be in a state where its the changes are understandable without resorting to different mappings.
Since the implementation utilized one of the cleaner methods, I felt that OBFHELPERs would add unnecessary weight. I'll have another look at it.
Spigot-Server-Patches/0418-ticketlevel-per-player-view-distance-api.patch
Outdated
Show resolved
Hide resolved
Spigot-Server-Patches/0418-ticketlevel-per-player-view-distance-api.patch
Outdated
Show resolved
Hide resolved
OBFHELPERs help core maintainers to port patches to new major release, so they are definitely needed. We can't predict what Mojang is going to do with codebase exactly. |
currently adding |
Spigot-Server-Patches/0418-Ticket-level-per-player-view-distance-API.patch
Outdated
Show resolved
Hide resolved
Spigot-Server-Patches/0418-Ticket-level-per-player-view-distance-API.patch
Outdated
Show resolved
Hide resolved
Spigot-Server-Patches/0418-Ticket-level-per-player-view-distance-API.patch
Outdated
Show resolved
Hide resolved
Spigot-Server-Patches/0418-Ticket-level-per-player-view-distance-API.patch
Outdated
Show resolved
Hide resolved
Spigot-Server-Patches/0418-Ticket-level-per-player-view-distance-API.patch
Outdated
Show resolved
Hide resolved
Spigot-Server-Patches/0418-Ticket-level-per-player-view-distance-API.patch
Outdated
Show resolved
Hide resolved
Spigot-Server-Patches/0418-Ticket-level-per-player-view-distance-API.patch
Outdated
Show resolved
Hide resolved
Good job on this so far Slick, really cool for this to be back in. |
this pr also lacks the ability to send chunks to players correctly |
edit: all solved and committed |
currently in testing phase on ~30 player server alternating between different plugins. external testing would be much appreciated. |
Spigot-Server-Patches/0418-Ticket-level-per-player-view-distance-API.patch
Outdated
Show resolved
Hide resolved
Spigot-Server-Patches/0418-Ticket-level-per-player-view-distance-API.patch
Outdated
Show resolved
Hide resolved
Spigot-Server-Patches/0418-Ticket-level-per-player-view-distance-API.patch
Outdated
Show resolved
Hide resolved
chunk sending is done through
If you inspect these areas of code you will find that the chunk map's view distance is used when determining whether to send the chunk |
all of these things have been accounted for. I have thoroughly reversed the structure of how player tickets affect loading chunks and vice versa over the past week. the
I suggest you test these changes yourself edit: all of these things noted have been commited and solved |
player tickets themselves do not send chunks to players until you fix that issue this pr will not be accepted (amongst other issues I have pointed out) |
Spigot-Server-Patches/0419-Ticket-level-per-player-view-distance-API.patch
Outdated
Show resolved
Hide resolved
@SlickJava Testing your patch (compiled as of your branch/commit SlickJava@b7609f8), you seem to break fake players (NPCs) from being visible. However they still seem to exist since I have a test area with npcs that fight each other. Damage hit values still appear, they are just not visible and can't be interacted with. Using Citizens2 dev 1762. Downgrading back to official paper 1.14 dev 210, npcs are visible again. |
It should be moved regardless, the view distance pr touches view distance - not optimization of a range check. It should also be in its own patch for that reason: it's different. It uses the same utilities as the view distance pr, but that's actually a case to get the utils moved outside this patch and into mc-util |
We are using the latest Citizens Dev Build and we don’t have the problem on our SkyBlock Server (on peaks 70 users) and our CityBuild Server (on peaks 30 users). We don’t had a single player that reported any view distance problems/bugs in the last 2 days. build ca3d2b1 |
@mibby @Hyronymos1337 do any of you happen to have EntityTrackerFixer installed? |
Yes, newest version |
@SlickJava I do not have EntityTrackerFixer installed, no. Citizens being invisible occurs on both my production and test server -- both have different sets of plugins but my test server has significantly less. -snip- Unless it breaks with ProtocolLib or LibsDisguises installed, the only thing really in common is the patch, which downgrading to official paper fixes. |
@mibby this is useful, thanks. The issue may have come from some of the later builds. |
The patch is undergoing a rewrite anyways, so once I push the latest build (in which I may have addressed your issue) let me know if it still persists |
Sure, I'll keep an eye on the PR and rebuild your fork for retesting if there are newer commits not in your released test build. I can only assume it's because of a newer commit if Hyronymos1337 didn't build your fork. |
I‘m 6 commits behind |
Spigot-Server-Patches/0419-Ticket-level-per-player-view-distance-API.patch
Show resolved
Hide resolved
Spigot-Server-Patches/0419-Ticket-level-per-player-view-distance-API.patch
Show resolved
Hide resolved
Spigot-Server-Patches/0419-Ticket-level-per-player-view-distance-API.patch
Show resolved
Hide resolved
Spigot-Server-Patches/0419-Ticket-level-per-player-view-distance-API.patch
Show resolved
Hide resolved
Spigot-Server-Patches/0419-Ticket-level-per-player-view-distance-API.patch
Show resolved
Hide resolved
Spigot-Server-Patches/0419-Ticket-level-per-player-view-distance-API.patch
Show resolved
Hide resolved
Spigot-Server-Patches/0419-Ticket-level-per-player-view-distance-API.patch
Show resolved
Hide resolved
Spigot-Server-Patches/0419-Ticket-level-per-player-view-distance-API.patch
Show resolved
Hide resolved
Spigot-Server-Patches/0419-Ticket-level-per-player-view-distance-API.patch
Show resolved
Hide resolved
Spigot-Server-Patches/0419-Ticket-level-per-player-view-distance-API.patch
Show resolved
Hide resolved
rewrite hasn't been pushed yet, i've addressed all of these issues, just have exams coming up |
o wow nice!, yeah go ahead, irl stuff got in the way (need to focus on informatics olympiad camp!) |
This PR implements the per-player view distance API at the ticket level.
This solution comes from the result of many complicated ones (and research).
The normal view distance value will determine how far the player can add tickets to chunks.
The tracking view distance value will determine how far the player can track/see/load chunks.
Other actions such as mob spawning will naturally fallback onto each player's normal view-distance.
This allows shared view distance from other players without impacting performance.
This solution leaves the main ticket queue/throttler completely alone, meaning all other ticket-related events are 100% unaffected. It operates through a coordinate compression algorithm in order to calculate and properly update squares, attaching those update actions respectively to the default update queue. Details are inside the patch.
Also included is support for a player area map, which is simultaneously calculated from the algorithm mentioned earlier (very efficient indeed), this map may be used for some significant optimizations.
edit: This patch is now largely complete - all there is left to do is to review, thoroughly test and pinpoint any edge cases. jar is below if you would like to help out :))
build ca3d2b1 for pl dev testers (from 209):
SHA1: FCD10004F63E233A242229D71BD07A1135C46A36
https://cdn.discordapp.com/attachments/495168945968513036/631038203180089374/paperclip.jar