testserver/patches/server/0606-Reset-shield-blocking-...

23 lines
946 B
Diff
Raw Normal View History

2021-06-11 12:02:28 +00:00
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/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
2021-06-15 05:38:36 +00:00
index 4d29671e38876bc6b8a2b80fa6e6f5d4200f0e9e..76e179089a419d4dae6bc64ef0122d03bcdd26e5 100644
2021-06-11 12:02:28 +00:00
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
2021-06-15 02:59:31 +00:00
@@ -1139,6 +1139,11 @@ public class ServerPlayer extends Player {
2021-06-11 12:02:28 +00:00
this.level.getCraftServer().getPluginManager().callEvent(changeEvent);
// CraftBukkit end
}
+ // Paper start
+ if (this.isBlocking()) {
+ this.stopUsingItem();
+ }
+ // Paper end
return this;
}