|
||
---|---|---|
.github/workflows | ||
external | ||
server | ||
tooling | ||
.gitignore | ||
.gitmodules | ||
LICENSE | ||
README.md | ||
config.example.json | ||
config.ts | ||
index.ts | ||
nibbleArray.ts | ||
package-lock.json | ||
package.json | ||
tsconfig.json |
README.md
mc-beta-server
![Node.js CI](https://github.com/tgpholly/mc-beta-server/actions/workflows/node.js.yml/badge.svg?branch=typescript)
me trying to understand minecraft beta's protocol
![Minecraft landscape with trees, caves, flowers, shrubs and an ocean.](https://eusv.net/images/mc-beta-server-readme-1-overworld.webp)
![WIP Minecraft Nether with very simple terrain.](https://eusv.net/images/mc-beta-server-readme-1-nether.webp)
Goals:
- Make this as fast as possible on a single thread.
- Only use thread pools if absolutely neccesary.
- Build the server in a way where it should be easy to multithread it.
Implemented:
- Basic flat terrain generation
- Basic (top to bottom, no spread) Lighting
- "Decent" terrain generation using OpenSimplex Noise
- Multi-World support
- Chunk management (loading / unloading)
- Cross chunk structure generation (trees, buildings, etc...)
- World/Chunk saving to disk
- Block breaking
- Player Inventory
WIP:
- Entities:
- Players
- Dimensions:
- Nether
- Inventories (containers, etc...)
To Implement:
- Block placement
- Entities:
- Items
- Mobs
- Saving inventories
- Sleeping in beds
- Tile entities
- Probably a bunch more things that i'm forgetting
Running the server
Heads Up! This server is under pretty heavy development with most likley breaking changes, I will try my best to keep compatibility in the save formats (or provide migration paths) with updates but cannot guarentee it.
To use the server either grab a release or build it yourself.
Running from a release
When using a release all you need to do is run the executable you get from the download.
Building yourself
To build the server yourself clone the repo and run
npm i
npm run build
This will automatically build the server and pack it into a single js file, you'll find your resulting js file in the ./build
folder.
Setting up for development
To run the server simply clone the repo, and run:
npm i
Copy the config.example.json
to config.json
and edit how you want it, then run:
npm run dev:run
You are now running a server locally!
When running the server with npm run dev:run
it is running with nodemon, this means that the server will auto restart as you edit.