From 676c6a68a73b5376e99648b4dea4082fe3eed067 Mon Sep 17 00:00:00 2001 From: ORelio Date: Sun, 23 Aug 2020 20:35:54 +0200 Subject: [PATCH] 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. --- MinecraftClient/Commands/Dig.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MinecraftClient/Commands/Dig.cs b/MinecraftClient/Commands/Dig.cs index d3dfc7f4..80b4d04a 100644 --- a/MinecraftClient/Commands/Dig.cs +++ b/MinecraftClient/Commands/Dig.cs @@ -27,7 +27,7 @@ namespace MinecraftClient.Commands int y = int.Parse(args[1]); int z = int.Parse(args[2]); 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."; if (handler.GetWorld().GetBlock(blockToBreak).Type == Material.Air) return "No block at this location (Air)";