2020-05-06 11:48:49 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2020-04-19 12:26:07 +02:00
|
|
|
From: Mariell Hoversholm <proximyst@proximyst.com>
|
|
|
|
Date: Sun, 19 Apr 2020 12:25:20 +0200
|
|
|
|
Subject: [PATCH] Allow sleeping players to float
|
|
|
|
|
|
|
|
This change lets players who are in their bed have a position which is above
|
|
|
|
ground for a longer period of time. This is because of the server not setting
|
|
|
|
their position to the ground/exit location when entering the bed, resulting in
|
|
|
|
the server believing they're still in the air.
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
2020-06-02 05:15:47 +02:00
|
|
|
index cf274bcfdc5aeea780eae96df36816c2c5a1f4d9..91d078b6388eaf869afa0e602f73eb194b2e99a5 100644
|
2020-04-19 12:26:07 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
2020-05-07 01:30:47 +02:00
|
|
|
@@ -160,7 +160,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
2020-04-19 12:26:07 +02:00
|
|
|
this.player.setLocation(this.l, this.m, this.n, this.player.yaw, this.player.pitch);
|
|
|
|
++this.e;
|
|
|
|
this.processedMovePackets = this.receivedMovePackets;
|
|
|
|
- if (this.B) {
|
|
|
|
+ if (this.B && !this.player.isSleeping()) { // Paper - #3176 Allow sleeping players to float
|
|
|
|
if (++this.C > 80) {
|
|
|
|
PlayerConnection.LOGGER.warn("{} was kicked for floating too long!", this.player.getDisplayName().getString());
|
|
|
|
this.disconnect(com.destroystokyo.paper.PaperConfig.flyingKickPlayerMessage); // Paper - use configurable kick message
|