From d0a2193d4a93ecc7dd69499cd1aa86c94d0f51f4 Mon Sep 17 00:00:00 2001 From: Gaider10 <72764892+Gaider10@users.noreply.github.com> Date: Fri, 24 Sep 2021 11:02:14 +0300 Subject: [PATCH] Fix interaction pos in range check (#6654) --- .../server/0493-Move-range-check-for-block-placing-up.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/server/0493-Move-range-check-for-block-placing-up.patch b/patches/server/0493-Move-range-check-for-block-placing-up.patch index 85a552e41d..d0cdb3e21f 100644 --- a/patches/server/0493-Move-range-check-for-block-placing-up.patch +++ b/patches/server/0493-Move-range-check-for-block-placing-up.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Move range check for block placing up diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 36a69fb0a9cd81ceb0f9cbe6549fc89bd643c77c..7bf9f2b85c51424b53c08166b6ba3943f1abe0fe 100644 +index 36a69fb0a9cd81ceb0f9cbe6549fc89bd643c77c..51303e89ec160f3715e538903ae98be993d59150 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1661,6 +1661,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -29,7 +29,7 @@ index 36a69fb0a9cd81ceb0f9cbe6549fc89bd643c77c..7bf9f2b85c51424b53c08166b6ba3943 + // Paper start - move check up and check actual location as well + final Vec3 clickedLocation = movingobjectpositionblock.getLocation(); -+ if (isOutsideOfReach(blockposition.getX(), blockposition.getY(), blockposition.getZ()) ++ if (isOutsideOfReach(blockposition.getX() + 0.5D, blockposition.getY() + 0.5D, blockposition.getZ() + 0.5D) + || !Double.isFinite(clickedLocation.x) || !Double.isFinite(clickedLocation.y) || !Double.isFinite(clickedLocation.z) + || isOutsideOfReach(clickedLocation.x, clickedLocation.y, clickedLocation.z)) { + return;