You can run a standard Java Minecraft server however you like, and then you can wrap it to also work with the Bedrock using Gyser[1] which will protocol translate it on the fly. It can require some workarounds on the more restrictive bedrock clients but it does work. That will let you setup and control the server from Java which has more options available.
No, seriously, I'm fascinated by the story. It's been over ten years. I'm happy to assume that most of the people involved are smart and good with decent intentions. I also bet there were many kinds of commercial and organisational pressures, especially because it's (a) Microsoft and (b) one of the biggest gaming acquisitions ever.
Does anyone here have any insider knowledge they could share?
They almost have feature parity, but there are some small differences around the edges. There exists modded server options for enabling bedrock and java users to connect to the same server.
Why did notch do that?
There were next to no libraries, ecosystem, or support for Java at the time. It was such a bizarre choice.
Not to mention the JVM, GC, and all the other oddities. It was super off the beaten path to have done this.
Might as well have been Ruby or Perl.
Java allowed Minecraft to run pretty much everywhere, including as an applet (very important in its early time) and it relied (and still relies) on LWJGL which provides access to the most common stuff you'd need to make a game (OpenGL, windowing, input events, etc) - and at the time it also worked for applets too (you needed to download the LWJGL applet code but it was signed by the devs so you didn't get too many scary messages).
I used the same tech (Java+LWJGL) at the time to make a few simple demos/games and it was quite easy to make stuff - e.g. i made this[0] in a few hours using Java, LWJGL and Eclipse on the iMac i had at the time.
He used LWJGL, which probably covered a lot of his library needs.
Java has a JIT, so it's not comparable to Ruby and Perl.
It did not start being popular :)
Seriously though, I think Java helped it get so much traction initially. Writing mods was tedious but not that difficult, and it was multi-platform for free. Nowadays I assume the vast majority are playing bedrock on consoles or PC, but at the beginning it was rather nerdy and being playable on Linux and Mac was nice for some tech-minded people.
Given what it was in the very beginning versus what it very rapidly grew into, I guess it was just something that made sense at the time.
Bedrock started as "Pocket Edition". Probably the best place to get the story is at: https://minecraft.wiki/w/Pocket_Edition
I like Minecraft quite a lot and am not concerned with interoperability between Java and Bedrock... but will only play the Java Edition because of game-play differences between the two; differences in which Java Edition comes out as being materially better than Bedrock... at least from my perspective.
Also, mojang (not microsoft) really appreciates modders, which java edition is strictly superior for
The real reason is you want to run your game on the latest greatest WiiStation(tm). if it is written in C/C++ you sit down with a copy of their development library and change your code to fit. If it is written in java you port the jvm to the device. And I don't really know how hard that is(having never ported the jvm) but most people sort of balk at that step.
Microsoft thought it was easier/better to rewrite minecraft in C++ than port the jvm to the xbox. There was a big enough customer base attached to the original java version they did not want to discard it(backlash would be too huge and messy).
That said, I'm convinced that 90% of the reason that the current mess exists is because Microsoft was convinced that most users would be migrating from Java to bedrock. And they probably would have (modding and other things aside), had the Microsoft team not decided to "fix" many aspects of redstone.
Since then there's been the constant issue of parity between the two versions, which will likely never be achieved. And 90% of the time it's because the Microsoft developers working on bedrock edition decide they know better than mojang does, so they can implement a feature in a different way, or just implement a new feature entirely.
Ugh it's a mess, and I've spent way too long thinking about it.
I don’t think that’s quite right. IIRC, the mobile iOS version was released before the Xbox one and neither were developed by Microsoft. I think eventually it’s the mobile version that became Bedrock and replaced the older console version, which became a dead end.
The mobile version (released in 2011) could not be in Java, otherwise it could not have been sold on iOS. So at least initially it was more a business decision about which platforms to target than a technical decision to do away with Java.
All this happened years before Microsoft bought Mojang.
Java Minecraft is just a better toy, I'm not altogether sure it's a better game, depending on how you define game, but it's a better toy because it's so flexible. I assume Geyser can't magically donate much of that flexibility to a Bedrock client, but if the players can co-exist then that's a boon in itself.
The best thing you can do is run on the latest JVM, set your max memory as high as you can tolerate, and use ZGC. That's it.
The JVM tuning guides for minecraft will have you switching and toggling every JVM flag under the sun with extremely dubious "evidence" of the payout for the flags they switch. In some cases, they will set contradictory flags. For example, setting eden size and target pause time. The fine tuning flags disable the heuristic flags like target pause time.
KISS. ZGC has very low latency and the larger the heap you give it the less it'll slow things down (though, do keep it under 32gb. Object header compression works on heaps less than 32gb). And using the latest JVM reduces the memory needed and increases the performance in general of the JVM. Win-win.
A lot of the advice, for example, suggested using CMS. Which has been a terrible garbage collector almost since it was added to the JVM. When G1GC landed in 8, that was the correct GC to select for minecraft. Even the parallel collector would have been a better option than CMS in a lot of cases (sub 4gb heaps).
It was placebo. People wanted there to be SOMETHING that made things better so they reached for the billion different flags on the JVM (rather than fixing the underlying code). I've seen the same sort of mentality professionally and it's basically always been wrong.
There's not much you can do to fix the underlying code if the language doesn't allow you to declare a struct Vector3 { float x, y, z; } without heap-allocating it.
It really applies to anything with a huge number of options, I remember similar things from back when I used Gentoo and the wild suggestions I'd get for what exact CC/C++ compiler options to use...
Creating objects like crazy, range for in hot paths, not caring about data representation, chosen algorithms,....
JIT and GC were already doing heroic efforts.
Yet, it settled Notch for life, which is something to take into account in the usual question regarding which technical stack for games.
For other GCs like G1 and the parallel collector, when new gen is filled up the GC pauses the application in order to run a minor collection. For G1, major collections are ran in the background until the heap fully fills up. When that happens, the GC triggers stop the world GC.
A smaller heap size would cause those pauses to be more frequent but because the heap is smaller it means that ultimately the pauses will be limited in length.
ZGC is different. Without generational mode, ZGC is collecting the entire heap every time with it, ZGC will do the young old collections.
When a collection is triggered, ZGC flips a field to indicate a collection in progress, that flip is the only pause for the application under zgc (except the case that the heap fully fills) it typically finishes in microseconds. Once collection starts, the ZGC collector threads and the in progress application are running collections. The size of the heap really doesn't change much other than the background collection could last longer (slowing down the server, but not totally stopping it from being responsive).
The payment you make with ZGC is that you do burn more CPU cycles doing collections especially while the app is running. But for a game server, that hardly matters. What matters is that the server remains responsive in a timely fashion, which ZGC enables.
- It is divided into by default 2048 regions so it will be setting region size to 4mb means with an 8gb heap, and that you’ll get an inefficient collection once you have a 2mb+ object to deal with. So there is a value to setting a bigger heap size to get a bigger region size. The max is 32mb region size then after that iirc the region count bumps. https://docs.oracle.com/en/java/javase/17/gctuning/garbage-f...
- The young gen size also something that resizes dynamically and so having a bigger max heap will let that get larger and avoid pressure and promotion of objects that would otherwise just never get promoted in the first place (stop the world to move from new to old gen). I’ve never seen this stated anywhere I can think of but believe that I’ve observed it many thousands times.
- The reason that a Full GC occurs is because the application allocates too many objects that can't be reclaimed quickly enough, this isn’t just something that is always happening in the background , I would call full gcs a tuning problem, not everyone agrees in a given org fwiw, but I’ve been able to tune them out for nearly all workloads. https://docs.oracle.com/en/java/javase/17/gctuning/garbage-f...
TLDR , as long as I have enough ram for the working set (page cache etc) I’ve had good luck cranking g1gc very high in prod and avoiding long collection times all together. You see other large deployments do similar (was big in the Cassandra space back in the day, Instagram off the top of my head was running very large heaps with g1gc before anyone else I knew of).
Everything you've posted is accurate but I also don't believe it contradicts what I said. I certainly simplified and I'm not suggesting G1 is a bad GC, it's one that we often use. I just think ZGC is better for the job of a game server.
G1 is an excellent GC if your application can tolerate periodic 50ms latency spikes (most applications can). My argument is that specifically for a game server, ZGC is better. That's because game servers typically have more than enough CPU horse power and added latency is detrimental to the experience. So trading off more CPU usage due to GC is a worthy tradeoff vs the added latency spikes.
This was ~5 years ago, so I'm sure it's gotten better. But not that much better 8gb would cut it, either client or server side.
Also if for some reason you are setting the heap size high avoid going past 32 gb unless you tune object alignment. Allocating between 32 and 47 gb will result in an effectively smaller heap. Allocating more than 32 gb can result in performance penalties.
If you need more performance, install [fabric](https://fabricmc.net/) and then install [lithium](https://modrinth.com/mod/lithium), but do not use mods like paper or spigot or purpur as they will mess up farms.
I have run a Docker Minecraft Server (itzg/docker-minecraft-server) for years and it's been rock solid. Best part is not having to install a lot of dependencies, the image just does it all. I think they also have a Bedrock Edition server but I never got it working right (see above).
You'd need everyone to run the Java Edition on Windows/Mac/Linux systems if you want to do it with the least amount of pain. Otherwise, people are just paying for "Realms" which are hosted servers.
Depends on what your goals are with the family server, Realms may not be a good fit at all. But in terms of getting kids playing together simply and quickly, it’s the easiest way to go.
As a side note, I know kids who switched to Java after years of insisting only on Bedrock and sorely regretted not making the move much sooner. This is part of growing up these days.
There are many ways to get it done. What worked best for us was choosing java over bedrock, renting a cheap linux vps, and writing some very simple shell scripts for starting, stopping, changing worlds, etc. Happy to talk you through anything you get stuck on!
But the canonical way to do it that is both free and infinitely customizable is to host your own server. It’s pretty straightforward to do these days. However, before you do, I would suggest playing the game a bit to understand what the settings are/mean. You and your kids could play together a bit on a Realms server or a community/public server to get a feel for what you want in a custom server.
Something to know is that there are two versions of Minecraft, Java and Bedrock (C++). Some others in this thread have talked about the history of why this is, but the important thing to know is that Java runs on Mac/Windows/Linux, and there are some neat launchers that can run it on Android. Bedrock runs on Consoles/Tablets/Phones/Windows. Note that Bedrock _does not_ run on Linux or Mac.
There are ways to host Bedrock-only servers if you're _sure_ no users will ever be running the Java client, but I would recommend running a Java server with the Geyser and Floodgate plugins for compatibility reasons. The plugins are a translation layer that trick Bedrock clients into thinking they're connecting to a Bedrock server. I've been playing this way (me on Mac/Java, her on Android/Bedrock) for two weeks with no real issues. I haven't explored adding any other plugins to the server.
I'm running this in a container on an old Thinkpad in my office. This setup is common enough that GLM-5.2 set it up in (nearly) one shot.
I also really recommend running an instance of https://bluemap.bluecolored.de/ in another container on the same machine. It hosts a neat map of your world, which your family could pull up on their phones while not playing. My server itself is LAN only, but I used a Cloudflare tunnel to host the map so she can show her friends: https://mcmap.thg3.net/
Let me know if you have any questions or would like my server config!
I think most seasoned players, technical folks, or Mac users, would prefer Java. Java Minecraft doesn't have microtransactions, skinning your character is a matter of changing a file, and the plugin/mod support is huge. That's why I stuck to treating the server as "Java first, Bedrock supported" instead of ignoring Java and only playing Bedrock.
I brought up the bedrock/java bundle deal with the PC version since the main advantage of Bedrock is the crossplay. If you want to play with someone on (for example) android, you can simply choose to launch into bedrock on PC for multiplayer
Additionally, highlighting that Bedrock Minecraft is not supported on Mac.
There are surely other ways of enabling multiplayer Minecraft for a family than what I've described, but this is the way I'd recommend.
Also, I thought you could play the iOS version on Mac. Doesn't apple let you run iPad apps on macOS?
[0] https://modrinth.com has a bunch of mods the kids have enjoyed as well.
https://github.com/itzg/docker-minecraft-server
There’s also a version for bedrock (the version that’s supported on mobile devices).
Can also run on the nintendo switch if you setup a cname to redirect to your server IP, i.e: mco.lbsg.net x.x.x.x play.lbsg.net x.x.x.x
Then choose the "Lifeboat" server
[0] https://jamesachambers.com/minecraft-java-bedrock-server-tog...
https://pdx.su/blog/2024-07-08-running-a-minecraft-server-on...
I do see `pause-when-empty-seconds` [1] when looking at the wiki, which seems the closest, although I can't find doc on what "paused" means (this is the closest [2]). Looks like a fairly new feature (2024), but it's neat they've thought about it.
[0]: https://wiki.archlinux.org/title/Minecraft/Java_Edition_serv...
[1]: https://minecraft.wiki/w/Server.properties
[2]: https://www.reddit.com/r/admincraft/comments/1k330eg/what_ha...
That's unlikely for two reasons, first because minecraft is closed source, and second because arch packages usually follow upstream very closely.
[0]: https://aur.archlinux.org/cgit/aur.git/about/?h=minecraft-se...
[1]: https://github.com/Edenhofer/minecraft-server
[2]: https://github.com/Edenhofer/minecraft-server/blob/421ff0ff3...
But the big thing is that community is a little all over the place. I use ChatGPT to walk me through everything to securely set up a couple of servers. Kids love it.
Most chatbots will be smart and recommend things you need for permissions, rollback, backups, and most importantly, whitelisting. For giggles I left an unprotected Minecraft server up on the default port of my residential IP and the thing was griefed to heck within days. The griefers were just griefing other griefers.
So far so good, we have an offline server, so even if the Microsoft Server is down, we can play (we use PolyMC on PC with offline accounts as well, for the same reason). By default, new users are in "spectator" mode, so they can't do anything without an activation from admin.
Friends get Wireguard QR codes, periodically we rotate them.
You can ask if to set up damn near anything you want and it'll do it.
If you're using a laptop make sure it disables all of the sleep on lid close stuff, as well as other laptop-specific power optimisations.
A VPS would work too if you want something always available with a datacentre network connection.
Also, find a world backup solution and use it.
If they’re playing from MacOS/Windows then the GeyserMC layer isn’t necessary as they can run the Java client.
If you are not all playing on the same edition, you can use something called GeyserMC (https://geysermc.org/) to allow Bedrock players to join your Java server.
Modding your server can greatly improve your server performance. Java is the platform with the best modding support. The modding APIs are however community built, due to historical and upsteram reasons. The subjectively best API for development (in my opinion) is Fabric (https://fabricmc.net/), but many older mods have only targetted Forge. Due to a split in the Forge development team, this API was recently superceded by NeoForge (https://neoforged.net/). Most relevant mods support both Fabric and NeoForge.
To explore mods, I would recommend using Modrinth. It has a pleasant and powerful interface, and links to source code on open source mods.
Here is a search filter for an overview of server-side optimisation mods:
https://modrinth.com/discover/mods?g=categories:fabric&l=ope...
To set up your Minecraft server, I would recommend NixOS (https://nixos.org) for devops with nix-minecraft for server configuration:
https://github.com/Infinidoge/nix-minecraft
Feel free to ask clarifying questions if you have any, I might have written this somewhat compactly!
I ran a private server for my kids for a while and it was a huge headache. Bedrock is purposely made to not make it easy to DIY. It was difficult for their friends to join, everyone was mad when it was down when they wanted to play, and I had to take great care to not lose their progress.
Paying for a Realm doesn't scratch that DIY itch, but your kids will actually get to enjoy playing, which is really the point, isn't it?
Alternately, run a Java server and use the Java-to-Bedrock plugin / proxy / adapter.
And you can stay in steam forever if you wanted.
just get everyone on java. i play on my framework laptop, my wife on her mac and my son on a steam deck.