mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-02 17:01:38 +01:00
058d7c1aa3
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 13eb4146 SPIGOT-5217, SPIGOT-6183: Add RespawnReason to PlayerRespawnEvent CraftBukkit Changes: 5ee3419b7 SPIGOT-5217, SPIGOT-6183: Add RespawnReason to PlayerRespawnEvent Spigot Changes: 514cf03a Rebuild patches and add RespawnReason.PLUGIN to Player#respawn
23 lines
1.3 KiB
Diff
23 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Nassim Jahnke <nassim@njahnke.dev>
|
|
Date: Wed, 8 Jun 2022 10:52:18 +0200
|
|
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 454fb5def57fa2fbc62f530020d579d4ef0efc15..6289d1f681366ddbe2c83b08b76a76dbafcc29ea 100644
|
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
@@ -1812,6 +1812,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
|
if (itemstack.isItemEnabled(worldserver.enabledFeatures())) {
|
|
BlockHitResult movingobjectpositionblock = packet.getHitResult();
|
|
Vec3 vec3d = movingobjectpositionblock.getLocation();
|
|
+ // Paper start - improve distance check
|
|
+ if (!Double.isFinite(vec3d.x) || !Double.isFinite(vec3d.y) || !Double.isFinite(vec3d.z)) {
|
|
+ return;
|
|
+ }
|
|
+ // Paper end
|
|
BlockPos blockposition = movingobjectpositionblock.getBlockPos();
|
|
Vec3 vec3d1 = Vec3.atCenterOf(blockposition);
|
|
|