2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
|
|
Date: Wed, 9 Oct 2019 21:51:43 -0500
|
|
|
|
Subject: [PATCH] Fix stuck in sneak when changing worlds (MC-10657)
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
2021-10-05 05:14:11 +02:00
|
|
|
index a055419b381a1e244d9d88208f0fcf2e5ba6b379..3e3582742792858c2b8328676faed68ddb6da674 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
2021-09-25 21:06:37 +02:00
|
|
|
@@ -1097,6 +1097,8 @@ public class ServerPlayer extends Player {
|
2021-06-11 14:02:28 +02:00
|
|
|
this.lastSentHealth = -1.0F;
|
|
|
|
this.lastSentFood = -1;
|
|
|
|
|
2021-06-13 21:29:58 +02:00
|
|
|
+ setShiftKeyDown(false); // Paper - fix MC-10657
|
2021-06-11 14:02:28 +02:00
|
|
|
+
|
|
|
|
// CraftBukkit start
|
|
|
|
PlayerChangedWorldEvent changeEvent = new PlayerChangedWorldEvent(this.getBukkitEntity(), worldserver1.getWorld());
|
|
|
|
this.level.getCraftServer().getPluginManager().callEvent(changeEvent);
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
2021-10-17 18:57:00 +02:00
|
|
|
index f01a416cbb0a7d786e5033d2a3b25cb7048c232b..a2eb7689eafe20db59357ab3fad0e59cdef3481a 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
2021-10-17 18:57:00 +02:00
|
|
|
@@ -829,6 +829,8 @@ public abstract class PlayerList {
|
2021-06-11 14:02:28 +02:00
|
|
|
entityplayer.connection.send(new ClientboundUpdateMobEffectPacket(entityplayer.getId(), mobEffect));
|
|
|
|
}
|
|
|
|
|
|
|
|
+ entityplayer.setShiftKeyDown(false); // Paper - fix MC-10657
|
|
|
|
+
|
|
|
|
// Fire advancement trigger
|
|
|
|
entityplayer.triggerDimensionChangeTriggers(((CraftWorld) fromWorld).getHandle());
|
|
|
|
|