mc-beta-server/README.md

78 lines
2.9 KiB
Markdown
Raw Normal View History

2023-04-21 16:13:30 +01:00
# mc-beta-server [![CodeFactor](https://www.codefactor.io/repository/github/tgpholly/mc-beta-server/badge/typescript)](https://www.codefactor.io/repository/github/tgpholly/mc-beta-server/overview/typescript) [![Node.js CI](https://github.com/tgpholly/mc-beta-server/actions/workflows/node.js.yml/badge.svg?branch=typescript)](https://github.com/tgpholly/mc-beta-server/actions/workflows/node.js.yml)
2021-08-21 08:42:18 +01:00
me trying to understand minecraft beta's protocol
2023-06-26 16:47:39 +01:00
- [Running the server](#running-the-server)
- ~~[Running from a release](#running-from-a-release)~~
- [Building yourself](#building-yourself)
- [Setting up for development](#setting-up-for-development)
<hr>
2023-09-04 02:02:25 +01:00
<img src="https://eusv.net/images/mc-beta-server-readme-1-overworld.webp" alt="Minecraft landscape with trees, caves, flowers, shrubs and an ocean.">
<img src="https://eusv.net/images/mc-beta-server-readme-1-nether.webp" alt="WIP Minecraft Nether with very simple terrain.">
2023-04-14 00:01:40 +01:00
2023-11-05 01:08:01 +00:00
**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.
2021-10-21 01:35:24 +01:00
**Implemented:**
2021-08-21 08:42:18 +01:00
- Basic flat terrain generation
2023-06-26 16:18:09 +01:00
- Basic (top to bottom, no spread) Lighting
2023-04-09 04:23:22 +01:00
- "Decent" terrain generation using OpenSimplex Noise
2023-09-04 02:02:25 +01:00
- Multi-World support
2023-04-09 04:23:22 +01:00
- Chunk management (loading / unloading)
2023-04-13 23:53:36 +01:00
- Cross chunk structure generation (trees, buildings, etc...)
2023-04-13 00:30:13 +01:00
- World/Chunk saving to disk
- Block breaking
2023-11-05 01:08:01 +00:00
- Player Inventory
2021-10-21 01:35:24 +01:00
**WIP:**
2023-04-09 04:23:22 +01:00
- Entities:
- Players
2023-09-04 02:02:25 +01:00
- Dimensions:
- Nether
2023-11-05 01:08:01 +00:00
- Inventories (containers, etc...)
2021-10-21 01:35:24 +01:00
**To Implement:**
2023-04-08 20:52:47 +01:00
- Block placement
2021-08-21 08:43:31 +01:00
- Entities:
2023-04-13 00:30:13 +01:00
- Items
2021-08-21 08:43:31 +01:00
- Mobs
2023-11-05 01:08:01 +00:00
- Saving inventories
2021-08-21 08:49:42 +01:00
- Sleeping in beds
- Tile entities
- Probably a bunch more things that i'm forgetting
2023-06-26 16:47:39 +01:00
<hr>
## Running the server
2023-06-26 16:50:51 +01:00
**Heads Up!**
2023-06-26 16:47:39 +01:00
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.
2023-06-26 16:50:51 +01:00
2023-06-26 16:47:39 +01:00
To use the server either grab a [release](https://github.com/tgpholly/mc-beta-server/releases/latest) 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`](https://github.com/tgpholly/mc-beta-server/blob/typescript/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!
2023-06-26 16:50:51 +01:00
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.