aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2021-08-19 14:51:33 +0200
committerDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2021-08-19 14:51:33 +0200
commit9bf3a34c63179cfa7df0272c10e1ad09268f42ab (patch)
tree30655fcbbf2ba1e26bc7507a42cfdfc380eeef8a /src/main
parent80ef1d055cd685bf6dc643a2f51354d91f227862 (diff)
downloadNotEnoughUpdates-9bf3a34c63179cfa7df0272c10e1ad09268f42ab.tar.gz
NotEnoughUpdates-9bf3a34c63179cfa7df0272c10e1ad09268f42ab.tar.bz2
NotEnoughUpdates-9bf3a34c63179cfa7df0272c10e1ad09268f42ab.zip
change
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CrystalMetalDetectorSolver.java10
1 files changed, 1 insertions, 9 deletions
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<BlockPos> 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();
}