aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CrystalMetalDetectorSolver.java
diff options
context:
space:
mode:
authorDavid Mills <85420839+Keebler408@users.noreply.github.com>2021-09-11 10:35:55 -0500
committerDavid Mills <85420839+Keebler408@users.noreply.github.com>2021-09-11 10:35:55 -0500
commite0a71fdc7a1bf466992fc6db96a15b778909cc18 (patch)
treef8e4a9e183333e96748d1baeadcfa7798f6aef2b /src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CrystalMetalDetectorSolver.java
parent29cea4c4922443ae78c47cd49e4a74ab67eb15f2 (diff)
downloadnotenoughupdates-e0a71fdc7a1bf466992fc6db96a15b778909cc18.tar.gz
notenoughupdates-e0a71fdc7a1bf466992fc6db96a15b778909cc18.tar.bz2
notenoughupdates-e0a71fdc7a1bf466992fc6db96a15b778909cc18.zip
Fix jitter, improve metal detector beacon
- Fix jitter caused by location coord truncation from double to int - Move remaining fairy souls beacon rendering into RenderUtils.java - Add beacon option to enable depth testing when player is close by - Use new rendering for metal detector to make beacons more visible
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CrystalMetalDetectorSolver.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CrystalMetalDetectorSolver.java12
1 files changed, 2 insertions, 10 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 1172f1c5..5e9c59ac 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CrystalMetalDetectorSolver.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CrystalMetalDetectorSolver.java
@@ -108,24 +108,16 @@ public class CrystalMetalDetectorSolver {
if (SBInfo.getInstance().getLocation() != null && SBInfo.getInstance().getLocation().equals("crystal_hollows") &&
SBInfo.getInstance().location.equals("Mines of Divan")) {
- BlockPos viewer = RenderUtils.getCurrentViewer(partialTicks);
if (possibleBlocks.size() == 1) {
BlockPos block = possibleBlocks.get(0);
- double x = block.getX() - viewer.getX();
- double y = block.getY() - viewer.getY();
- double z = block.getZ() - viewer.getZ();
- RenderUtils.renderBeaconBeam(x, y, z, beaconRGB, 1.0f, partialTicks);
+ RenderUtils.renderBeaconBeam(block, beaconRGB, 1.0f, partialTicks);
RenderUtils.renderWayPoint("Treasure", possibleBlocks.get(0).add(0, 2.5, 0), partialTicks);
} else if (possibleBlocks.size() > 1 && (locations.size() > 1 || possibleBlocks.size() < 10) &&
NotEnoughUpdates.INSTANCE.config.mining.metalDetectorShowPossible) {
for (BlockPos block : possibleBlocks) {
- double x = block.getX() - viewer.getX();
- double y = block.getY() - viewer.getY();;
- double z = block.getZ() - viewer.getZ();;
-
- RenderUtils.renderBeaconBeam(x, y, z, beaconRGB, 1.0f, partialTicks);
+ RenderUtils.renderBeaconBeam(block, beaconRGB, 1.0f, partialTicks);
RenderUtils.renderWayPoint("Possible Treasure Location", block.add(0, 2.5, 0), partialTicks);
}
}