From 202fa439931f4171f2f53995e63f82da6876e596 Mon Sep 17 00:00:00 2001 From: DespairScent <74109497+DespairScent@users.noreply.github.com> Date: Thu, 30 May 2024 22:41:24 +0300 Subject: Fix Builder's Ruler overlay not working outside the garden (#1183) --- .../moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java index 44169439..3f71e3c8 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java @@ -1672,7 +1672,8 @@ public class CustomItemEffects { (candidate.getY() + 0.5f - d1 - player.getEyeHeight()) * (candidate.getY() + 0.5f - d1 - player.getEyeHeight()) + (candidate.getZ() + 0.5f - d2) * (candidate.getZ() + 0.5f - d2)); - if (candidate.getY() < 66 || candidate.getY() >= 76) { + if ("garden".equals(SBInfo.getInstance().getLocation()) && + (candidate.getY() < 66 || candidate.getY() >= 76)) { continue; } candidatesOldSorted.computeIfAbsent(distSq, k -> new HashSet<>()).add(candidate); -- cgit