Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-20 06:50:09 +01:00
Fix more issues of chunks not appearing
Dieser Commit ist enthalten in:
Ursprung
e42c2d8ed5
Commit
e50226132f
@ -180,7 +180,7 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource {
|
||||
|
||||
private final AdvancementsCache advancementsCache;
|
||||
private final BookEditCache bookEditCache;
|
||||
private @org.checkerframework.checker.nullness.qual.NonNull final ChunkCache chunkCache;
|
||||
private final ChunkCache chunkCache;
|
||||
private final EntityCache entityCache;
|
||||
private final EntityEffectCache effectCache;
|
||||
private final FormCache formCache;
|
||||
@ -1410,10 +1410,6 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource {
|
||||
}
|
||||
|
||||
public void setServerRenderDistance(int renderDistance) {
|
||||
// +1 is for Fabric and Spigot
|
||||
// Without the client misses loading some chunks per https://github.com/GeyserMC/Geyser/issues/3490
|
||||
// Fog still appears essentially normally
|
||||
renderDistance = renderDistance + 1;
|
||||
this.serverRenderDistance = renderDistance;
|
||||
|
||||
ChunkRadiusUpdatedPacket chunkRadiusUpdatedPacket = new ChunkRadiusUpdatedPacket();
|
||||
@ -1425,11 +1421,13 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource {
|
||||
return this.upstream.getAddress();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean sendForm(@NonNull Form form) {
|
||||
formCache.showForm(form);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean sendForm(@NonNull FormBuilder<?, ?, ?> formBuilder) {
|
||||
formCache.showForm(formBuilder.build());
|
||||
return true;
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
package org.geysermc.geyser.util;
|
||||
|
||||
import com.nukkitx.math.GenericMath;
|
||||
import com.nukkitx.math.vector.Vector2i;
|
||||
import com.nukkitx.math.vector.Vector3i;
|
||||
import com.nukkitx.protocol.bedrock.packet.LevelChunkPacket;
|
||||
@ -91,7 +92,9 @@ public class ChunkUtils {
|
||||
if (chunkPos == null || !chunkPos.equals(newChunkPos)) {
|
||||
NetworkChunkPublisherUpdatePacket chunkPublisherUpdatePacket = new NetworkChunkPublisherUpdatePacket();
|
||||
chunkPublisherUpdatePacket.setPosition(position);
|
||||
chunkPublisherUpdatePacket.setRadius(session.getServerRenderDistance() << 4);
|
||||
// Mitigates chunks not loading on 1.17.1 Paper and 1.19.3 Fabric. As of Bedrock 1.19.60.
|
||||
// https://github.com/GeyserMC/Geyser/issues/3490
|
||||
chunkPublisherUpdatePacket.setRadius(GenericMath.ceil((session.getServerRenderDistance() + 1) * MathUtils.SQRT_OF_TWO) << 4);
|
||||
session.sendUpstreamPacket(chunkPublisherUpdatePacket);
|
||||
|
||||
session.setLastChunkPosition(newChunkPos);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren