Keep non-container slots synced when in container view (#12881)

This commit is contained in:
Noah van der Aa
2025-07-26 23:46:30 +02:00
committed by GitHub
parent a57636189a
commit dbc367ba2d
4 changed files with 26 additions and 3 deletions

View File

@@ -216,7 +216,7 @@
this.tickClientLoadTimeout();
this.gameMode.tick();
this.wardenSpawnTracker.tick();
@@ -614,9 +_,14 @@
@@ -614,9 +_,18 @@
this.invulnerableTime--;
}
@@ -226,6 +226,10 @@
+ // Paper start - Configurable container update tick rate
+ if (--this.containerUpdateDelay <= 0) {
+ this.containerMenu.broadcastChanges();
+ // Broadcast equipment and crafting slots when the player is in a container, fixes MC-297508
+ if (this.containerMenu != this.inventoryMenu) {
+ this.inventoryMenu.broadcastNonContainerSlotChanges();
+ }
+ this.containerUpdateDelay = this.level().paperConfig().tickRates.containerUpdate;
+ }
+ // Paper end - Configurable container update tick rate