Implemented Folia-safe sign check for teleportation in front instead on top#2342
Implemented Folia-safe sign check for teleportation in front instead on top#2342nezbite wants to merge 1 commit into
Conversation
|
Double-chest shops have been tested and work as intended. |
|
This doesn't seem thread safe to me, accessing the world state (either directly via Block#getState or via the getSigns method) is explicitly what that note is warning you about, there's no guarantee you're currently on the right region thread for the shop. A better way to do this would be to only start looking for the teleport location once the teleport action is used and after the inventory is closed, schedule a task on the region thread for the shop that then schedules an async chunk load. Only then can you safely call Shop#getSigns to try and find a valid teleport location. |
|
I'm going to withhold this until the API expansion PR, but as stated above, it mixes world interaction where it shouldn't |
Summary
What does this PR do?
Type of Change
Basic Checks
Notes (optional)
Add anything important for reviewers:
Breaking Changes (if applicable)