-
-
Notifications
You must be signed in to change notification settings - Fork 463
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
Asynchronous event handling with functional non-thread-blocking chunk loading [PROPOSAL] #129
Asynchronous event handling with functional non-thread-blocking chunk loading [PROPOSAL] #129
Commits on Jul 10, 2023
-
Implement EntityTeleportEvent properly
Many things to express. This change implements the EntityTeleportEvent in a context thread safe way. The following are handled: - Passengers have the event called properly - Recursion is prevented by checking for the teleport status. Such status is revoked by overriding and chaining the teleport callback. It is manually removed when the event fails and henceforth the callback would call null, or when the entities are in the same chunk region, and hence don't call the callback. - Teleporting status is removed on callback - Modifying the teleport location of passenger entities is forbidden to prevent conflicts - Cancelling an entity riding will dismount it and NOT trigger any events for its passengers
Configuration menu - View commit details
-
Copy full SHA for 84a262a - Browse repository at this point
Copy the full SHA 84a262aView commit details
Commits on Jul 11, 2023
-
Configuration menu - View commit details
-
Copy full SHA for b58e3a9 - Browse repository at this point
Copy the full SHA b58e3a9View commit details -
Rework listeners to support proper linear execution and deprecate old…
… bukkit event api - Reworked listeners. Now they execute synchronously after any edits including chunk loading. This allows for perfect asynchronous linear behaviour (tested!) - Reworked bukkit event api, introduced callEventAsync. If old method is call, the event is at risk of not having the proper data if paired up with any kind of chunk loading or non-direct modifier which is called asynchronously. This is the best we could possibly do without creating conflicting behaviour - Fixed teleportation whoopsie I made
Configuration menu - View commit details
-
Copy full SHA for b3ee17a - Browse repository at this point
Copy the full SHA b3ee17aView commit details -
Improve asynchronous calling, make thread safe by returning to previo…
…usly fetched thread context - If the current thread is not a region --> run consecutive code on current thread - If the origin of the event is unspecified --> heuristical approach at fetching current thread coords by taking a random coordinate in current map of thread. This can go wrong so easily, SpottedLeaf, this one's on you, I trust that you'll help me improve this - If the origin of the event is specified -> return to thread context at specified location (hurray) Additional improvements: - Made nms command /teleport depend on bukkit handling to support proper event handling - Added player teleportation to the handlers. All player teleports now have the same behaviour as chunk fetches (yipee) - Fixed a scenario of chunk loading I forgot about
Configuration menu - View commit details
-
Copy full SHA for c5543de - Browse repository at this point
Copy the full SHA c5543deView commit details -
Implemented the following events: - PlayerSpawnLocationEvent, - EntityPortalEnterEvent, - EntityPortalExitEvent, - PlayerPortalEvent, - EntityPortalReadyEvent
Configuration menu - View commit details
-
Copy full SHA for c463a5d - Browse repository at this point
Copy the full SHA c463a5dView commit details
Commits on Jul 12, 2023
-
Fix multiple events and ensure they are fired properly + fix global t…
…hread and offthread events - Fixed issue where global thread events wouldn't be properly accounted for - Fixed an issue where the EntityEnterPortalEvent would be fired every tick (god knows how long this has been there like this)
Configuration menu - View commit details
-
Copy full SHA for b01fc90 - Browse repository at this point
Copy the full SHA b01fc90View commit details -
Configuration menu - View commit details
-
Copy full SHA for a8b7f25 - Browse repository at this point
Copy the full SHA a8b7f25View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d617bd - Browse repository at this point
Copy the full SHA 8d617bdView commit details
Commits on Jul 17, 2023
-
Fix non-region threads + Player/EntityPortalEvent
- Fix non-region threads calling teleport and chunk functions failing - Fixed wrong origin level in player and entity portal event
Configuration menu - View commit details
-
Copy full SHA for 71172e9 - Browse repository at this point
Copy the full SHA 71172e9View commit details
Commits on Jul 18, 2023
-
Configuration menu - View commit details
-
Copy full SHA for f4dfb03 - Browse repository at this point
Copy the full SHA f4dfb03View commit details