-
Notifications
You must be signed in to change notification settings - Fork 12
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
Expand all runAtLocation methods to support chunk coordinate arguments #20
Conversation
Hey xGinko, typically this developer likes to merge PRs into |
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.
These changes will be needed to match up with the dev
branch.
* @param consumer Task to run | ||
* @param delay Delay before execution in ticks | ||
*/ | ||
void runAtLocationLater(World world, int chunkX, int chunkZ, @NotNull Consumer<WrappedTask> consumer, long delay); |
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.
This should return a CompleteableFuture<Void>
, matching the other methods from #16
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.
Yep
* @param delay Delay before execution | ||
* @param unit Time unit | ||
*/ | ||
void runAtLocationLater(World world, int chunkX, int chunkZ, @NotNull Consumer<WrappedTask> consumer, long delay, TimeUnit unit); |
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.
This should return a CompleteableFuture<Void>
, matching the other methods from #16
yo @CJCrafter thanks for pointing me in the right direction |
* @param consumer Task to run | ||
* @return Future when the task is completed | ||
*/ | ||
CompletableFuture<Void> runAtLocation(World world, int chunkX, int chunkZ, @NotNull Consumer<WrappedTask> consumer); |
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.
Could we possibly do runAtChunk please? It makes it a little more obvious what int & int parameters will be. (Same for all other runAtChunk changes)
* @param consumer Task to run | ||
* @param delay Delay before execution in ticks | ||
*/ | ||
void runAtLocationLater(World world, int chunkX, int chunkZ, @NotNull Consumer<WrappedTask> consumer, long delay); |
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.
Yep
Hey @xGinko , thank you for contributing! As you noticed, we requested a few changes, so there 2 main things that need changing before accepting this:
|
@xGinko Should we keep this open? |
@TechnicallyCoded I'll make a new one |
Closes #11
Adds support for passing in world and chunk coordinates for all runAtLocation methods.