pub fn add_player_without_holder(world: &mut World) -> Player {
    let (ns1, nr1) = futures::channel::mpsc::unbounded();
    let (ns2, nr2) = crossbeam::unbounded();
    let entity = world
        .create_entity()
        .with(NetworkComponent::new(ns1, nr2))
        .with(PlayerComponent {
            gamemode: Gamemode::Creative,
            profile_properties: vec![],
        })
        .with(PositionComponent {
            current: position!(0.0, 0.0, 0.0),
            previous: position!(0.0, 0.0, 0.0),
        })
        .with(NamedComponent {
            display_name: "".to_string(),
            uuid: Uuid::new_v4(),
        })
        .with(InventoryComponent::default())
        .with(Metadata::Player(metadata::Player::default()))
        .with(LastKnownPositionComponent::default())
        .with(PacketCreatorComponent(&player::create_packet))
        .build();

    Player {
        entity,
        network_sender: ns2,
        network_receiver: RefCell::new(nr1),
    }
}
/// Adds a player to the world without adding the `ChunkHolders`
/// and `ChunkEntities` entries.
Adds a player to the world without adding the `ChunkHolders`
and `ChunkEntities` entries.
Adds a player to the world without adding the ` ChunkHolders ` and ` ChunkEntities ` entries .
pub fn add_player_without_holder(world: &mut World) -> Player {
    let (ns1, nr1) = futures::channel::mpsc::unbounded();
    let (ns2, nr2) = crossbeam::unbounded();
    let entity = world
        .create_entity()
        .with(NetworkComponent::new(ns1, nr2))
        .with(PlayerComponent {
            gamemode: Gamemode::Creative,
            profile_properties: vec![],
        })
        .with(PositionComponent {
            current: position!(0.0, 0.0, 0.0),
            previous: position!(0.0, 0.0, 0.0),
        })
        .with(NamedComponent {
            display_name: "".to_string(),
            uuid: Uuid::new_v4(),
        })
        .with(InventoryComponent::default())
        .with(Metadata::Player(metadata::Player::default()))
        .with(LastKnownPositionComponent::default())
        .with(PacketCreatorComponent(&player::create_packet))
        .build();
    Player {
        entity,
        network_sender: ns2,
        network_receiver: RefCell::new(nr1),
    }
}
pub fn add_player_without_holder ( world : & mut World ) -> Player { let ( ns1 , nr1 ) = futures :: channel :: mpsc :: unbounded ( ) ; let ( ns2 , nr2 ) = crossbeam :: unbounded ( ) ; let entity = world . create_entity ( ) . with ( NetworkComponent :: new ( ns1 , nr2 ) ) . with ( PlayerComponent { gamemode : Gamemode :: Creative , profile_properties : vec ! [ ] , } ) . with ( PositionComponent { current : position ! ( 0.0 0.0 0.0 ) , previous : position ! ( 0.0 0.0 0.0 ) , } ) . with ( NamedComponent { display_name : " " . to_string ( ) , uuid : Uuid :: new_v4 ( ) , } ) . with ( InventoryComponent :: default ( ) ) . with ( Metadata :: Player ( metadata :: Player :: default ( ) ) ) . with ( LastKnownPositionComponent :: default ( ) ) . with ( PacketCreatorComponent ( & player :: create_packet ) ) . build ( ) ; Player { entity , network_sender : ns2 , network_receiver : RefCell :: new ( nr1 ) , } }
Adds a player to the world without adding the `ChunkHolders`
and `ChunkEntities` entries.
Adds a player to the world without adding the ` ChunkHolders ` and ` ChunkEntities ` entries .
world
&mut World
world
&mut World