mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
avoid pathfind to an unloaded chunk | remove debug logs
This commit is contained in:
parent
f9bb74a8bd
commit
af574b654e
3 changed files with 4 additions and 3 deletions
|
|
@ -76,7 +76,9 @@ namespace MinecraftClient.Commands
|
||||||
int z = int.Parse(args[2]);
|
int z = int.Parse(args[2]);
|
||||||
Location goal = new Location(x, y, z);
|
Location goal = new Location(x, y, z);
|
||||||
|
|
||||||
if (handler.MoveTo(goal, allowUnsafe: takeRisk))
|
if (handler.GetWorld().GetChunkColumn(goal) == null)
|
||||||
|
return Translations.Get("cmd.move.chunk_not_loaded");
|
||||||
|
else if (handler.MoveTo(goal, allowUnsafe: takeRisk))
|
||||||
return Translations.Get("cmd.move.walk", goal);
|
return Translations.Get("cmd.move.walk", goal);
|
||||||
else return takeRisk ? Translations.Get("cmd.move.fail", goal) : Translations.Get("cmd.move.suggestforce", goal);
|
else return takeRisk ? Translations.Get("cmd.move.fail", goal) : Translations.Get("cmd.move.suggestforce", goal);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,6 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
/// <param name="cache">Cache for reading chunk data</param>
|
/// <param name="cache">Cache for reading chunk data</param>
|
||||||
public void ProcessChunkColumnData(int chunkX, int chunkZ, ulong[] chunkMasks, int currentDimension, Queue<byte> cache)
|
public void ProcessChunkColumnData(int chunkX, int chunkZ, ulong[] chunkMasks, int currentDimension, Queue<byte> cache)
|
||||||
{
|
{
|
||||||
byte[] mirror = new byte[cache.Count];
|
|
||||||
cache.CopyTo(mirror, 0);
|
|
||||||
int chunkColumnSize = chunkMasks.Length * 64;
|
int chunkColumnSize = chunkMasks.Length * 64;
|
||||||
if (protocolversion >= Protocol18Handler.MC117Version)
|
if (protocolversion >= Protocol18Handler.MC117Version)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -319,6 +319,7 @@ cmd.move.fail=Failed to compute path to {0}
|
||||||
cmd.move.suggestforce=Failed to compute a safe path to {0}. Try -f parameter to allow unsafe movements.
|
cmd.move.suggestforce=Failed to compute a safe path to {0}. Try -f parameter to allow unsafe movements.
|
||||||
cmd.move.gravity.enabled=Gravity is enabled.
|
cmd.move.gravity.enabled=Gravity is enabled.
|
||||||
cmd.move.gravity.disabled=Gravity is disabled.
|
cmd.move.gravity.disabled=Gravity is disabled.
|
||||||
|
cmd.move.chunk_not_loaded=The chunk where the target location resides has not yet been loaded.
|
||||||
|
|
||||||
# Reco
|
# Reco
|
||||||
cmd.reco.desc=restart and reconnect to the server.
|
cmd.reco.desc=restart and reconnect to the server.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue