fix: some bedrock fixes
This commit is contained in:
1 parent
65bfbe89b9
commit
9898896bbb
3 files changed
+180
-122
No files matched your search
+1
-1
Submodule pumpkin-plugin-wit updated: de8e005dee...6e8b554b38.
@@ -287,7 +287,8 @@ impl BedrockClient {
|
|||||||
}
|
}
|
||||||
SResourcePackResponse::STATUS_COMPLETED => {
|
SResourcePackResponse::STATUS_COMPLETED => {
|
||||||
debug!("Bedrock: SResourcePackResponse::STATUS_COMPLETED");
|
debug!("Bedrock: SResourcePackResponse::STATUS_COMPLETED");
|
||||||
if let Some(player) = &*self.player.lock().await {
|
let player = self.player.lock().await.clone();
|
||||||
|
if let Some(player) = player {
|
||||||
player
|
player
|
||||||
.world()
|
.world()
|
||||||
.spawn_bedrock_player(&server.basic_config, player.clone(), server)
|
.spawn_bedrock_player(&server.basic_config, player.clone(), server)
|
||||||
|
|||||||
+177
-120
@@ -4,7 +4,7 @@ use pumpkin_data::attributes::Attributes;
|
|||||||
use pumpkin_data::chunk::Biome;
|
use pumpkin_data::chunk::Biome;
|
||||||
use pumpkin_protocol::bedrock::client::EntityProperties;
|
use pumpkin_protocol::bedrock::client::EntityProperties;
|
||||||
use pumpkin_protocol::bedrock::client::level_event::{CLevelEvent, LevelEvent};
|
use pumpkin_protocol::bedrock::client::level_event::{CLevelEvent, LevelEvent};
|
||||||
use pumpkin_protocol::bedrock::network_item::{ItemInstanceUserData, NetworkItemDescriptor};
|
use pumpkin_protocol::bedrock::network_item::NetworkItemDescriptor;
|
||||||
use pumpkin_protocol::codec::data_component::data_to_proto_sound;
|
use pumpkin_protocol::codec::data_component::data_to_proto_sound;
|
||||||
use pumpkin_world::generation::proto_chunk::GenerationCache;
|
use pumpkin_world::generation::proto_chunk::GenerationCache;
|
||||||
use std::sync::atomic::Ordering::Relaxed;
|
use std::sync::atomic::Ordering::Relaxed;
|
||||||
@@ -1976,16 +1976,28 @@ impl World {
|
|||||||
}],
|
}],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let gamemode = player.gamemode.load();
|
||||||
self.broadcast_packet_except_editioned_sync(
|
self.broadcast_packet_except_editioned_sync(
|
||||||
&[gameprofile.id],
|
&[gameprofile.id],
|
||||||
&CPlayerInfoUpdate::new(
|
&CPlayerInfoUpdate::new(
|
||||||
PlayerInfoFlags::ADD_PLAYER.bits(),
|
(PlayerInfoFlags::ADD_PLAYER
|
||||||
|
| PlayerInfoFlags::UPDATE_GAME_MODE
|
||||||
|
| PlayerInfoFlags::UPDATE_LISTED
|
||||||
|
| PlayerInfoFlags::UPDATE_LATENCY
|
||||||
|
| PlayerInfoFlags::UPDATE_LIST_PRIORITY)
|
||||||
|
.bits(),
|
||||||
&[pumpkin_protocol::java::client::play::Player {
|
&[pumpkin_protocol::java::client::play::Player {
|
||||||
uuid: gameprofile.id,
|
uuid: gameprofile.id,
|
||||||
actions: &[PlayerAction::AddPlayer {
|
actions: &[
|
||||||
name: &gameprofile.name,
|
PlayerAction::AddPlayer {
|
||||||
properties: &gameprofile.properties.load(),
|
name: &gameprofile.name,
|
||||||
}],
|
properties: &gameprofile.properties.load(),
|
||||||
|
},
|
||||||
|
PlayerAction::UpdateGameMode(VarInt(gamemode as i32)),
|
||||||
|
PlayerAction::UpdateListed(true),
|
||||||
|
PlayerAction::UpdateLatency(VarInt(0)),
|
||||||
|
PlayerAction::UpdateListOrder(VarInt(0)),
|
||||||
|
],
|
||||||
}],
|
}],
|
||||||
),
|
),
|
||||||
&bedrock_player_list,
|
&bedrock_player_list,
|
||||||
@@ -2044,8 +2056,27 @@ impl World {
|
|||||||
&bedrock_add_player,
|
&bedrock_add_player,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Broadcast metadata to Java players so they can correctly interact with the new player
|
||||||
|
let config = player.config.load();
|
||||||
|
let mut java_meta_buf = Vec::new();
|
||||||
|
{
|
||||||
|
let meta = Metadata::new(
|
||||||
|
TrackedData::PLAYER_MODE_CUSTOMISATION,
|
||||||
|
MetaDataType::BYTE,
|
||||||
|
config.skin_parts,
|
||||||
|
);
|
||||||
|
meta.write(&mut java_meta_buf, &JavaMinecraftVersion::V_1_21_4)
|
||||||
|
.unwrap();
|
||||||
|
};
|
||||||
|
java_meta_buf.put_u8(255);
|
||||||
|
|
||||||
|
self.broadcast_packet_except_editioned_sync(
|
||||||
|
&[gameprofile.id],
|
||||||
|
&CSetEntityMetadata::new((runtime_id as i32).into(), java_meta_buf.into()),
|
||||||
|
&actor_data,
|
||||||
|
);
|
||||||
|
|
||||||
// 2. Spawn existing players for our new Bedrock client
|
// 2. Spawn existing players for our new Bedrock client
|
||||||
let mut existing_entries = Vec::new();
|
|
||||||
let players = self.players.load();
|
let players = self.players.load();
|
||||||
|
|
||||||
for existing_player in players
|
for existing_player in players
|
||||||
@@ -2057,19 +2088,24 @@ impl World {
|
|||||||
let ex_pos = ex_entity.pos.load();
|
let ex_pos = ex_entity.pos.load();
|
||||||
let ex_vel = ex_entity.velocity.load();
|
let ex_vel = ex_entity.velocity.load();
|
||||||
|
|
||||||
existing_entries.push(PlayerListEntry {
|
let ex_player_list = CPlayerList {
|
||||||
uuid: ex_profile.id,
|
action: CPlayerList::ACTION_ADD,
|
||||||
entity_unique_id: VarLong(existing_player.entity_id() as i64),
|
entries: vec![PlayerListEntry {
|
||||||
username: ex_profile.name.clone(),
|
uuid: ex_profile.id,
|
||||||
xuid: String::new(),
|
entity_unique_id: VarLong(existing_player.entity_id() as i64),
|
||||||
platform_chat_id: String::new(),
|
username: ex_profile.name.clone(),
|
||||||
build_platform: 0,
|
xuid: String::new(),
|
||||||
skin: (**existing_player.bedrock_skin.load()).clone(),
|
platform_chat_id: String::new(),
|
||||||
is_teacher: false,
|
build_platform: 0,
|
||||||
is_host: false,
|
skin: (**existing_player.bedrock_skin.load()).clone(),
|
||||||
is_sub_client: false,
|
is_teacher: false,
|
||||||
player_color: [0, 0, 0, 0],
|
is_host: false,
|
||||||
});
|
is_sub_client: false,
|
||||||
|
player_color: [0, 0, 0, 0],
|
||||||
|
}],
|
||||||
|
};
|
||||||
|
// Send PlayerList FIRST
|
||||||
|
client.send_game_packet(&ex_player_list).await;
|
||||||
|
|
||||||
let ex_add_player = CAddPlayer {
|
let ex_add_player = CAddPlayer {
|
||||||
uuid: ex_profile.id,
|
uuid: ex_profile.id,
|
||||||
@@ -2111,14 +2147,6 @@ impl World {
|
|||||||
client.send_game_packet(&ex_add_player).await;
|
client.send_game_packet(&ex_add_player).await;
|
||||||
}
|
}
|
||||||
|
|
||||||
if !existing_entries.is_empty() {
|
|
||||||
let ex_player_list = CPlayerList {
|
|
||||||
action: CPlayerList::ACTION_ADD,
|
|
||||||
entries: existing_entries,
|
|
||||||
};
|
|
||||||
client.send_game_packet(&ex_player_list).await;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. Trigger Join Event and Broadcast Join Message
|
// 3. Trigger Join Event and Broadcast Join Message
|
||||||
let msg_comp = TextComponent::translate_cross(
|
let msg_comp = TextComponent::translate_cross(
|
||||||
translation::java::MULTIPLAYER_PLAYER_JOINED,
|
translation::java::MULTIPLAYER_PLAYER_JOINED,
|
||||||
@@ -2239,41 +2267,63 @@ impl World {
|
|||||||
player.living_entity.entity.last_pos.store(position);
|
player.living_entity.entity.last_pos.store(position);
|
||||||
|
|
||||||
let gameprofile = &player.gameprofile;
|
let gameprofile = &player.gameprofile;
|
||||||
// Firstly, send an info update to our new player, so they can see their skin
|
let bedrock_player_list = CPlayerList {
|
||||||
// and also send their info to everyone else.
|
action: CPlayerList::ACTION_ADD,
|
||||||
debug!("Broadcasting player info for {}", player.gameprofile.name);
|
entries: vec![PlayerListEntry {
|
||||||
self.broadcast_packet_all(&CPlayerInfoUpdate::new(
|
uuid: gameprofile.id,
|
||||||
|
entity_unique_id: VarLong(entity_id as i64),
|
||||||
|
username: gameprofile.name.clone(),
|
||||||
|
xuid: String::new(),
|
||||||
|
platform_chat_id: String::new(),
|
||||||
|
build_platform: 0,
|
||||||
|
skin: (**player.bedrock_skin.load()).clone(),
|
||||||
|
is_teacher: false,
|
||||||
|
is_host: false,
|
||||||
|
is_sub_client: false,
|
||||||
|
player_color: [0, 0, 0, 0],
|
||||||
|
}],
|
||||||
|
};
|
||||||
|
|
||||||
|
let player_actions = [
|
||||||
|
PlayerAction::AddPlayer {
|
||||||
|
name: &gameprofile.name,
|
||||||
|
properties: &gameprofile.properties.load(),
|
||||||
|
},
|
||||||
|
PlayerAction::UpdateGameMode(VarInt(gamemode as i32)),
|
||||||
|
PlayerAction::UpdateListed(true),
|
||||||
|
PlayerAction::UpdateLatency(VarInt(0)),
|
||||||
|
PlayerAction::UpdateListOrder(VarInt(0)),
|
||||||
|
];
|
||||||
|
let java_player = [pumpkin_protocol::java::client::play::Player {
|
||||||
|
uuid: gameprofile.id,
|
||||||
|
actions: &player_actions,
|
||||||
|
}];
|
||||||
|
let player_info_update = CPlayerInfoUpdate::new(
|
||||||
(PlayerInfoFlags::ADD_PLAYER
|
(PlayerInfoFlags::ADD_PLAYER
|
||||||
| PlayerInfoFlags::UPDATE_GAME_MODE
|
| PlayerInfoFlags::UPDATE_GAME_MODE
|
||||||
| PlayerInfoFlags::UPDATE_LISTED
|
| PlayerInfoFlags::UPDATE_LISTED
|
||||||
| PlayerInfoFlags::UPDATE_LATENCY
|
| PlayerInfoFlags::UPDATE_LATENCY
|
||||||
| PlayerInfoFlags::UPDATE_LIST_PRIORITY)
|
| PlayerInfoFlags::UPDATE_LIST_PRIORITY)
|
||||||
.bits(),
|
.bits(),
|
||||||
&[pumpkin_protocol::java::client::play::Player {
|
&java_player,
|
||||||
uuid: gameprofile.id,
|
);
|
||||||
actions: &[
|
|
||||||
PlayerAction::AddPlayer {
|
self.broadcast_editioned(&player_info_update, &bedrock_player_list)
|
||||||
name: &gameprofile.name,
|
.await;
|
||||||
properties: &gameprofile.properties.load(),
|
|
||||||
},
|
|
||||||
PlayerAction::UpdateGameMode(VarInt(gamemode as i32)),
|
|
||||||
PlayerAction::UpdateListed(true),
|
|
||||||
PlayerAction::UpdateLatency(VarInt(0)),
|
|
||||||
PlayerAction::UpdateListOrder(VarInt(0)),
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
));
|
|
||||||
|
|
||||||
// If the player has a custom tab_list_name, send an update for it
|
// If the player has a custom tab_list_name, send an update for it
|
||||||
if let Some(tab_list_name) = player.get_tab_list_name().await {
|
if let Some(tab_list_name) = player.get_tab_list_name().await {
|
||||||
|
let actions = [PlayerAction::UpdateDisplayName(Some(&tab_list_name))];
|
||||||
|
let java_player = [pumpkin_protocol::java::client::play::Player {
|
||||||
|
uuid: gameprofile.id,
|
||||||
|
actions: &actions,
|
||||||
|
}];
|
||||||
self.broadcast_packet_all(&CPlayerInfoUpdate::new(
|
self.broadcast_packet_all(&CPlayerInfoUpdate::new(
|
||||||
PlayerInfoFlags::UPDATE_DISPLAY_NAME.bits(),
|
PlayerInfoFlags::UPDATE_DISPLAY_NAME.bits(),
|
||||||
&[pumpkin_protocol::java::client::play::Player {
|
&java_player,
|
||||||
uuid: gameprofile.id,
|
|
||||||
actions: &[PlayerAction::UpdateDisplayName(Some(&tab_list_name))],
|
|
||||||
}],
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Here, we send all the infos of players who already joined.
|
// Here, we send all the infos of players who already joined.
|
||||||
let mut players_tab_list_names = Vec::new();
|
let mut players_tab_list_names = Vec::new();
|
||||||
{
|
{
|
||||||
@@ -2304,6 +2354,7 @@ impl World {
|
|||||||
PlayerAction::UpdateListOrder(VarInt(
|
PlayerAction::UpdateListOrder(VarInt(
|
||||||
player.tab_list_order.load(Ordering::Relaxed),
|
player.tab_list_order.load(Ordering::Relaxed),
|
||||||
)),
|
)),
|
||||||
|
PlayerAction::UpdateGameMode(VarInt(player.gamemode.load() as i32)),
|
||||||
];
|
];
|
||||||
|
|
||||||
if base_config.allow_chat_reports {
|
if base_config.allow_chat_reports {
|
||||||
@@ -2327,7 +2378,8 @@ impl World {
|
|||||||
let mut action_flags = PlayerInfoFlags::ADD_PLAYER
|
let mut action_flags = PlayerInfoFlags::ADD_PLAYER
|
||||||
| PlayerInfoFlags::UPDATE_LISTED
|
| PlayerInfoFlags::UPDATE_LISTED
|
||||||
| PlayerInfoFlags::UPDATE_LATENCY
|
| PlayerInfoFlags::UPDATE_LATENCY
|
||||||
| PlayerInfoFlags::UPDATE_LIST_PRIORITY;
|
| PlayerInfoFlags::UPDATE_LIST_PRIORITY
|
||||||
|
| PlayerInfoFlags::UPDATE_GAME_MODE;
|
||||||
if base_config.allow_chat_reports {
|
if base_config.allow_chat_reports {
|
||||||
action_flags |= PlayerInfoFlags::INITIALIZE_CHAT;
|
action_flags |= PlayerInfoFlags::INITIALIZE_CHAT;
|
||||||
}
|
}
|
||||||
@@ -2348,13 +2400,15 @@ impl World {
|
|||||||
// Send tab_list_names for existing players with custom names
|
// Send tab_list_names for existing players with custom names
|
||||||
for (player_id, tab_list_name) in &players_tab_list_names {
|
for (player_id, tab_list_name) in &players_tab_list_names {
|
||||||
if let Some(name) = tab_list_name {
|
if let Some(name) = tab_list_name {
|
||||||
|
let actions = [PlayerAction::UpdateDisplayName(Some(name))];
|
||||||
|
let java_player = [pumpkin_protocol::java::client::play::Player {
|
||||||
|
uuid: *player_id,
|
||||||
|
actions: &actions,
|
||||||
|
}];
|
||||||
client
|
client
|
||||||
.enqueue_packet(&CPlayerInfoUpdate::new(
|
.enqueue_packet(&CPlayerInfoUpdate::new(
|
||||||
PlayerInfoFlags::UPDATE_DISPLAY_NAME.bits(),
|
PlayerInfoFlags::UPDATE_DISPLAY_NAME.bits(),
|
||||||
&[pumpkin_protocol::java::client::play::Player {
|
&java_player,
|
||||||
uuid: *player_id,
|
|
||||||
actions: &[PlayerAction::UpdateDisplayName(Some(name))],
|
|
||||||
}],
|
|
||||||
))
|
))
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
@@ -2373,13 +2427,7 @@ impl World {
|
|||||||
pitch,
|
pitch,
|
||||||
yaw,
|
yaw,
|
||||||
head_yaw: yaw,
|
head_yaw: yaw,
|
||||||
held_item: NetworkItemDescriptor {
|
held_item: NetworkItemDescriptor::default(),
|
||||||
id: VarInt(0),
|
|
||||||
stack_size: 0,
|
|
||||||
aux_value: VarUInt(0),
|
|
||||||
block_runtime_id: VarInt(0),
|
|
||||||
user_data_buffer: ItemInstanceUserData::default(),
|
|
||||||
},
|
|
||||||
game_mode: VarInt(match player.gamemode.load() {
|
game_mode: VarInt(match player.gamemode.load() {
|
||||||
GameMode::Survival => 0,
|
GameMode::Survival => 0,
|
||||||
GameMode::Creative => 1,
|
GameMode::Creative => 1,
|
||||||
@@ -2406,56 +2454,53 @@ impl World {
|
|||||||
build_platform: 0,
|
build_platform: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
let bedrock_player_list = CPlayerList {
|
// Spawn the player for every client.
|
||||||
action: CPlayerList::ACTION_ADD,
|
let spawn_entity = CSpawnEntity::new(
|
||||||
entries: vec![PlayerListEntry {
|
entity_id.into(),
|
||||||
uuid: gameprofile.id,
|
gameprofile.id,
|
||||||
entity_unique_id: VarLong(entity_id as i64),
|
i32::from(EntityType::PLAYER.id).into(),
|
||||||
username: gameprofile.name.clone(),
|
position,
|
||||||
xuid: String::new(),
|
pitch,
|
||||||
platform_chat_id: String::new(),
|
yaw,
|
||||||
build_platform: 0,
|
yaw,
|
||||||
skin: (**player.bedrock_skin.load()).clone(),
|
0.into(),
|
||||||
is_teacher: false,
|
velocity,
|
||||||
|
|
||||||
is_host: false,
|
|
||||||
is_sub_client: false,
|
|
||||||
player_color: [0, 0, 0, 0],
|
|
||||||
}],
|
|
||||||
};
|
|
||||||
|
|
||||||
self.broadcast_packet_except_editioned_sync(
|
|
||||||
&[player.gameprofile.id],
|
|
||||||
&CPlayerInfoUpdate::new(
|
|
||||||
PlayerInfoFlags::ADD_PLAYER.bits(),
|
|
||||||
&[pumpkin_protocol::java::client::play::Player {
|
|
||||||
uuid: gameprofile.id,
|
|
||||||
actions: &[PlayerAction::AddPlayer {
|
|
||||||
name: &gameprofile.name,
|
|
||||||
properties: &gameprofile.properties.load(),
|
|
||||||
}],
|
|
||||||
}],
|
|
||||||
),
|
|
||||||
&bedrock_player_list,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Spawn the player for every client.
|
|
||||||
self.broadcast_packet_except_editioned_sync(
|
self.broadcast_packet_except_editioned_sync(
|
||||||
&[player.gameprofile.id],
|
&[player.gameprofile.id],
|
||||||
&CSpawnEntity::new(
|
&spawn_entity,
|
||||||
entity_id.into(),
|
|
||||||
gameprofile.id,
|
|
||||||
i32::from(EntityType::PLAYER.id).into(),
|
|
||||||
position,
|
|
||||||
pitch,
|
|
||||||
yaw,
|
|
||||||
yaw,
|
|
||||||
0.into(),
|
|
||||||
velocity,
|
|
||||||
),
|
|
||||||
&bedrock_add_player,
|
&bedrock_add_player,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Broadcast metadata to Java players so they can correctly interact with the new player
|
||||||
|
let config = player.config.load();
|
||||||
|
let mut java_meta_buf = Vec::new();
|
||||||
|
{
|
||||||
|
let meta = Metadata::new(
|
||||||
|
TrackedData::PLAYER_MODE_CUSTOMISATION,
|
||||||
|
MetaDataType::BYTE,
|
||||||
|
config.skin_parts,
|
||||||
|
);
|
||||||
|
meta.write(&mut java_meta_buf, &JavaMinecraftVersion::V_1_21_4)
|
||||||
|
.unwrap();
|
||||||
|
};
|
||||||
|
java_meta_buf.put_u8(255);
|
||||||
|
|
||||||
|
self.broadcast_packet_except_editioned_sync(
|
||||||
|
&[gameprofile.id],
|
||||||
|
&CSetEntityMetadata::new((entity_id).into(), java_meta_buf.into()),
|
||||||
|
&CSetActorData {
|
||||||
|
actor_runtime_id: VarULong(entity_id as u64),
|
||||||
|
metadata: player.get_entity().bedrock_metadata(),
|
||||||
|
synced_properties: PropertySyncData {
|
||||||
|
int_properties: HashMap::new(),
|
||||||
|
float_properties: HashMap::new(),
|
||||||
|
},
|
||||||
|
tick: VarULong(0),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
// Spawn players for our client.
|
// Spawn players for our client.
|
||||||
let id = player.gameprofile.id;
|
let id = player.gameprofile.id;
|
||||||
for existing_player in self
|
for existing_player in self
|
||||||
@@ -2481,13 +2526,7 @@ impl World {
|
|||||||
pitch: entity.pitch.load(),
|
pitch: entity.pitch.load(),
|
||||||
yaw: entity.yaw.load(),
|
yaw: entity.yaw.load(),
|
||||||
head_yaw: entity.head_yaw.load(),
|
head_yaw: entity.head_yaw.load(),
|
||||||
held_item: NetworkItemDescriptor {
|
held_item: NetworkItemDescriptor::default(),
|
||||||
id: VarInt(0),
|
|
||||||
stack_size: 0,
|
|
||||||
aux_value: VarUInt(0),
|
|
||||||
block_runtime_id: VarInt(0),
|
|
||||||
user_data_buffer: ItemInstanceUserData::default(),
|
|
||||||
},
|
|
||||||
game_mode: VarInt(match existing_player.gamemode.load() {
|
game_mode: VarInt(match existing_player.gamemode.load() {
|
||||||
GameMode::Survival => 0,
|
GameMode::Survival => 0,
|
||||||
GameMode::Creative => 1,
|
GameMode::Creative => 1,
|
||||||
@@ -2531,18 +2570,35 @@ impl World {
|
|||||||
}],
|
}],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let actions = [
|
||||||
|
PlayerAction::AddPlayer {
|
||||||
|
name: &gameprofile.name,
|
||||||
|
properties: &gameprofile.properties.load(),
|
||||||
|
},
|
||||||
|
PlayerAction::UpdateListed(existing_player.tab_list_listed.load(Ordering::Relaxed)),
|
||||||
|
PlayerAction::UpdateGameMode(VarInt(existing_player.gamemode.load() as i32)),
|
||||||
|
PlayerAction::UpdateLatency(VarInt(
|
||||||
|
existing_player.tab_list_latency.load(Ordering::Relaxed),
|
||||||
|
)),
|
||||||
|
PlayerAction::UpdateListOrder(VarInt(
|
||||||
|
existing_player.tab_list_order.load(Ordering::Relaxed),
|
||||||
|
)),
|
||||||
|
];
|
||||||
|
let java_player = [pumpkin_protocol::java::client::play::Player {
|
||||||
|
uuid: gameprofile.id,
|
||||||
|
actions: &actions,
|
||||||
|
}];
|
||||||
player
|
player
|
||||||
.client
|
.client
|
||||||
.enqueue_packet_editioned(
|
.enqueue_packet_editioned(
|
||||||
&CPlayerInfoUpdate::new(
|
&CPlayerInfoUpdate::new(
|
||||||
PlayerInfoFlags::ADD_PLAYER.bits(),
|
(PlayerInfoFlags::ADD_PLAYER
|
||||||
&[pumpkin_protocol::java::client::play::Player {
|
| PlayerInfoFlags::UPDATE_LISTED
|
||||||
uuid: gameprofile.id,
|
| PlayerInfoFlags::UPDATE_GAME_MODE
|
||||||
actions: &[PlayerAction::AddPlayer {
|
| PlayerInfoFlags::UPDATE_LATENCY
|
||||||
name: &gameprofile.name,
|
| PlayerInfoFlags::UPDATE_LIST_PRIORITY)
|
||||||
properties: &gameprofile.properties.load(),
|
.bits(),
|
||||||
}],
|
&java_player,
|
||||||
}],
|
|
||||||
),
|
),
|
||||||
&bedrock_player_list,
|
&bedrock_player_list,
|
||||||
)
|
)
|
||||||
@@ -2565,6 +2621,7 @@ impl World {
|
|||||||
&bedrock_add_player,
|
&bedrock_add_player,
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
{
|
{
|
||||||
let config = existing_player.config.load();
|
let config = existing_player.config.load();
|
||||||
let mut buf = Vec::new();
|
let mut buf = Vec::new();
|
||||||
|
|||||||
Reference in new issue
Block a user