Do not perform neighbour updates when using debug stick (Fixes #2134)

CB blindly drops any update flags when recording block modifications,
this causes the debug stick to blindly update neighbouring blocks on usage
in order to control this, we will special case this item, however, this
ideally should be fixed by recording the actual update flags used,
but will induce ABI breaks...

This patch also maintains the behavior of the BlockPlaceEvent, this
behavior will NOT be guaranteed in the future, however.
This commit is contained in:
Shane Freeder
2020-12-22 22:45:10 +00:00
parent a70924789b
commit 7ef05fbd8a
18 changed files with 111 additions and 41 deletions

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Add and implement PlayerRecipeBookClickEvent
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 73e95ca9cb7f83970ff096084a646dd4dcf23db7..c33707d55c80341eaacd6c6a7526444ee5b2cc0a 100644
index 45379bf4903ca8044145504207acd59c221b7f26..c9b834c38f8d7b21d0a7a0d04762f66d41b0c39d 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2602,9 +2602,15 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -2612,9 +2612,15 @@ public class PlayerConnection implements PacketListenerPlayIn {
PlayerConnectionUtils.ensureMainThread(packetplayinautorecipe, this, this.player.getWorldServer());
this.player.resetIdleTimer();
if (!this.player.isSpectator() && this.player.activeContainer.windowId == packetplayinautorecipe.b() && this.player.activeContainer.c(this.player) && this.player.activeContainer instanceof ContainerRecipeBook) {