News for hackers. Stuff that matters.
Re:Folia – Multithreading Coming to your Minecraft server by c7DJTLrn on Thursday March 30, 2023 @02:21PM (#35376953)
The modding/custom server situation with Minecraft is so exhausting. I can't believe after all these years there is still no official modding or plugin API.

So now we have Folia, which is a fork of Paper, which is a fork of Spigot, which I believe was originally a fork of Bukkit. Nice. I guess people don't want to upstream patches for some reason.

Re:Folia – Multithreading Coming to your Minecraft server by perihelions on Thursday March 30, 2023 @02:41PM (#35377185)
- "Folia, which is a fork of Paper, which is a fork of Spigot, which I believe was originally a fork of Bukkit"

We're not old, the forks just fly by so very fast

Re:Folia – Multithreading Coming to your Minecraft server by gjsman-1000 on Thursday March 30, 2023 @02:47PM (#35377271)
Yeah, but Bukkit is ancient - so ancient, upstreaming is basically impossible and even discouraged because it would break compatibility with the few people who still need it. It's really only maintained as a reference architecture by Spigot because it helps with initial Minecraft release reverse-engineering.

Spigot, meanwhile, is run by one developer who only posts his code within a few weeks of a Minecraft launch after working on it completely privately. Paper has examined taking over that role, but has decided against it for the time being until they are ready to fully take on that job because... it's not an easy job and he's basically mastered it (Paper would be much slower if they were doing it themselves for the first few releases). Also he runs the plugin repository and Paper isn't ready to launch their own yet. Also, Spigot and Bukkit have this ancient API that not many plugins use, but a few do... and it'd be nice to not break them.

So Paper is the first remotely reasonable downstream with a big open-source community for it, which then makes it more like... one fork. And even though Paper is technically reliant on Spigot (and Spigot on Bukkit), Paper can really cut them off whenever convenient. And there's a good reason to make Folia a fork - the way it works under the hood is very different than a traditional Minecraft server, and it basically breaks all the Spigot and Paper and Bukkit plugin compatibility.

Re:Folia – Multithreading Coming to your Minecraft server by robotnikman on Thursday March 30, 2023 @02:29PM (#35377070)
I remember, back before Mojang was acquired by Microsoft the devs mentioned working on a modding API, and how it would allow for all kinds of things.

I have a feeling such plans were killed off during the acquisition, as it has never been mentioned since then. Even now it would be simple for the devs to allow players to add new blocks and items via server sent resource packs without needed a modded client, and yet for some reason they do not.

I still have to thanks Bukkit/Spigot for getting me in to Java in the first place tough, and thus my current position as a Java dev. I don't follow it as often but I still maintain a small server my friends play on.

Re:Folia – Multithreading Coming to your Minecraft server by gjsman-1000 on Thursday March 30, 2023 @03:10PM (#35377549)
There's a lot of drama there.

Basically, there was Bukkit. In 2011, Mojang hired a bunch of Bukkit's developers, but didn't tell anyone that they also legally took control of the Bukkit project. This was because Mojang didn't really want Bukkit to be their official API as much as being a temporary API for the time being (and also didn't want to have anyone assume they would be responsible for it), but from that point, Bukkit was legally their project and the community didn't know.

Then, Mojang changed their EULA to ban Pay-to-win servers. This caused a lot of controversy, and one of the Bukkit developers left. Mojang then revealed that, yeah, they owned Bukkit for years, so they didn't need him. Another developer, feeling betrayed, who had contributed to Bukkit, submitted a DMCA takedown against his own code bringing Bukkit down with it, angry at having done "free labor." (You might say, "but the GPL!," but being tricked into a contract under false pretenses can legally invalidate contracts, making the GPL-license for his contributions potentially invalid.) Mojang panicked at the takedown and a ton of developers abandoned ship, working on Bukkit's community fork Spigot. Mojang then 2.5 months later brought Bukkit back and that time really just threw it into the community's hands.

The result of the aftermath was everyone had restructured around Spigot, based on Bukkit; and Mojang wasn't going to deal with APIs and open-source stuff for a long while afterwards. (They did later try purchasing parts of OptiFine, but the developer wanted compatibility to be all-or-nothing which Mojang wouldn't accept.)

https://www.reddit.com/r/Minecraft/comments/6g1tqn/psa_no_bu...

https://blog.jwf.io/2020/04/open-source-minecraft-bukkit-gpl...

https://www.reddit.com/r/Minecraft/comments/2fk5nn/my_respon...

Re:Folia – Multithreading Coming to your Minecraft server by DefineOutside on Thursday March 30, 2023 @03:28PM (#35377728)
The DMCA was since Bukkit is an API while CraftBukkit is an implementation of Bukkit. Bukkit is GPL meaning you can't make a combined work with proprietary software - such as Minecraft, which is what CraftBukkit is.
Re:Folia – Multithreading Coming to your Minecraft server by yreg on Thursday March 30, 2023 @03:21PM (#35377661)
There is a 9 year old song that was making fun of the modding API taking seemingly forever back then already.

https://www.youtube.com/watch?v=G-zthYFjk6s

Re:Folia – Multithreading Coming to your Minecraft server by nightpool on Thursday March 30, 2023 @03:46PM (#35377905)
Actually, this is absolutely possible today using data packs. They're the successor to the modding API project and they provide a very simple declarative JSON-based syntax for adding new blocks, items, customizing world gen, adding new commands, advancements, and even custom entity behavior (using the flexible tag-based entity data system).
Re:Folia – Multithreading Coming to your Minecraft server by robotnikman on Thursday March 30, 2023 @04:52PM (#35378680)
Did a quick google search, it still does not seem to be possible to add using the namespace system they implemented in 1.13 (supposedly for such a reason) and datapacks. Currently, it looks like 'custom blocks' involve using a hacky method involving invisible armor stands and item frames holding items modeled as a block. Which means they count and behave as entities instead of true blocks, and this can be an issue since too many entities will lag a server.

Data packs and resource packs certainly seem very promising as a modding API, but it still seems the devs are artificially restricting their usage.

Re:Folia – Multithreading Coming to your Minecraft server by nightpool on Thursday March 30, 2023 @05:31PM (#35379069)
Ah, that's fair, I knew lots of datapacks used custom entities but didn't realize that custom blocks were entirely impossible. I agree it seems like a strange limitation. I guess the biggest issue is that while custom blocks are easy to make, custom block behaviors are much more complicated to implement outside of code compared to custom entity behaviors, which are much more customizable as a tradeoff for being much less performant.
Re:Folia – Multithreading Coming to your Minecraft server by rezonant on Thursday March 30, 2023 @03:58PM (#35378065)
It didn't die, it evolved. Mojang began taking cues from the modding communities, improving the internal APIs, making the overall codebase more generalized and robust, moving model data to declarative JSON, adding registry systems instead of hard coding, introducing additional resources namespaces by default, resource packs, data packs, simpler creation of custom blocks, biomes, and most recently opening up Mojang's own class and method name mappings so that the insane process of mapping obfuscated Java class and method names can be stopped, allowing mod frameworks like Forge et al to have consistent API making and to reduce the previously huge amount of time needed for mods to get ported to new versions.

The biggest problem with the "mod API" is that, effectively, you'll need to open source Minecraft entirely to satisfy the kinds of changes mods make to the vanilla experience, or else everyone will keep using the patch systems we are building on now. It is discouraged unless absolutely needed, but mods can even apply bytecode level runtime patches on the vanilla classpath to enable functionality that the mod framework hasn't yet exposed.

Re:Folia – Multithreading Coming to your Minecraft server by rezonant on Thursday March 30, 2023 @04:05PM (#35378151)
As an addendum, other games get away with a "designed" modding API because the alternative is too difficult, as most games are built in C/C++ which is nowhere near as malleable and discoverable as the Java runtime. It's also why mods for Bedrock (the C++ implementation of Minecraft) is barely a thing.
Re:Folia – Multithreading Coming to your Minecraft server by actionfromafar on Friday March 31, 2023 @04:07AM (#35384088)
Isn't it also that Bedrock is typically a Windows Store App, which are very very locked down?
Re:Folia – Multithreading Coming to your Minecraft server by j5155 on Friday March 31, 2023 @01:50AM (#35383120)
This exists, it’s how the much more popular Bedrock edition’s addons work.
Re:Folia – Multithreading Coming to your Minecraft server by whalesalad on Thursday March 30, 2023 @02:41PM (#35377194)
In other words, grass roots open source development is hard :)
Re:Folia – Multithreading Coming to your Minecraft server by brucethemoose2 on Thursday March 30, 2023 @02:22PM (#35376972)
We kinda do... in a limited fashion... for Bedrock.

Java MC's development had always been extremely conservative, and it always will be under Mojang. Its both saved it from going downhill and weighed it down.

Re:Folia – Multithreading Coming to your Minecraft server by c7DJTLrn on Thursday March 30, 2023 @02:25PM (#35376996)
It's a shame Bedrock modding (behaviour packs?) is so limited. The performance is so much better than the Java version. It's also a shame it has Xbox shit and microtransactions shoved in.
Re:Folia – Multithreading Coming to your Minecraft server by brucethemoose2 on Thursday March 30, 2023 @02:42PM (#35377200)
Well the Java version is so moddable because its Java, thats almost impossible for Bedrock unless it goes open source or moves to unobfuscated C# (which is impossible because of the MTX of course).
Re:Folia – Multithreading Coming to your Minecraft server by c7DJTLrn on Thursday March 30, 2023 @03:10PM (#35377545)
Does modding need to mean actually modifying game files? When we say modding, we generally mean adding new blocks, items, and behaviours no? Surely this could be done with a public API? It might not give you quite as much freedom as existing mods but you could get most of the way there.
Re:Folia – Multithreading Coming to your Minecraft server by brucethemoose2 on Thursday March 30, 2023 @03:23PM (#35377680)
I'm not sure you understand how mechanically complex MC modding gets.

https://www.youtube.com/watch?v=rR8W-f9YhYA

... and that is just one mod. There are mods for interplanetary space travel, mods for modular portals and matter-energy conversion, mods for full z height terrain gen and massive premade structures, mods for virtual NPCs and towns, "backend" mods that overhaul the render, light engine, chunk loading and such. You cant get that with simple block APIs (which Java and Bedrock have to a limited extent).

And we do have modding APIs, like Fabric and Forge. They are just unofficial.

That being said, there is a better middle ground between the current extremely limited official APIs and the very permissive unofficial modding APIs, but it will never happen because it would interfere with Bedrock's MTX, and Java's development is too conservative.

Re:Folia – Multithreading Coming to your Minecraft server by imtringued on Thursday March 30, 2023 @05:26PM (#35379013)
You seem to underestimate the amount of modding that vanilla Minecraft servers have, such as Wynncraft or Hypixel Skyblock. They turn Minecraft into a completely different game and most of the changes are server side.

Also, Fabric and Forge are not modding APIs. They sometimes provide extra APIs on top of the base game to make mod compatibility easier, but you are very much supposed to just mess around with the Minecraft codebase directly and directly reference Mojang classes in your code. If all you want to do is add a new block in Fabric you don't touch any Fabric API.

Re:Folia – Multithreading Coming to your Minecraft server by brucethemoose2 on Thursday March 30, 2023 @05:45PM (#35379201)
Yeah no question that server only modding is huge too. Its like 2 completely different ecosystems.
Re:Folia – Multithreading Coming to your Minecraft server by nottorp on Thursday March 30, 2023 @03:05PM (#35377497)
Bedrock has IAPs now? I mean it was useless anyway for running a private server, and only runs on Windows, and automation is limited because they crippled the world update distance to have the omg raytracing! or whatever.

And now it has IAPs too?

Re:Folia – Multithreading Coming to your Minecraft server by zamadatix on Thursday March 30, 2023 @03:20PM (#35377648)
Bedrock has had IAPs for many years. It's fine for a private server and they offer Windows and Linux versions of it (client side it supports pretty much every platform except Mac/Linux, including oddities like ChromeOS). Just don't go running it expecting to set up what you would on a Java server - it's two different environments. World update distance default is lower in Realms but can be configured on a private server or client hosted session. It's not really related to raytracing, simulation range has little to do with that.

Both clients/servers have their ups and downs. I do wish they'd release the Bedrock client for Mac/Linux though. Then all platforms would have an official way to interop.

Re:Folia – Multithreading Coming to your Minecraft server by nottorp on Thursday March 30, 2023 @04:11PM (#35378233)
> It's fine for a private server

Land claim / griefing protection? Multiplayer sleep? Custom recipes? Dynmap? Multiverse? WorldGuard rules? :)

Re:Folia – Multithreading Coming to your Minecraft server by zamadatix on Thursday March 30, 2023 @04:34PM (#35378485)
> Just don't go running it expecting to set up what you would on a Java server - it's two different environments.

That said multiplayer sleep, custom recipes, bedrock-viz, and others exist. Customized protection I've found to be lacking though.

But honestly if you're looking at that many 3rd party things you might find it easier to use a 3rd party bridging solution with it instead like GeyserMC+Floodgate. It still has limitations compared to a native java (client, server, mod) tuple but it's probably easier to adapt to if you're used to java server.

Re:Folia – Multithreading Coming to your Minecraft server by Karsteski on Friday March 31, 2023 @07:02AM (#35385172)
Sorry I just can't figure this out, what is an IAP?
Re:Folia – Multithreading Coming to your Minecraft server by terafo on Friday March 31, 2023 @01:52PM (#35390609)
In-app purchases
Re:Folia – Multithreading Coming to your Minecraft server by brucethemoose2 on Thursday March 30, 2023 @02:59PM (#35377407)
Also Java performance doesn't have to be so horrendous, that is Mojang'a fault. They could iron it out with a tiny fraction of their sales.

That being said, the low hanging mod fruit they could incorporate is often poisoned by GPL or some other weird license.

Re:Folia – Multithreading Coming to your Minecraft server by jayd16 on Thursday March 30, 2023 @03:12PM (#35377557)
Why isn't there a mod to iron out the performance if its so trivial?
Re:Folia – Multithreading Coming to your Minecraft server by brucethemoose2 on Thursday March 30, 2023 @03:31PM (#35377756)
There are many such mods. There have been for years.

https://github.com/TheUsefulLists/UsefulMods#performance-and...

Re:Folia – Multithreading Coming to your Minecraft server by creatonez on Friday March 31, 2023 @06:17AM (#35384839)
Re:Folia – Multithreading Coming to your Minecraft server by imtringued on Thursday March 30, 2023 @05:29PM (#35379041)
There is no reason for Mojang to copy mods. It is better for them to develop their own solution so that they can maintain parity between Java and bedrock edition.
Re:Folia – Multithreading Coming to your Minecraft server by brucethemoose2 on Thursday March 30, 2023 @07:20PM (#35380218)
Well they have had the opportunity to (for instance) overhaul the renderer or thread dimensions since 1.0 in 2011, and we are still here tapping our feet.

They have tried to pull in mods before, but unfortunate drama that ensued probably soured them on that idea.

Re:Folia – Multithreading Coming to your Minecraft server by jeroenhd on Thursday March 30, 2023 @03:45PM (#35377891)
Minecraft server forks almost seem to develop as fast as Javascript toolkits. It's impressive, in a way.

I think this has to do with the way that ultimate, true upstream involves the closed source Microsoft components. None of these servers seem to be built from the ground up, each extending an existing package (closed or open source) in one way or another.

Re:Folia – Multithreading Coming to your Minecraft server by bakugo on Thursday March 30, 2023 @03:48PM (#35377922)
What exactly would the point of an official modding API be, even? Anything Mojang could provide would inevitably be inferior to what can be done by directly modifying the game's code via existing third party mod APIs.
Re:Folia – Multithreading Coming to your Minecraft server by nightpool on Thursday March 30, 2023 @03:54PM (#35378013)
Folia is a complete re-write of Minecraft's core game loop to support "true multithreading and regionalized ticking" ("ticking" being the term for a single turn of Minecraft's core game event loop). Even the most ambitious official modding API in the world would never ever contemplate supporting something as thorough and involved as this. Minecraft does in fact have an official plugin API, known as data packs—they're obviously more limited then the ability to completely rewrite the game's code, but they can create new blocks, items, entities, customize their behavior, change worldgen, add achievements, and more. Here's an example of a "bendy pistons" mod that was built entirely using the datapacks API, with no mods required: https://www.youtube.com/watch?v=_Wk7ZUYkrpI (and 7 more features from the original video: https://www.youtube.com/watch?v=2LRvq6H11bs)
Re:Folia – Multithreading Coming to your Minecraft server by Aeolun on Friday March 31, 2023 @01:15AM (#35382897)
Oh my god, bendy pistons are ridiculous. Thanks for that.
Re:Folia – Multithreading Coming to your Minecraft server by sobkas on Thursday March 30, 2023 @04:22PM (#35378351)
> The modding/custom server situation with Minecraft is so exhausting. I can't believe after all these years there is still no official modding or plugin API.

> So now we have Folia, which is a fork of Paper, which is a fork of Spigot, which I believe was originally a fork of Bukkit. Nice. I guess people don't want to upstream patches for some reason.

Time and effort you put into upstreaming patches is almost always wasted, either you get it included and then have to maintain it forever or it will get removed due to bitrot or developers will just say no and all your effort was wasted. Don't forget that developers might also want to share their opinions about you based on your commit. There is no better way to build community than saying that no one cares about you inside of it.

Re:Folia – Multithreading Coming to your Minecraft server by bscphil on Thursday March 30, 2023 @04:59PM (#35378755)
> I guess people don't want to upstream patches for some reason.

My insanely biased impression based on my experience is that this is just the norm for Windows-centric development. Generally you have no expectation of being given access to source code at all; if software is free then it's "freeware", but for whatever reason the developers don't generally want you modifying it. So many power user tools just died out when their developers quit working on them because the source code was not available, at least not under a free license.

I remember back in the early days of Minecraft (beta+ era) I'd just go on the forum and download random jar files uploaded by whomever, and mod Minecraft with them. Nobody asked for source code. Or thinking about doom9, for years and years the norm for tool development was that you'd download a random exe from someone on a forum, with a single thread for "support". If they disappeared one day, that was it. That's also the way a bunch of Android stuff is/was developed on xda-dev.

The more Linux-centric set of norms has expanded outward into a pretty robust open source ecosystem, but it's by no means the universal norm for free (as in beer) software development. Even in cases like Paper / Bukkit where the source is free, building the software yourself is very much not the norm, often is not even supported.

Re:Folia – Multithreading Coming to your Minecraft server by Cyphase on Thursday March 30, 2023 @11:07PM (#35381999)
I've gotten the same impression. So many Windows tools are given away for free, no hint of ever monetizing or anything, just a hobby / service by the developer, and yet no code is provided.

I remember hearing an explanation from one such solo developer with a relatively recognizable brand that he doesn't want people to be able to easily replicate his tools with added malware / adware. But I feel like download sites have been doing that for years anyway.

He has released at least one tiny but useful piece of code as public domain.

Also he does have one product that charges for. I suppose one potential reason to keep code private is to maintain more control of the free tools for purposes of branding and bringing attention to the pay tool? That's just a thought.

Re:Folia – Multithreading Coming to your Minecraft server by imtringued on Thursday March 30, 2023 @05:16PM (#35378930)
Folia most likely breaks compatibility with plugins so forking is to be expected.

If you ignore server plugins, the only effort in actually trying to build a modding API is Quilt and it's Quilt Standard Libraries, which you probably guesses further splits the modding community into Forge, Fabric and now Quilt but that is on the Forge and Fabric guys for not even trying.

Re:Folia – Multithreading Coming to your Minecraft server by irascibeth on Thursday March 30, 2023 @11:52PM (#35382335)
Bukkit was in fact preceded by hey0's mod, the project of a 15 year old kid who was largely responsible for bootstrapping the entire line of Minecraft server mod APIs.

After all these years though it is extremely exciting to see this advancement, I'd expect this to allow extremely large servers. Makes me want to start playing again ^_^

Re:Folia – Multithreading Coming to your Minecraft server by LelouBil on Friday March 31, 2023 @03:52AM (#35383987)
Mojang releases the deobfuscation mappings for each version nowadays.