Better Command Action Scheduling System #51
Labels
bug
Something isn't working
enhancement
New feature or request
help wanted
Extra attention is needed
The issue at hand:
CommandAliases/src/main/java/me/flashyreese/mods/commandaliases/command/builder/custom/AbstractCustomCommandBuilder.java
Lines 300 to 376 in 44c88ee
The current implementation of the custom command builder method is less efficient than the previous version. The previous version utilized a new thread to call variables, but this caused issues with certain mods like Immersive Portals. The current version uses a scheduler for commands, but this approach has a drawback in that it does not wait for custom commands to finish before scheduling the next one. This can lead to issues with sub-actions not completing before the next action is scheduled.
This is a problem because we use an atomic integer to return the state of our custom commands when we call them within command actions. When the scheduler is used, it can interfere with the state of our data if we are working with the database, leading to unexpected results.
We are seeking suggestions for alternative methods of implementation that do not involve summoning new threads. Feedback on this issue is greatly appreciated.
(An outdated image sketch that inadequately demonstrates the current issue)
The text was updated successfully, but these errors were encountered: