bytzo / sessility

AFK utilities for the server: Keeps track of sessile creatures, more often known as "AFK players".
https://modrinth.com/mod/sessility
MIT License
4 stars 4 forks source link

Add PlayerMixin to use advancements and rotation to detect player motility #4

Closed donington closed 11 months ago

donington commented 12 months ago

Using advancements to detect various player actions and interactions with the world around them to trigger motile.

Also added basic rotation detection as a starting point, but it is specifically disabled in vehicles since they cause the player to rotate triggering false positives.

Options to disable these features have been added as well.

donington commented 11 months ago

Updated. I did attempt at adding the support needed for setSessile(false) operate correctly. Let me know if I missed anything!

donington commented 11 months ago

I cleaned up the lastMotileTime code, you were right the solution was very simple thanks to the way it updates already. I did a final cleanup pass as well since I just can't help myself from sneaking spaces in by accident.

bytzo commented 11 months ago

This looks good to me! I haven't found any issues in testing so far, so I'll merge this now. Thanks so much for the contribution!

donington commented 11 months ago

Happy to help improve your already good mod :)