Supports changing position and angle after catching fish

This commit is contained in:
BruceChen 2022-09-12 16:27:37 +08:00
parent ccb8610020
commit 949126c9cb
7 changed files with 249 additions and 38 deletions

View file

@ -643,5 +643,25 @@ namespace MinecraftClient.Mapping
throw new ArgumentException("Unknown direction", "direction");
}
}
/// <summary>
/// Check that the chunks at both the start and destination locations have been loaded
/// </summary>
/// <param name="world">Current world</param>
/// <param name="start">Start location</param>
/// <param name="dest">Destination location</param>
/// <returns>Is loading complete</returns>
public static bool CheckChunkLoading(World world, Location start, Location dest)
{
ChunkColumn? chunkColumn = world.GetChunkColumn(dest);
if (chunkColumn == null || chunkColumn.FullyLoaded == false)
return false;
chunkColumn = world.GetChunkColumn(start);
if (chunkColumn == null || chunkColumn.FullyLoaded == false)
return false;
return true;
}
}
}