testserver/Spigot-Server-Patches/0666-Reset-shield-blocking-...

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
index a2971272602f5c2556ccb46042926617138a1d55..667bb0288324f8be79b6a5e4c22c784fdeae4327 100644
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
@@ -1114,6 +1114,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;
}