mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Properly translate player entity UUID for vaults
This commit is contained in:
parent
851ed36244
commit
6025931c7d
1 changed files with 7 additions and 3 deletions
|
@ -76,11 +76,15 @@ public class VaultBlockEntityTranslator extends BlockEntityTranslator {
|
||||||
LongList bedrockPlayers = new LongArrayList(connectedPlayers.size());
|
LongList bedrockPlayers = new LongArrayList(connectedPlayers.size());
|
||||||
for (int[] player : connectedPlayers) {
|
for (int[] player : connectedPlayers) {
|
||||||
UUID uuid = uuidFromIntArray(player);
|
UUID uuid = uuidFromIntArray(player);
|
||||||
|
if (uuid.equals(session.getPlayerEntity().getUuid())) {
|
||||||
|
bedrockPlayers.add(session.getPlayerEntity().getGeyserId());
|
||||||
|
} else {
|
||||||
PlayerEntity playerEntity = session.getEntityCache().getPlayerEntity(uuid);
|
PlayerEntity playerEntity = session.getEntityCache().getPlayerEntity(uuid);
|
||||||
if (playerEntity != null) {
|
if (playerEntity != null) {
|
||||||
bedrockPlayers.add(playerEntity.getGeyserId());
|
bedrockPlayers.add(playerEntity.getGeyserId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
bedrockNbt.putList("connected_players", NbtType.LONG, bedrockPlayers);
|
bedrockNbt.putList("connected_players", NbtType.LONG, bedrockPlayers);
|
||||||
|
|
||||||
// Fill this in, since as of Java 1.21, Bedrock always seems to include it, but Java assumes the default
|
// Fill this in, since as of Java 1.21, Bedrock always seems to include it, but Java assumes the default
|
||||||
|
|
Loading…
Reference in a new issue