Skip to content

Commit c47264d

Browse files
committed
Fix: Lecterns locking up container opening
closes #5456
1 parent c6101d7 commit c47264d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/src/main/java/org/geysermc/geyser/translator/inventory/LecternInventoryTranslator.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ public void closeInventory(GeyserSession session, Inventory inventory) {
9494
var baseLecternTag = LecternUtils.getBaseLecternTag(position.getX(), position.getY(), position.getZ(), 0);
9595
BlockEntityUtils.updateBlockEntity(session, baseLecternTag.build(), position);
9696

97+
// Closing lecterns isn't followed up by a ContainerClosePacket, so this wouldn't ever be reset.
98+
session.setPendingOrCurrentBedrockInventoryId(-1);
99+
97100
super.closeInventory(session, inventory); // Removes the fake blocks if need be
98101

99102
// Now: Restore the lectern, if it actually exists

0 commit comments

Comments
 (0)