Skip to content

Commit

Permalink
Fix grid nodes being corrupted under specific circumstances (spatial …
Browse files Browse the repository at this point in the history
…anchor + adjacent QNB)
  • Loading branch information
shartte committed Aug 24, 2024
1 parent b32a2d4 commit 11f82c1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/appeng/me/GridNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ void validateGrid() {
public Grid getInternalGrid() {
if (this.myGrid == null) {
Grid.create(this);
// Note that the node can be moved immediately to a new grid when
// it triggers adjacent connections due to block updates emitted while it joins the grid.
// That means the return value of Grid.create is not necessarily the new grid,
// but myGrid will already have been updated by the Grid calling setGrid on this node.
return Objects.requireNonNull(this.myGrid);
}

Expand Down

0 comments on commit 11f82c1

Please sign in to comment.