Paper/Spigot-Server-Patches/0664-Reset-shield-blocking-on-dimension-change.patch

23 lines
969 B
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Yive <admin@yive.me>
Date: Sun, 24 Jan 2021 08:55:19 -0800
Subject: [PATCH] Reset shield blocking on dimension change
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
2021-03-16 17:37:33 +01:00
index 9522a4a2060fc8b1bda53f72414810ac09915275..37c9b5fd712e30a9a0faccc840f738f4b2cfc723 100644
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
2021-03-16 17:37:33 +01:00
@@ -1117,6 +1117,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.world.getServer().getPluginManager().callEvent(changeEvent);
// CraftBukkit end
}
+ // Paper start
+ if (this.isBlocking()) {
+ this.clearActiveItem();
+ }
+ // Paper end
return this;
}