stardance has been extended another month! the new deadline is october 31 :)

You are browsing as a guest. Sign up (or log in) to start making projects!

Ministom

  • 14 Devlogs
  • 103 Total hours

I original wrote this as training for a Java exam in a few weeks. But now I programm a Minecraft minigame server with Minestom (a library to make your own Minecraft servers from Scratch).

Now it got a bit out of hand and i am trying to program a luanti server to connect with minestom. Idk if i am gonne succeed but it would be super duper awesome.

Ship #1 Pending review

I have made a mini game server for Minecraft from scratch with a java library called Minestom.

Features include

  • Supports Minecraft Java version 26.2
  • Different minigames
  • A system which automaticly manages all game instances
  • A queue system
  • A party system
  • A ban system
    • An automatic bad word block list banner when players use words they really should not
      (must be configure over properties file)
  • A report system
  • A permission system
  • Persistant reports/bans/permissions accross server restarts with sqlite database
  • Configuration over properties file ooooor … by modifieng source code ;)
  • Multible commands acting as a ‘frontend’ to all the systems some require specific
    permissions to execute
  • A main program to connect everything
  • Velocity support
  • In game build tool to modify maps on the go
  • Additional abilities that may be usefull
    • fly in survival mode
    • hide from other players
    • change gamemode
    • help command
  • Visual ranks for players
  • A console prompt that can be used to execute comands from console side
  • NPC’s instead of commands in lobby
  • Prebuild maps to play on

for people who can’t test it normally, because the requirements are a bit messed up because it is multiplayer on a paid game

please read my README.md file in my repo & watch [this broad video] (https://foxors.de/files/ministomVideo.mp4)

the most difficult things where

Things i had to first figure out because Minestom has some methods without any javadoc nor comments in source code :cry_smile:

Another thing that was a bit frustrating was that i tried to make my own workflow with my own runner. However it did not go great and now you have to build docker images yourself, but do not worry i have made a compose and DockerFile all ready, which both worked for me.

Learned a bit

A great thing was that i learned a lot about Java in this project and i think it really helped me with my exam in university (our prof still makes corrections).

PS: You may see the ai notice on this project. It points to a not finished part of this project which is not part of this build, just so you know :)

Hope you enjoy!

  • 14 devlogs
  • 103h
Try project → See source code →
Open comments for this post

3h 26m 56s logged

Ready to ship?

Context
I have programmed, build and arranged a minigame server for Minecraft using a Java library called Minestom, which lets you create a minecraft server from scratch

After more then 100 hours of work i think i am ready to do a first ship.

This dev log is just about stuff i did to prepare. I added screenshots to my readme made the docker setup more easy.

I filmed a little video showing some broad functionality of the server.

Most loose ends are tied up and packet together.

A release can be found in my forgejo instance & there is now a demo server on foxors.de:25565

The only problem is that the people who will rate this project will have a very hard time testing :(. Because they would need A: 2 Paid Minecraft java accounts or B: Set up the server on their machine and need to have the know how to play in offline mode. That is why i also made a little broad video and also put a bit of effort showing off in the README.md file in my repo.

Hope someone will enjoy it :)

ps if someone lives in around UTC+2 timezone i will happily play with them from 19 to 20 o’clock.

0
0
7
Open comments for this post

8h 37m 18s logged

Fixing up stuff :working-parrot:

Context:
I am creating a mini game server for Minecraft with a java library called Minestom which allows the creation of servers for Minecraft

Short summary

  • Made new docker setup implementation
    • deleted old docker setup and made new one
    • added geyser and floodgate
  • Created NPC’s in lobby that can be right clicked to join games
  • Build map for color party game
  • Now permissions of offline players can be changed
  • Moved from anvil loader to polar/shematics
  • Finally made server stop cleanly after /stop command is sent by players
  • Redesigned the win/loose screen for each player
  • Added some more error handling to specific commands
  • Added /stat command to see some stats in game about the server

New docker setup

