Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 16:12:46 +01:00
Fix: Lecterns not opening when there is no lectern cache (#4476)
... the LecternCache doesn't always exist. Oops.
Dieser Commit ist enthalten in:
Ursprung
123990a795
Commit
79154f3d0c
@ -285,7 +285,7 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource {
|
||||
* See {@link WorldManager#sendLecternData(GeyserSession, int, int, int)}
|
||||
* for more information.
|
||||
*/
|
||||
private final Set<Vector3i> lecternCache;
|
||||
private final @Nullable Set<Vector3i> lecternCache;
|
||||
|
||||
/**
|
||||
* A list of all players that have a player head on with a custom texture.
|
||||
|
@ -193,9 +193,11 @@ public class LecternInventoryTranslator extends AbstractBlockInventoryTranslator
|
||||
lecternContainer.setPosition(position);
|
||||
|
||||
BlockEntityUtils.updateBlockEntity(session, blockEntityTag, position);
|
||||
session.getLecternCache().add(position);
|
||||
|
||||
if (shouldRefresh) {
|
||||
// the lectern cache doesn't always exist; only when we must refresh
|
||||
session.getLecternCache().add(position);
|
||||
|
||||
// Close the window - we will reopen it once the client has this data synced
|
||||
ServerboundContainerClosePacket closeWindowPacket = new ServerboundContainerClosePacket(lecternContainer.getJavaId());
|
||||
session.sendDownstreamGamePacket(closeWindowPacket);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren