13
0
geforkt von Mirrors/Paper

Fix interaction pos in range check (#6654)

Dieser Commit ist enthalten in:
Gaider10 2021-09-24 11:02:14 +03:00 committet von GitHub
Ursprung 397349e0aa
Commit d0a2193d4a
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -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;