Last time i didn’t get quite how to build a docker file inside my workflow and now i don’t even try again because time :time-zone-fyi: . What i did is that i have a docker directory now bundled into each build zip which contains all files needed to create a Dockerfile + a bash file to download required files from other projects like velocity proxy. + A compose file which works more or less out of the box.

Non Playable Characters

I finally filled my diamond blocks in my lobby with some NPC’s. Those can be interacted with instead of having to use /queue join <game>. I also did the skins of two of those. The other one is only slightly modified and the last one is the same guy from Hypixel’s TNT-Run NPC, because it was 23 o’clock and i wanted to go to sleep :sleeping-hole: . What funny was that i forgot to disable my cape when i configured them with my account appearance data. They actually still have them on but i turned them invisible.

Anvil to polar

Anvil is the same system original Minecraft uses with region files. But those region files store a lot more data (air) than i need. So i switched to polar a community addon for Minestom that adds support to load from a shematic file instead which only stores the blocks i need.

New win/loose screens

Now not only is it displayed in chat who won but also we got 1., 2. and 3. place positions in case you want to know how close you missed first.

Ship?

Maybe?! I still try to get Minecraft bedrock running on linux because i don’t want to trust a stranger on flathub who is not verified & i wanted bedrock support but can’t test it right now :(

ps: if anyone wants to try it out i would greatly appreciate it :) in a few days i will have fully set up a server on my server under foxors.de. But only java edition for now because of the bedrock thing on linux

0
0
5
Open comments for this post

9h 30m 3s logged

