mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Merge branch 'master' of https://github.com/GeyserMC/Geyser into crash-fix
# Conflicts: # connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java
This commit is contained in:
parent
fec817a36f
commit
def12b0b8d
1 changed files with 33 additions and 0 deletions
|
|
@ -0,0 +1,33 @@
|
||||||
|
package org.geysermc.connector.utils;
|
||||||
|
|
||||||
|
import com.github.steveice10.mc.protocol.data.game.chunk.Chunk;
|
||||||
|
import com.github.steveice10.mc.protocol.data.game.chunk.Column;
|
||||||
|
import lombok.AccessLevel;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public class Chunks {
|
||||||
|
|
||||||
|
public ChunkData getData(Column c) {
|
||||||
|
Objects.requireNonNull(c);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
|
for(Chunk chunk : c.getChunks()) {
|
||||||
|
if(chunk != null) {
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@AllArgsConstructor(access = AccessLevel.PACKAGE)
|
||||||
|
public static final class ChunkData {
|
||||||
|
public final int count;
|
||||||
|
|
||||||
|
public final byte[] bytes;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue