mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
No longer need to cancel chunk loading
This commit is contained in:
parent
e4c77b0fef
commit
aceccaf5b5
4 changed files with 12 additions and 66 deletions
|
|
@ -61,7 +61,6 @@ namespace MinecraftClient
|
|||
private float playerYaw;
|
||||
private float playerPitch;
|
||||
private double motionY;
|
||||
private CancellationTokenSource chunkProcessCancelSource = new();
|
||||
public enum MovementType { Sneak, Walk, Sprint}
|
||||
public int currentMovementSpeed = 4;
|
||||
private int sequenceId; // User for player block synchronization (Aka. digging, placing blocks, etc..)
|
||||
|
|
@ -113,7 +112,6 @@ namespace MinecraftClient
|
|||
public int GetSequenceId() { return sequenceId; }
|
||||
public float GetPitch() { return playerPitch; }
|
||||
public World GetWorld() { return world; }
|
||||
public CancellationToken GetChunkProcessCancelToken() { return chunkProcessCancelSource.Token; }
|
||||
public Double GetServerTPS() { return averageTPS; }
|
||||
public bool GetIsSupportPreviewsChat() { return isSupportPreviewsChat; }
|
||||
public float GetHealth() { return playerHealth; }
|
||||
|
|
@ -478,9 +476,7 @@ namespace MinecraftClient
|
|||
/// </summary>
|
||||
public void OnConnectionLost(ChatBot.DisconnectReason reason, string message)
|
||||
{
|
||||
chunkProcessCancelSource.Cancel();
|
||||
world.Clear();
|
||||
chunkProcessCancelSource = new();
|
||||
|
||||
if (timeoutdetector != null)
|
||||
{
|
||||
|
|
@ -908,9 +904,7 @@ namespace MinecraftClient
|
|||
terrainAndMovementsEnabled = false;
|
||||
terrainAndMovementsRequested = false;
|
||||
locationReceived = false;
|
||||
chunkProcessCancelSource.Cancel();
|
||||
world.Clear();
|
||||
chunkProcessCancelSource = new();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1951,9 +1945,7 @@ namespace MinecraftClient
|
|||
|
||||
if (terrainAndMovementsEnabled)
|
||||
{
|
||||
chunkProcessCancelSource.Cancel();
|
||||
world.Clear();
|
||||
chunkProcessCancelSource = new();
|
||||
}
|
||||
|
||||
entities.Clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue