This commit is contained in:
BruceChen 2022-10-09 07:57:28 +08:00
parent 2f5914dd6f
commit f567cadc47
3 changed files with 5 additions and 2 deletions

View file

@ -33,7 +33,7 @@ namespace MinecraftClient.Commands
try try
{ {
Location current = handler.GetCurrentLocation(); Location current = handler.GetCurrentLocation();
Location blockToBreak = Location.Parse(current, args[0], args[1], args[2]); Location blockToBreak = Location.Parse(current.ToFloor(), args[0], args[1], args[2]);
if (blockToBreak.DistanceSquared(current.EyesLocation()) > 25) if (blockToBreak.DistanceSquared(current.EyesLocation()) > 25)
return Translations.Get("cmd.dig.too_far"); return Translations.Get("cmd.dig.too_far");
Block block = handler.GetWorld().GetBlock(blockToBreak); Block block = handler.GetWorld().GetBlock(blockToBreak);

View file

@ -18,7 +18,7 @@ namespace MinecraftClient.Commands
string[] args = GetArgs(command); string[] args = GetArgs(command);
if (args.Length >= 3) if (args.Length >= 3)
{ {
Location block = Location.Parse(handler.GetCurrentLocation(), args[0], args[1], args[2]).ToFloor(); Location block = Location.Parse(handler.GetCurrentLocation().ToFloor(), args[0], args[1], args[2]).ToFloor();
Location blockCenter = block.ToCenter(); Location blockCenter = block.ToCenter();
bool res = handler.PlaceBlock(block, Direction.Down); bool res = handler.PlaceBlock(block, Direction.Down);
return Translations.Get("cmd.useblock.use", blockCenter.X, blockCenter.Y, blockCenter.Z, res ? "succeeded" : "failed"); return Translations.Get("cmd.useblock.use", blockCenter.X, blockCenter.Y, blockCenter.Z, res ? "succeeded" : "failed");

View file

@ -393,6 +393,9 @@ namespace MinecraftClient
} }
SetServerIP(General.Server, true); SetServerIP(General.Server, true);
for (int i = 0; i < Advanced.BotOwners.Count; ++i)
Advanced.BotOwners[i] = ToLowerIfNeed(Advanced.BotOwners[i]);
} }
[TomlDoNotInlineObject] [TomlDoNotInlineObject]