No time left for luanti server programming :(

Context:
I am programming a server for Minecraft with a java library called Minestom. I plan to make a minigame server. The plan turned out to also now program functionality for supporting luanti/minetest players.

To be honest i don’t think i can make everything fully work with luanti until the end of stardance. That is why i will focus more on getting everything shipped now. Sadly only for Minecraft, so some of you can’t play :(.

But i want to still continue this project after stardance ends and maybe someday i get it to work.

The current state of luanti support

I managed to parse some more specific parts of each packet. But as you can see in the video i am not finished with the init sequence. What i have done is the init, authantication, version selection and some more smaller thingis. The rest would be to send over item, node, wheather, time etc. data which all use custom data objects and don’t have any documantation so i need to figure it out from like 6 different c++ files.

Minigames

I started programming on the server again. Now i have made a color party game where you have to stay on the right color and the rest disappears.
And I refined my snowball game, where you have to hit other players from the map. Now the snowballs automatically despawn.

Fin

What the hell was with last post? 200 views?!?! is it because i have an terminal emulator open? or because “server” is in the title? ;)

PS:

Had to post again because of time limit of 10 hours.

3
0
39
Open comments for this post

10h 41m 22s logged

Trying to create a Luanti server in java+ need to devlog because of 10 hours time limit

Soooo i don’t have anything to show. I can only tell you that is stupidly hard to create the protocol implementation of luanti if the entire docs to it is one page in the wiki and the rest c++ source code. Now i not only learning java but also c++. Could be worse because i already know C.

Talking about slight progress

You can see in the video below a demonstration of a UDP socket receiving data from the actual Luanti client.
As you can see i already managed to parse some parts of the protocol. Currntly i am sitting on refining this a bit + implementing the init process. Till now i only managed to set the peerId of the luanti client. (peerId is, when i understood correctly, just an id the server gives clients to track them. After a client recieves this id it uses it to contact the server next time)

2
0
213
Open comments for this post

8h 26m 40s logged

I totally not know what title i should write down

Context
I am trieng to create a mini game server for Minecraft with the help of Minestom which is a java library toolkit to create servers from scratch

I only have minor changes to tell you because I am working on a BIG thing right now but i don’t know if it is going to work.

But this is what i have added/changed

  • Added teleport command to throw my friend around while testing because they are non technical and somehow don’t get used to the commands i made :(
  • Made banned players get kicked while in the login phase instead of when they are already logged in
  • Added a line shape to my in game world editor
  • Now the world editor takes care of worlds itself instead of having to work with messy code working with the default games manager thing i created
  • Created a rank. Players can now have ranks like idk “admin” or “dev” & so on. They are only visual in the tab list and everywhere else their names are.

and i had fun with redo/undo feature of the in game editor as you can see in the pictures

0
0
13
Open comments for this post

5h 13m 10s logged

I like snow

Context
I am creating a mini game server for Minecraft with a java library named Minestom which allows you to create a server from scratch for Minecraft

Today i continued programming my in world editor. Now you can copy &
paste structures. You also can now create a sphere if you want.


The snow thing in the title is about the newest game. A snow ball fight game where
you have to throw others from the map by throwing snow balls.

Did you know that snow balls are not real projectiles because they can’t hit players. It is a bit hard to make them hit players.


I also made the map for the spleef game & already created a map for
the snow ball fight game.
Both were now made with my own in game editor without additional tools.

0
0
18
Open comments for this post

2h 17m 19s logged

CTRL+Z would be useful i think

Context
I am creating my own mini game server for Minecraft withe Minestom,
a java library to create your own server for Minecraft from scratch.

I managed to get the build tool to a moderate level of usability.

You can now:

  • select an area
    • over wooden axe
    • over pos1 and pos2 command
  • fill selected area
  • setblock at specific position
  • replace blocks in selected area
  • undo & redo actions you did
  • give yourself an item you need and don’t find in creative menu like a
    light block or a command block or something

I also made the world where you can edit maps calculate light in the
world.

Thanks to that i managed to fix some light issues i had previously with
my lobby map. Now i don’t have to give all player night vision the
entire time.

0
0
15
Open comments for this post

6h 18m 20s logged

Programming a in game world editor because i am too lazy to create server code for axiom or other tools

Context
I am creating a custom mini game server for Minecraft with Minestom
A library allowing to write a java Minecraft server from scratch

Today i spent most of my time building a in game world editor functioning similar to the popular world edit plugin.

My little twist is that i use the new displayblocks Minecraft offers to make a visual appealing selection box of what you selected. It is ridicules how long it took me >:(

I also made it possible to load specific worlds and edit them which are saved after you are finished this way i could for example modify the TntRun game world a bit to my liking while the server runs but these modifications made are permanent. Normally worlds don’t get saved after the mini game is finished.

So now i could just rely on my own tools instead of having to create a world in vanilla Minecraft and then import them into my Minestom project.

I also touched the idea of trying to implement protocol code of Luanti or formally known as Minetest which works with Minestom to let players join through Minetest for people who don’t want to use proprietary applications or don’t have an account for regular Minecraft. But i will probably fail at that task because it is waaay over my head :|

0
0
7
Open comments for this post

16h 9m 9s logged

Oh no i forgot to do a post 👀

Well, here we are 16 hours in… again.

Context
I am programming a mini game server for Minecraft with Minestom, a library which allows me to create my own server from scratch. (in java)

Overview of what i have done

  • Added a server side console where an administrator can input commands which the server executes with a library called jLine
  • Tried making a workflow for automatically building with some success
  • Made a Spleef game prototype
  • Improved the ghost player system
  • Made a ui makeover for chat elements (again again)
  • Added some new abilities/commands

Server side console

I have added a console thing where, after the server started, somebody with access to the terminal can run commands as the server with all permissions.

For that i used a lib called jLine to make it just like the consoles most Minecraft server administrators should be familiar with.

The actual hard part was that i had to rewrite some of the code i already have done. For example commands that would only work if they where run by a player needed now to check first if the command caller is the server actually itself.

Actions

I never used github actions or something like that.

So i did the normal thing and created a runner for my own forgejo git instance and build an action without understanding more than 60% of it or even less.

While i did not manage to create a docker build process i managed to create an action which builds my gradle java project with shadowjar and puts all required files into a zip which gets saved to my repo as an artifact file to be downloaded and executed instantly.

turns out it is really dumb to try create an action on an runner which uses podman which uses docker in docker in a container which now should have installed docker inside of that to build an image?
IDK man i have to sleep at some point

Ghosts

I have already made a system letting games make players ghosts who can’t interact with the world around them.
Now i have made it like hypixel does it. Players are getting hidden from all other players. Not by giving them an invisible potion or something. The server lets players disappear by just not sending information about their whereabouts to the other players oh and they are in a survival mode but can still fly. TO NOT LET THEM ESCAPE MUHAHA i am evil or something.

Oh and new commands

I have made small commands which i though would be fun.

hide

Tell server to hide your player account by the same principle as the ghost system.

fly

Enable flying for your player account.

stop

Literally stops the server

help

A help command which tells players all about the commands they can access with their permissions

nickname

Kicks you but after joining again you will be logged in as another account name with the others skin etc. Only your uuid will stay the same to still be able to fetch your accurate permission etc. on the server.

(of course this and most of the others commands on this level are behind permissions and can’t be accessed that easily)

By, by

Hope you have a great rest of a good day!

I am currently on vacation and therefore have to use my Labtop instead of my PC. I already miss him i just tried another linux distro on it :(

0
0
14
Open comments for this post

7h 33m 28s logged

Security

Context
I am creating a custom mini game server for Minecraft with Minestom.
A library allowing to write a java Minecraft server from scratch

Security is one of my least favorite thing because it is sooooooooo complicated to get done right but this time it is not about security for protecting the server itself. It is about user security.

Banning

Every public server (sometimes also private ones) need a ban system. I now have implemented one which allows banning players even if they are not on the server by using Mojang’s public API to get the uuid of players with their name. This uuid gets saved alongside a ban time and a reason for the ban to the sqlite database.

The players are also automatically kicked when the writing to the database happens.

Each time players try to connect to the server it first checks if they are banned or not. If yes they kick them instantly again with information for them about how long the ban is etc.

Players get also automatically unbanned if they ban time runs out.

Or an player with sufficiant permissions can unban them over /unban unban <player> manually.

Permanent bans are also possible by telling the server the ban time is 0.

Report system

Players can now report others with a reason. Administrators can then look up all open reports not handled by another administrator. They can view information about the report like who is reported, when is reported, why is reported.

After they have researched if the player actually made something stupid they can react to it and tell the report system to archive the report and tell a reason/a explanation on how/why it is fixed now for future administrator actions to look at.

Chats

Going to a more fun little thing.

Now every player can only chat with other players in the same world/crate/game/whateveryouwannecallthem so that not all players are getting flooded by messages by ALL players of the ENTIRE server.

Auto banning

I also gone ahead and made a system which checks those chat messages before sending them to other players for words from a word blacklist configured in the server configuration. If a match is found the player who send that message gets instantly banned for using a blacklisted word.

This is just basic security from people using bad/horrible words in chat for/with others.

When the system maybe fail to detect something because players are probably starting using cryptic things to express words we also have the report system and the logs made from those chat conversation which can be viewed by server administration.

0
0
12
Open comments for this post

8h 7m 47s logged

Let me just shortly re implement everything

Context
I am creating a custom mini game server for Minecraft with Minestom
A library allowing to write a java Minecraft server from scratch

Overview

Yesterday and today i did this here

  • Now hard coded values are instead read from properties file
  • Made nearly all commands rely on same design in chat to look good
  • Players who disconnect also leave queues now automatically
  • On shutdown the server actually closes things like THE DATABASE CONNECTION :|
  • Made queue reset if players leave while in start sequence
  • Made a little game loop system for all games (countdown to start/countdown to end)
  • Create auto completion for queue- & permissions command
  • Rewrote large portions of the queue and party system

Config file

I now use the same thing for config files the official Minecraft server uses. .properties. It is actually a library provided by java and does not use any other dependencies.

Same design everywhere to feel at home

Mostly all commands now rely on the same design in the chat to make it look more consistent.

Disconnecting players

I have made a event handler for player disconnection which tells the queue and party system to kick this player from their system. Because you should not be in a party with someone who
is not on the server.

Actually handling shutdown now

Previously the server just terminated everything including the database connection :| now Minestom sends my program a signal and i gracefully close database, kick players and so on.

Game loop system

Just a small collection of functions helping with standard game presidia like starting after 5 seconds or sending all players back to the lobby after 10 seconds.

Auto completion

I added auto completion to commands the user will interact with to make it easier.

Rewriting CoDe

YAY my favorite thing. My original code was kind of spaghetti code and now i rewrote large portions which should improve understand ability?

The hardest thing

Probably the hardest thing i am facing with this project is Minestom’s lack of documentation. It has a wiki which only covers the basics. The rest is java doc but many functions/variables are defined like this: this_specific_thing() Does this_specific_thing but doesn’t tell what this_specific_thing is. But thankfully Minestom is open source so i can just look at the source code thought it is a bit hard for me because i am still somewhat of a java newbie.

0
0
14
Open comments for this post

5h 43m 43s logged

The first mini game

Context
I am creating a custom mini game server for minecraft with Minestom
A library allowing to write a java Minecraft server from scratch.

Cleaned up on blueprints & crates management

I rewrote parts of the logic of crates (system to manage mini games).
To be hopefully better maintainable.

Tnt Run

I made a first game the classic TntRun. Players are on a floor which
disappears under their feed. There are 3 floors and it is checked who has won.

I also had a bit fun with the light engine at the start (first image)

Jar

I made everything, including dependencies, able to be build into a single jar
with shadow jar.

Docker/Podman

I used my jar to create a Docker image file which takes everything important
from the repo & puts it into a docker/podman image (only tested with podman).

I also made an environment variable that can be set which gives a specific player the highest admin permissions.
So that you don’t have to mount the container & manually change add a player to the permission table of the SQLite database in it.

Ghost system

I also made 3 functions to implement a basic ghost system for when games want to get rid of players from the game.

And an readme

I added a README.md to my repo… with some text about how this thing works and breaths.

0
0
12
Open comments for this post

5h 40m 34s logged

Procrastinating with design over function

Consistent chat UI

So today i made a consistent chat design for different parts of the server. Except admin tools those still need to get a makeover.

Queue upgrade

Furthermore I added a bit of UI for the queue to tell players how full the queue is and how long it will take to start.

I also made the queue wait for a few seconds before actually starting to give other players to join if the game can start but also works with more players.

terrain loading screen

This was such a paaaiinnn i didn’t find any documentation that is up to date. After some digging i found out the Minecraft client shows users the loading screen for change worlds if the dimension is changed NOT THE WORLD THE DIMENSION so i made a dimension… again a bit painful because docs are kinde not existing? But… i guess the source code is enough docs :).

The reason why i wanted a loading screen on client side when changing worlds is to hide some ugly chunk glitching that happens sometimes and hopefully not to confuse the client too much about in which world it actually now is.

In addition I had fun with dimension parameters and accidentally made a horror map.

0
0
6
Open comments for this post

5h 39m 10s logged

I kinde forgot to install hackatime extension for Vscode _(° - °)_/ … but 5 hours are still some hours.

But now to get your introduced to what i already have managed to create.

  1. A server
  2. A system to dynamically manage different worlds, which will host different games in future
  3. A queue system for games
  4. A party system
  5. A lobby
  6. A permission system
  7. sooommeee chat UI stuff to look okay
  8. Permissions get saved to sqllite database

So yea a bit of stuff are already on their way.

Dynamically managing of different worlds

I have made a system that can on command create/remove worlds and move players to them. Furthermore it also removes automatically old worlds with no players in them to save on resources.

I call worlds crates because they are a bit self contained.

Queue system

On top of the crateManager i build a queue system. Players can join queues for a game and if a queue has enough players it creates the crate for it and moves all players to it. In the crate they can than play bc the crates have their own self contained logic.

Party system

Players can all join together in a party and if they queue they always get into the SAME queue.

Permission system

I have made a permission system. Players can get permissions like admin.build.place to for example be allowed to place blocks in normally non build areas. But they can’t break any blocks that would also require admin.build.break or instead of having to give both permissions you can just give a player admin.build and they will have all permissions of sub permissions of build.

Each permissions is saved/read from/to a sqllite database to make them persistent across server reboots.

lobby

oh yea and i did spend around 3 hours building a lobby :))))

0
0
9

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…