2020-05-06 11:48:49 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2019-11-24 07:02:47 +01:00
|
|
|
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/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
2020-06-27 06:57:36 +02:00
|
|
|
index 35aca074e4a0e1202441536f6b21f3731c490cc6..b33041765051f519807081607d2a8f1c75bb1fe7 100644
|
2019-11-24 07:02:47 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
2020-06-27 06:57:36 +02:00
|
|
|
@@ -1018,6 +1018,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
2019-11-24 07:02:47 +01:00
|
|
|
this.lastHealthSent = -1.0F;
|
|
|
|
this.lastFoodSent = -1;
|
|
|
|
|
|
|
|
+ setSneaking(false); // Paper - fix MC-10657
|
|
|
|
+
|
|
|
|
// CraftBukkit start
|
|
|
|
PlayerChangedWorldEvent changeEvent = new PlayerChangedWorldEvent(this.getBukkitEntity(), worldserver.getWorld());
|
|
|
|
this.world.getServer().getPluginManager().callEvent(changeEvent);
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
2020-06-27 07:12:11 +02:00
|
|
|
index 47ec41f114aa09a50f8876d11da7db981e2be2f2..9e635fa562264ee9454adb6dd7fc47f45d8b3242 100644
|
2019-11-24 07:02:47 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
2020-06-27 07:12:11 +02:00
|
|
|
@@ -761,6 +761,8 @@ public abstract class PlayerList {
|
2019-11-24 07:02:47 +01:00
|
|
|
entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityEffect(entityplayer.getId(), mobEffect));
|
|
|
|
}
|
|
|
|
|
|
|
|
+ entityplayer.setSneaking(false); // Paper - fix MC-10657
|
|
|
|
+
|
|
|
|
// Fire advancement trigger
|
2019-12-12 17:20:43 +01:00
|
|
|
entityplayer.triggerDimensionAdvancements(((CraftWorld) fromWorld).getHandle());
|
2019-11-24 07:02:47 +01:00
|
|
|
|