me trying to understand minecraft beta
Go to file
Holly Stubbs 5c25dd7436
ignore config file
2023-09-04 01:42:36 +01:00
.github/workflows fix a bunch more codefactor issues 2023-06-26 09:57:40 +01:00
external Add basic cave generation 2023-04-17 02:05:11 +01:00
server Fix issue preventing chunks from being loaded from disk 2023-08-20 16:31:23 +01:00
tooling Fix CI 2023-08-20 02:17:39 +01:00
.gitignore ignore config file 2023-09-04 01:42:36 +01:00
.gitmodules Migrate to bufferstuff module 2023-06-22 12:43:28 +01:00
LICENSE Update LICENSE 2023-04-08 20:55:05 +01:00
README.md Update README.md 2023-06-26 16:50:51 +01:00
config.example.json improve the readme 2023-06-26 16:47:39 +01:00
config.ts lighting sort of works 2023-06-19 18:29:16 +01:00
funkyArray.ts maintenance 2023-08-20 01:18:05 +01:00
index.ts Switch to hsconsole package & add proper shutdown procedure 2023-08-15 10:00:12 +01:00
nibbleArray.ts wip saving to disk / chunk async 2023-04-11 07:47:56 +01:00
package-lock.json Update depends 2023-08-20 02:17:30 +01:00
package.json Update depends 2023-08-20 02:17:30 +01:00
tsconfig.json Switch to hsconsole package & add proper shutdown procedure 2023-08-15 10:00:12 +01:00

README.md

mc-beta-server CodeFactor Node.js CI

me trying to understand minecraft beta's protocol


Minecraft landscape with trees and ocean

Implemented:

  • Basic flat terrain generation
  • Basic (top to bottom, no spread) Lighting
  • "Decent" terrain generation using OpenSimplex Noise
  • Concept of worlds
  • Chunk management (loading / unloading)
  • Cross chunk structure generation (trees, buildings, etc...)
  • World/Chunk saving to disk
  • Block breaking

WIP:

  • Entities:
    • Players

To Implement:

  • Block placement
  • Entities:
    • Items
    • Mobs
  • Inventories (player inventory, containers, etc...)
  • Sleeping in beds
  • Tile entities
  • Probably a bunch more things that i'm forgetting

Long Term:

  • Make this as fast as possible on a single thread.
  • Only use thread pools if absolutely neccesary.

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.