pub fn new(mut threadsize: usize) -> Core {
        if threadsize <= 0 {
            threadsize = num_cpus::get_physical();

            Core::static_log("Thread size cannot be 0 or less. Using default (# CPU Cores).");
        }

        Core::static_log(&format!(
            "Initializing the core with '{}' threads...",
            threadsize
        ));

        let players: PlayerList = Arc::new(CHashMap::new());

        (*players).insert(0, Box::new(Console::new()));

        let worlds: WorldList = Arc::new(CHashMap::new());

        /*(*worlds).insert(
            String::from("main"),
            World::new(
                String::from("main"),
                Box::new(MemoryMap::new(Vec3D::new(64, 16, 64))),
            ),
        );*/
        // Load main map from maps/main.lvl (MCSharp/MCLawl Format).
        (*worlds).insert(
            String::from("main"),
            World::new(
                String::from("main"),
                Box::new(MCSharpMap::try_new("main").unwrap()),
            ),
        );

        Core::static_log("Core has ben set up, waiting for network.");

        Core {
            threadsize,

            players,
            worlds,

            tx: None,
            rx: None,
        }
    }
/// Creates a new rcclassic Core with number of threads to handle player connections.
/// 'threadsize' can be left 0 to use the the physical core count.
Creates a new rcclassic Core with number of threads to handle player connections.
'threadsize' can be left 0 to use the the physical core count.
Creates a new rcclassic Core with number of threads to handle player connections . ' threadsize ' can be left 0 to use the the physical core count .
pub fn new(mut threadsize: usize) -> Core {
        if threadsize <= 0 {
            threadsize = num_cpus::get_physical();
            Core::static_log("Thread size cannot be 0 or less. Using default (# CPU Cores).");
        }
        Core::static_log(&format!(
            "Initializing the core with '{}' threads...",
            threadsize
        ));
        let players: PlayerList = Arc::new(CHashMap::new());
        (*players).insert(0, Box::new(Console::new()));
        let worlds: WorldList = Arc::new(CHashMap::new());
        /*(*worlds).insert(
            String::from("main"),
            World::new(
                String::from("main"),
                Box::new(MemoryMap::new(Vec3D::new(64, 16, 64))),
            ),
        );*/
        // Load main map from maps/main.lvl (MCSharp/MCLawl Format).
        (*worlds).insert(
            String::from("main"),
            World::new(
                String::from("main"),
                Box::new(MCSharpMap::try_new("main").unwrap()),
            ),
        );
        Core::static_log("Core has ben set up, waiting for network.");
        Core {
            threadsize,
            players,
            worlds,
            tx: None,
            rx: None,
        }
    }
pub fn new ( mut threadsize : usize ) -> Core { if threadsize <= 0 { threadsize = num_cpus :: get_physical ( ) ; Core :: static_log ( " " ) ; } Core :: static_log ( & format ! ( " " threadsize ) ) ; let players : PlayerList = Arc :: new ( CHashMap :: new ( ) ) ; ( * players ) . insert ( 0 , Box :: new ( Console :: new ( ) ) ) ; let worlds : WorldList = Arc :: new ( CHashMap :: new ( ) ) ; /*(*worlds).insert(
            String::from("main"),
            World::new(
                String::from("main"),
                Box::new(MemoryMap::new(Vec3D::new(64, 16, 64))),
            ),
        );*/ // Load main map from maps/main.lvl (MCSharp/MCLawl Format). ( * worlds ) . insert ( String :: from ( " " ) , World :: new ( String :: from ( " " ) , Box :: new ( MCSharpMap :: try_new ( " " ) . unwrap ( ) ) , ) , ) ; Core :: static_log ( " " ) ; Core { threadsize , players , worlds , tx : None , rx : None , } }
Creates a new rcclassic Core with number of threads to handle player connections.
Creates a new rcclassic Core with number of threads to handle player connections .
threadsize
usize
threadsize
usize