From 9bf3a34c63179cfa7df0272c10e1ad09268f42ab Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Thu, 19 Aug 2021 14:51:33 +0200 Subject: change --- .../miscfeatures/CrystalMetalDetectorSolver.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/main/java/io') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CrystalMetalDetectorSolver.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CrystalMetalDetectorSolver.java index a21673da..22d8e59c 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CrystalMetalDetectorSolver.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CrystalMetalDetectorSolver.java @@ -63,18 +63,10 @@ public class CrystalMetalDetectorSolver { locations.add(mc.thePlayer.getPosition()); List temp = new ArrayList<>(); for (BlockPos pos : possibleBlocks) { - if (round(calculateDistance(new Vec3(pos).addVector(0, 1d, 0), new Vec3(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ)), 1) == dist) { + if (inRange(calculateDistance(new Vec3(pos).addVector(0, 1d, 0), new Vec3(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ)), dist)) { temp.add(pos); } } - if(temp.size() == 0){ - for (BlockPos pos : possibleBlocks) { - if (inRange(calculateDistance(new Vec3(pos).addVector(0, 1d, 0), new Vec3(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ)), dist)) { - temp.add(pos); - mc.thePlayer.addChatMessage(new ChatComponentText("Less accurate calculation")); - } - } - } possibleBlocks = temp; sendMessage(); } -- cgit