3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-16 04:50:07 +01:00

Only apply door fix when we can actually access the old blockstate (#4827)

Dieser Commit ist enthalten in:
chris 2024-07-06 23:14:15 +02:00 committet von GitHub
Ursprung 74cabed674
Commit cbd59de37b
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194

Datei anzeigen

@ -40,7 +40,7 @@ public class DoorBlock extends Block {
// Needed to check whether we must force the client to update the door state. // Needed to check whether we must force the client to update the door state.
String doubleBlockHalf = state.getValue(Properties.DOUBLE_BLOCK_HALF); String doubleBlockHalf = state.getValue(Properties.DOUBLE_BLOCK_HALF);
if (doubleBlockHalf.equals("lower")) { if (!session.getGeyser().getWorldManager().hasOwnChunkCache() && doubleBlockHalf.equals("lower")) {
BlockState oldBlockState = session.getGeyser().getWorldManager().blockAt(session, position); BlockState oldBlockState = session.getGeyser().getWorldManager().blockAt(session, position);
// If these are the same, it means that we already updated the lower door block (manually in the workaround below), // If these are the same, it means that we already updated the lower door block (manually in the workaround below),
// and we do not need to update the block in the cache/on the client side using the super.updateBlock() method again. // and we do not need to update the block in the cache/on the client side using the super.updateBlock() method again.