aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java11
1 files changed, 11 insertions, 0 deletions
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 242fce4e..55dedadf 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java
@@ -1005,6 +1005,11 @@ public class CustomItemEffects {
event.target.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK &&
NotEnoughUpdates.INSTANCE.config.itemOverlays.enableDirtWandOverlay) {
BlockPos hover = event.target.getBlockPos().offset(event.target.sideHit, 1);
+ if ("garden".equals(SBInfo.getInstance().getLocation()) &&
+ (hover.getX() > 239 || hover.getX() < -240 || hover.getZ() > 239 || hover.getZ() < -240 ||
+ hover.getY() <= 66 || hover.getY() > 76)) {
+ return;
+ }
IBlockState hoverState = Minecraft.getMinecraft().theWorld.getBlockState(event.target
.getBlockPos()
.offset(event.target.sideHit, 1));
@@ -1579,6 +1584,9 @@ 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) {
+ continue;
+ }
candidatesOldSorted.computeIfAbsent(distSq, k -> new HashSet<>()).add(candidate);
candidatesOld.add(candidate);
@@ -1598,6 +1606,9 @@ public class CustomItemEffects {
if (plotX != plotXNew || plotZ != plotZNew) {
continue;
}
+ if (2 < plotXNew || plotXNew < -2 || 2 < plotZNew || plotZNew < -2) {
+ continue;
+ }
}
if (!sneaking) {
if (Minecraft.getMinecraft().theWorld.getBlockState(candidate.add(xOff, 1, zOff)).getBlock() == Blocks.air) {