Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-25 15:50:14 +01:00
Better estimate for new biome data size
Dieser Commit ist enthalten in:
Ursprung
3b55826d70
Commit
db1563aa79
@ -82,7 +82,7 @@ public class JavaChunkDataTranslator extends PacketTranslator<ServerChunkDataPac
|
||||
size += (section != null ? section : session.getBlockMappings().getEmptyChunkSection()).estimateNetworkSize();
|
||||
}
|
||||
if (NEW_BIOME_WRITE) {
|
||||
size += session.getBlockMappings().getEmptyChunkSection().estimateNetworkSize() * 32;
|
||||
size += ChunkUtils.EMPTY_CHUNK_DATA.length; // Consists only of biome data
|
||||
} else {
|
||||
size += 256; // Biomes pre-1.18
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ public class ChunkUtils {
|
||||
private static final int MAXIMUM_ACCEPTED_HEIGHT = 256;
|
||||
private static final int MAXIMUM_ACCEPTED_HEIGHT_OVERWORLD = GeyserConnector.getInstance().getConfig().isExtendedWorldHeight() ? 384 : MAXIMUM_ACCEPTED_HEIGHT;
|
||||
|
||||
private static final byte[] EMPTY_CHUNK_DATA;
|
||||
public static final byte[] EMPTY_CHUNK_DATA;
|
||||
public static final byte[] EMPTY_BIOME_DATA;
|
||||
|
||||
static {
|
||||
@ -105,6 +105,7 @@ public class ChunkUtils {
|
||||
|
||||
EMPTY_CHUNK_DATA = new byte[byteBuf.readableBytes()];
|
||||
byteBuf.readBytes(EMPTY_CHUNK_DATA);
|
||||
System.out.println(EMPTY_CHUNK_DATA.length);
|
||||
} finally {
|
||||
byteBuf.release();
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren