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

23 lines
943 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/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 07808a111047934d8ca10c45b7e702f7a7115788..a9a409eebabae11ab84cf9bcced1f9a030b4a479 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -990,6 +990,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;
}