mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Remove "Auto fix bad Y levels on player login" patch
Fixes #6357 Closes #6508 Closes #6358
This commit is contained in:
parent
4433d23cc1
commit
48d72eb439
2 changed files with 1 additions and 20 deletions
|
@ -1,19 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
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");
|
||||
|
|
@ -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"));
|
||||
|
|
Loading…
Reference in a new issue