mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Bug fix: Cancel chunk load task when switching worlds
This commit is contained in:
parent
e150bd569b
commit
01ef9a89ca
7 changed files with 127 additions and 31 deletions
|
|
@ -71,6 +71,11 @@ namespace MinecraftClient.Commands
|
|||
case "get": return handler.GetCurrentLocation().ToString();
|
||||
default: return Translations.Get("cmd.look.unknown", args[0]);
|
||||
}
|
||||
|
||||
Location goal = Movement.Move(handler.GetCurrentLocation(), direction);
|
||||
if (handler.GetWorld().GetChunkColumn(goal) == null || handler.GetWorld().GetChunkColumn(goal)!.FullyLoaded == false)
|
||||
return Translations.Get("cmd.move.chunk_not_loaded");
|
||||
|
||||
if (Movement.CanMove(handler.GetWorld(), handler.GetCurrentLocation(), direction))
|
||||
{
|
||||
if (handler.MoveTo(Movement.Move(handler.GetCurrentLocation(), direction), allowUnsafe: takeRisk))
|
||||
|
|
@ -88,7 +93,7 @@ namespace MinecraftClient.Commands
|
|||
int z = int.Parse(args[2]);
|
||||
Location goal = new Location(x, y, z);
|
||||
|
||||
if (handler.GetWorld().GetChunkColumn(goal) == null || handler.GetWorld().GetChunkColumn(goal).FullyLoaded == false)
|
||||
if (handler.GetWorld().GetChunkColumn(goal) == null || handler.GetWorld().GetChunkColumn(goal)!.FullyLoaded == false)
|
||||
return Translations.Get("cmd.move.chunk_not_loaded");
|
||||
|
||||
Location current = handler.GetCurrentLocation();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue