2929import org .cloudburstmc .nbt .NbtMap ;
3030import org .cloudburstmc .nbt .NbtMapBuilder ;
3131import org .cloudburstmc .nbt .NbtType ;
32- import org .geysermc .geyser .level .WorldManager ;
3332import org .geysermc .geyser .level .block .property .Properties ;
3433import org .geysermc .geyser .session .GeyserSession ;
3534import org .geysermc .geyser .translator .level .block .entity .BedrockChunkWantsBlockEntityTag ;
@@ -50,13 +49,9 @@ public NbtMap createTag(GeyserSession session, Vector3i position, BlockState blo
5049
5150 @ Override
5251 public void updateBlock (GeyserSession session , BlockState state , Vector3i position ) {
53- WorldManager worldManager = session .getGeyser ().getWorldManager ();
54- boolean currentHasBook = state .getValue (Properties .HAS_BOOK );
55- Boolean previousHasBook = worldManager .blockAt (session , position ).getValueNullable (Properties .HAS_BOOK ); // Can be null if not a lectern, watch out
56- if (previousHasBook == null || currentHasBook != previousHasBook ) {
57- BlockEntityUtils .updateBlockEntity (session , getBaseLecternTag (position , currentHasBook ), position );
58- }
5952 super .updateBlock (session , state , position );
53+ boolean hasBook = state .getValue (Properties .HAS_BOOK );
54+ BlockEntityUtils .updateBlockEntity (session , getBaseLecternTag (position , hasBook ), position );
6055 }
6156
6257 public static NbtMap getBaseLecternTag (Vector3i position , boolean hasBook ) {
0 commit comments