Skip to content

fix: ensure script flow continues after successful pathfinding#955

Merged
AlexProgrammerDE merged 1 commit intoAlexProgrammerDE:mainfrom
Roll1r:pathfindingfix-clean
Mar 15, 2026
Merged

fix: ensure script flow continues after successful pathfinding#955
AlexProgrammerDE merged 1 commit intoAlexProgrammerDE:mainfrom
Roll1r:pathfindingfix-clean

Conversation

@Roll1r
Copy link
Copy Markdown
Contributor

@Roll1r Roll1r commented Mar 2, 2026

fixed problem when after successful completion nodes with pathfinding flow of script doesn't continue

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a control-flow bug in several script action nodes where successful pathfinding could complete without emitting a result, preventing the script from continuing.

Changes:

  • Replace .map(...) with .thenReturn(...) after Mono.fromFuture(PathExecutor.executePathfinding(...)) so a success result is emitted even when the underlying CompletableFuture<Void> completes with null.
  • Apply the same fix consistently across pathfinding-based action nodes (pathfind-to, pathfind-away, break-block, place-block).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
mod/src/main/java/com/soulfiremc/server/script/nodes/action/PlaceBlockNode.java Ensure success output is emitted after pathfinding completion by using thenReturn.
mod/src/main/java/com/soulfiremc/server/script/nodes/action/PathfindToNode.java Ensure success output is emitted after pathfinding completion by using thenReturn.
mod/src/main/java/com/soulfiremc/server/script/nodes/action/PathfindAwayFromNode.java Ensure success output is emitted after pathfinding completion by using thenReturn.
mod/src/main/java/com/soulfiremc/server/script/nodes/action/BreakBlockNode.java Ensure success output is emitted after pathfinding completion by using thenReturn.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AlexProgrammerDE AlexProgrammerDE merged commit 1addc47 into AlexProgrammerDE:main Mar 15, 2026
5 checks passed
@Roll1r Roll1r deleted the pathfindingfix-clean branch March 15, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants