MCP HubMCP Hub
Noeli14

MCppServer

by: Noeli14

Fast and super efficient Minecraft Server written in C++

92created 29/11/2024
Visit
C++
Minecraft

πŸ“ŒOverview

Purpose: To provide a high-performance Minecraft server developed in C++ that maintains compatibility with Java clients while optimizing for speed and efficiency.

Overview: MCpp Server is designed to deliver a smooth gaming experience akin to Vanilla Minecraft, featuring robust customization options. It is currently in early development, encouraging community contributions and feedback to enhance functionality.

Key Features:

  • Multi-threaded Architecture: Enables simultaneous handling of several server tasks, enhancing performance and responsiveness.

  • Chunk Loading and Generation: Efficient methods allow for quick loading and generation of game chunks, designed to use minimal memory resources.

  • Configurable Settings: Simple configurable files allow server administrators to customize server behavior at ease, accommodating specific needs.

  • Packet Compression: Optimizes bandwidth by compressing data packets, improving network efficiency.

  • Extensive Supported Features: Includes authentication, chunk loading, server configuration, and player management, with continual updates adding more functionalities.


MCpp Server

Fast and super efficient C++ 1.21.1 Minecraft Server. Compatible with Java Clients. Designed to feel like Vanilla Minecraft, but with the power of C++.

⚠️ Important

This project is in early development and may contain bugs and incomplete features, as well as temporary and unoptimized code.

πŸ™Œ Progress

Want to see what I’m working on? Check out the discussion tab under Show and Tell!

πŸš€ Features

🏎️ Performance

  • Multi-threaded Architecture: Leverages multiple threads to handle server tasks simultaneously.
  • Efficient Chunk Loading and Generation: Uses multiple threads to load and generate chunks with minimal memory usage.
  • Optimized Codebase: Written in C++ for maximum efficiency and low latency.

πŸ”§ Customization & Extensibility

  • Configurable Settings: Adjustable configuration files to tailor server behavior.
  • Plugin Support (coming soon): Foundation for developing and integrating custom plugins.

🌐 Networking

  • Packet Compression: Reduces bandwidth usage by compressing data packets.
  • Server Status & Ping: Provides real-time server status information and latency measurements.

🧩 Supported and WIP Features

  • Login:
    • Authentication (online mode)
    • Encryption
    • Packet Compression
  • Server Configuration:
    • Server Links
    • Registries
    • Resource Packs (multiple)
    • Server Brand
    • Cookies
  • Server:
    • Lua Plugin API
    • Query
    • RCON
    • Commands
    • Chat
    • Translations
  • World:
    • World Joining
    • Chunk Loading
    • Tablist
    • Entity Spawning
    • World Loading
    • Chunk Generation
    • World Border
    • World Time
    • Bossbar
    • Weather
    • Scoreboard
    • World Saving
  • Player:
    • Player Skins
    • Client brand
    • Movement
    • Inventory
    • Equipment
    • Item Pickup
    • Combat
  • Entities:
    • Players
    • Mobs (Animals, Monsters)
    • Entity AI
    • Boss
    • Minecart
    • Lightning Bolt
  • Physics:
    • Item Physics
    • Falling Blocks

🌍 Use Pre-Generated World

Just place the world folder of your Vanilla Minecraft world in the same directory as the server executable, and it will be loaded when the server starts.

⚠️ Important Notes

  • Linux Compatibility: The Linux version has not been thoroughly tested. You may encounter issues when running MCpp Server on Linux. To join, turn off online mode in the config.json file.
  • Ongoing Development: MCpp Server is actively being developed. Contributions and feedback are welcome.

πŸ› οΈ Installation & Building

πŸ“‹ Prerequisites

  • C++20 Compiler: Ensure you have a modern C++ compiler installed (e.g., GCC, Clang, MingW).
  • CMake: Version 3.14 or higher.
  • Git: To clone the repository.

πŸ”§ Build Instructions

Linux:

  1. Clone the Repository:

    git clone https://github.com/Noeli14/MCppServer.git
    cd MCppServer
    
  2. Create a Build Directory:

    mkdir build
    cd build
    
  3. Generate Build Files with CMake:

    cmake ..
    

    For Debug Build:

    cmake -DCMAKE_BUILD_TYPE=Debug ..
    

    For Release Build:

    cmake -DCMAKE_BUILD_TYPE=Release ..
    
  4. Compile the Project:

    make
    

Windows (MingW & Make):

Follow the same steps as for Linux with adjustments for Windows specifics.

Windows (MingW & Ninja):

Follow the same steps as for Linux with adjustments for Ninja build system specifics.

πŸš€ Running the Server

After a successful build, execute the server binary:

./MCppServer

πŸ“¦ Data Sources

MCpp Server utilizes data from the PrismarineJS repository to ensure accurate game mechanics and data.

🀝 Contributing

Contributions are welcome! Whether it's reporting bugs, suggesting features, or submitting pull requests, your help is greatly appreciated.

πŸ“„ License

MCpp Server is licensed under the MIT License.

πŸ“« Contact

For questions or support, feel free to open an issue or discussion on the GitHub repository.