fix(tile): correct loop variable from i to j in nearby check (#10701)

In TilePreChangeEvent handling, the inner loop used `i` instead of `j` when checking nearby tiles, which could lead to incorrect nearSolid flag updates. This fixes the variable naming conflict.
This commit is contained in:
Haerbin23456 2025-04-21 21:32:26 +08:00 committed by GitHub
parent e401fa38a4
commit de350ea2c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -159,7 +159,7 @@ public class Pathfinder implements Runnable{
if(!other.solid()){
boolean otherNearSolid = false;
for(int j = 0; j < 4; j++){
Tile othernear = other.nearby(i);
Tile othernear = other.nearby(j);
if(othernear != null && othernear.solid()){
otherNearSolid = true;
break;