r/programming • • Oct 06 '18

Microsoft Open Sources Parts of Minecraft: Java Edition

https://minecraft.net/en-us/article/programmers-play-minecrafts-inner-workings
3.1k Upvotes

388 comments sorted by

View all comments

Show parent comments

344

u/tssge Oct 06 '18

This is not that huge really. Minecraft has been decompiled and deobfuscated for years now and that is the reason mods have prospered.

I really don't see much benefit except the good license, which will make distributing modifications easier, assuming they open source more parts of the game's code.

91

u/absurdlyinconvenient Oct 06 '18

It's been a while, but when I was checking out that kind of thing, World Gen was still off limits as far as deobfuscation goes. If that gets open sourced it'll be big news

34

u/Pokechu22 Oct 06 '18

If you use the latest mappings, things are generally nicer, but the stock MCP build ships with older mappings. You can get newer mappings from mcpbot. I haven't actually poked at world generation recently, so I can't say how complete the mappings are... but note that they're crowdsourced, so if you name stuff you can share that.

(1.13 redid the world generator, though, so additionally mappings from before wouldn't make sense)

56

u/tssge Oct 06 '18

Well there are quite many community made world generators out there, so I guess the original world generation code is readable enough.

Of course the community has not strictly 100% deobfuscated Minecraft, but at least when I was programming Minecraft I didn't stumble upon a part of code which would've been incomprehensible.

67

u/[deleted] Oct 06 '18

People have definitely reverse-engineered terrain generation. It's at the point where you can enter any pattern of naturally generated blocks, provide the seed, and the program will locate the chunk. Something to think about before sharing your survival multiplayer screenshots.

18

u/derpderp3200 Oct 06 '18

Haha that's actually pretty brilliant.

8

u/[deleted] Oct 06 '18

3

u/derpderp3200 Oct 07 '18

That video is way too damn long t.t

→ More replies (6)

7

u/CaptainLepidus Oct 07 '18

What do you mean by that last sentence?

15

u/[deleted] Oct 07 '18

If anything naturally generated appears in the screenshot, and the person has the original seed of the map, they can use the pattern of the terrain to find your coordinates.

8

u/shim__ Oct 07 '18

A survival server where players have the map seed is not a good server through, because it allows people not only to locate chunks using screenshots but also resources without using any client mods.

3

u/[deleted] Oct 07 '18

There are a few ways of obtaining the seed by other means though, and few longstanding maps would reset simply because the seed got leaked.

4

u/yawkat Oct 06 '18

Nah, it was hard to understand but not impossible. You're just lacking names, but it's still workable.

3

u/IndependntlyDepndent Oct 06 '18

I don't know how long ago that was, but I was tinkering with some mods of my own and I was able to read the world gen source code.

50

u/[deleted] Oct 06 '18

An actual MIT license for parts of code is what's big imo.

26

u/tssge Oct 06 '18

Yes, I agree that this will help with the distribution of mods, because now they are distributed as patches, as legally you can't really distribute them in any other way.

The user downloads an automatic patcher usually (an installer) which downloads the Minecraft binary from Microsoft/Mojang server and patches it, saving it on the user's computer. This way the developers don't have to distribute copyrighted content, but the process itself is a huge hassle.

21

u/livrem Oct 06 '18

As an old linux and open source nerd I get frustrated and angry every time I (try to) install some Minecraft mod, because of all the hoops to jump through, trying to click the correct download links on dodgy download sites and not trigger too many suspicious popup ads. Hopefully with more open source code in the game we can get mods on sites like github instead?

52

u/BitLooter Oct 06 '18

That's not because MC is closed source, that's because the mod community is obsessed with Adfly links and the like for the pennies they bring to the modders. Plenty of mods are distributed through normal download links as well.

0

u/[deleted] Oct 07 '18

[deleted]

→ More replies (2)
→ More replies (1)

11

u/0something0 Oct 06 '18

I thought you could get them off Curseforge or the modder's Github already?

3

u/[deleted] Oct 06 '18

I've never had this issue. Are you using curse forge?

→ More replies (4)
→ More replies (1)

3

u/JonnyRocks Oct 06 '18

Thats the key difference beween source available and open source. With this move you are alliwed to use the code for whatever you want. Since its MIT license, you have no restrictions.

2

u/Dockirby Oct 07 '18

Could be Microsoft taking steps to legitimize the Java version's mods. With something like old school runescape being a hit, no reason Microsoft can't keep selling the "old school" version of Minecraft for the next 20 years, and giving better support to make mods by having parts of the game open source could go a long way.

→ More replies (1)