Remove "Auto fix bad Y levels on player login" patch

Fixes #6357
Closes #6508
Closes #6358
This commit is contained in:
Nassim Jahnke 2021-09-03 19:57:21 +02:00
parent 5c7da5536b
commit cc6fd371b2
No known key found for this signature in database
GPG key ID: 6BE3B555EBC5982B
696 changed files with 106 additions and 125 deletions

View file

@ -1,22 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Wed, 21 Apr 2021 15:58:19 -0700
Subject: [PATCH] Added PlayerDeepSleepEvent
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 3ea6ec6cd8a081fd427319bb01ea23e4670e8507..503c4e296d6f59c6480f6fb9ff5fed47b25d6102 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -247,6 +247,11 @@ public abstract class Player extends LivingEntity {
if (this.isSleeping()) {
++this.sleepCounter;
+ // Paper start
+ if (this.sleepCounter == 100) {
+ if (!new io.papermc.paper.event.player.PlayerDeepSleepEvent((org.bukkit.entity.Player) getBukkitEntity()).callEvent()) { this.sleepCounter = Integer.MIN_VALUE; }
+ }
+ // Paper end
if (this.sleepCounter > 100) {
this.sleepCounter = 100;
}