mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Allow digging up to 5 blocks away (#1228)
Current calculation was limiting to >= 4 blocks away, but vanilla Minecraft can dig up to 5 blocks away.
This commit is contained in:
parent
017d9b1840
commit
676c6a68a7
1 changed files with 1 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ namespace MinecraftClient.Commands
|
||||||
int y = int.Parse(args[1]);
|
int y = int.Parse(args[1]);
|
||||||
int z = int.Parse(args[2]);
|
int z = int.Parse(args[2]);
|
||||||
Location blockToBreak = new Location(x, y, z);
|
Location blockToBreak = new Location(x, y, z);
|
||||||
if (blockToBreak.DistanceSquared(handler.GetCurrentLocation()) >= 16)
|
if (blockToBreak.DistanceSquared(handler.GetCurrentLocation()) > 25)
|
||||||
return "You are too far away from this block.";
|
return "You are too far away from this block.";
|
||||||
if (handler.GetWorld().GetBlock(blockToBreak).Type == Material.Air)
|
if (handler.GetWorld().GetBlock(blockToBreak).Type == Material.Air)
|
||||||
return "No block at this location (Air)";
|
return "No block at this location (Air)";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue