mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 11:42:55 +01:00
22 lines
969 B
Diff
22 lines
969 B
Diff
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 c0446ed3c7cc24fae2880dfba71228f5edee66d6..3f44d5b8e3bc4f897a5dda473532004078fe0ebe 100644
|
|
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
|
@@ -1118,6 +1118,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;
|
|
}
|