From 48d72eb4396587c54fa3410f4983ddc1398a255f Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Fri, 3 Sep 2021 19:57:21 +0200 Subject: [PATCH] Remove "Auto fix bad Y levels on player login" patch Fixes #6357 Closes #6508 Closes #6358 --- ...uto-fix-bad-Y-levels-on-player-login.patch | 19 ------------------- ...t-allow-digging-into-unloaded-chunks.patch | 2 +- 2 files changed, 1 insertion(+), 20 deletions(-) delete mode 100644 patches/server/Auto-fix-bad-Y-levels-on-player-login.patch diff --git a/patches/server/Auto-fix-bad-Y-levels-on-player-login.patch b/patches/server/Auto-fix-bad-Y-levels-on-player-login.patch deleted file mode 100644 index bc4c50ecb1..0000000000 --- a/patches/server/Auto-fix-bad-Y-levels-on-player-login.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Wed, 21 Sep 2016 23:48:39 -0400 -Subject: [PATCH] Auto fix bad Y levels on player login - -Bring down to a saner Y level if super high, as this can cause the server to crash - -diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/level/ServerPlayer.java -+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -0,0 +0,0 @@ public class ServerPlayer extends Player { - @Override - public void readAdditionalSaveData(CompoundTag nbt) { - super.readAdditionalSaveData(nbt); -+ if (this.getY() > 300) this.setPosRaw(getX(), 257, getZ()); // Paper - bring down to a saner Y level if out of world - if (nbt.contains("enteredNetherPosition", 10)) { - CompoundTag nbttagcompound1 = nbt.getCompound("enteredNetherPosition"); - diff --git a/patches/server/Don-t-allow-digging-into-unloaded-chunks.patch b/patches/server/Don-t-allow-digging-into-unloaded-chunks.patch index edab5c8e75..a19aadc74b 100644 --- a/patches/server/Don-t-allow-digging-into-unloaded-chunks.patch +++ b/patches/server/Don-t-allow-digging-into-unloaded-chunks.patch @@ -38,7 +38,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 double d3 = d0 * d0 + d1 * d1 + d2 * d2; if (d3 > 36.0D) { -+ if (d3 < 80 * 80) // Paper - Don't notify if unreasonably far away ++ if (true) return; // Paper - Don't notify if unreasonably far away this.player.connection.send(new ClientboundBlockBreakAckPacket(pos, this.level.getBlockState(pos), action, false, "too far")); } else if (pos.getY() >= worldHeight) { this.player.connection.send(new ClientboundBlockBreakAckPacket(pos, this.level.getBlockState(pos), action, false, "too high"));