3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-26 00:00:41 +01:00

Small, inconsequential changes

Dieser Commit ist enthalten in:
Camotoy 2021-02-21 18:17:31 -05:00
Ursprung e2df486eac
Commit 2974afdce0
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7EEFB66FE798081F

Datei anzeigen

@ -37,6 +37,7 @@ import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
import org.geysermc.connector.network.session.GeyserSession; import org.geysermc.connector.network.session.GeyserSession;
import org.geysermc.connector.network.session.cache.ChunkCache; import org.geysermc.connector.network.session.cache.ChunkCache;
import org.geysermc.connector.network.translators.inventory.translators.LecternInventoryTranslator; import org.geysermc.connector.network.translators.inventory.translators.LecternInventoryTranslator;
import org.geysermc.connector.network.translators.world.block.BlockTranslator;
import org.geysermc.connector.utils.GameRule; import org.geysermc.connector.utils.GameRule;
public class GeyserWorldManager extends WorldManager { public class GeyserWorldManager extends WorldManager {
@ -49,7 +50,7 @@ public class GeyserWorldManager extends WorldManager {
if (chunkCache != null) { // Chunk cache can be null if the session is closed asynchronously if (chunkCache != null) { // Chunk cache can be null if the session is closed asynchronously
return chunkCache.getBlockAt(x, y, z); return chunkCache.getBlockAt(x, y, z);
} }
return 0; return BlockTranslator.JAVA_AIR_ID;
} }
@Override @Override
@ -105,7 +106,7 @@ public class GeyserWorldManager extends WorldManager {
.putString("text", "") .putString("text", "")
.build()) .build())
.build()); .build());
lecternTag.putInt("page", -1); // I'm surprisingly glad this exists - it forces Bedrock to stop reading immediately lecternTag.putInt("page", -1); // I'm surprisingly glad this exists - it forces Bedrock to stop reading immediately. Usually.
return lecternTag.build(); return lecternTag.build();
} }