mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
AntiCheat fix prevent Block Breaking
This commit is contained in:
parent
9a147b57e5
commit
fde50c1728
6 changed files with 15 additions and 14 deletions
|
|
@ -58,7 +58,7 @@ namespace MinecraftClient.Commands
|
|||
Block block = handler.GetWorld().GetBlock(blockToBreak);
|
||||
if (block.Type == Material.Air)
|
||||
return r.SetAndReturn(Status.Fail, Translations.cmd_dig_no_block);
|
||||
else if (handler.DigBlock(blockToBreak, duration: duration))
|
||||
else if (handler.DigBlock(blockToBreak, Direction.Down, duration: duration))
|
||||
{
|
||||
blockToBreak = blockToBreak.ToCenter();
|
||||
return r.SetAndReturn(Status.Done, string.Format(Translations.cmd_dig_dig, blockToBreak.X, blockToBreak.Y, blockToBreak.Z, block.GetTypeString()));
|
||||
|
|
@ -78,7 +78,7 @@ namespace MinecraftClient.Commands
|
|||
return r.SetAndReturn(Status.Fail, Translations.cmd_dig_too_far);
|
||||
else if (block.Type == Material.Air)
|
||||
return r.SetAndReturn(Status.Fail, Translations.cmd_dig_no_block);
|
||||
else if (handler.DigBlock(blockLoc, lookAtBlock: false, duration: duration))
|
||||
else if (handler.DigBlock(blockLoc, Direction.Down, lookAtBlock: false, duration: duration))
|
||||
return r.SetAndReturn(Status.Done, string.Format(Translations.cmd_dig_dig, blockLoc.X, blockLoc.Y, blockLoc.Z, block.GetTypeString()));
|
||||
else
|
||||
return r.SetAndReturn(Status.Fail, Translations.cmd_dig_fail);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue