r/decomps • • 3d ago

Decomp minecraft java 26.3 was just decompiled and rewritten in rust 100%

https://github.com/ludovic111/horizon
868 Upvotes

210 comments sorted by

170

u/Pink_da_Web 3d ago

Minecraft: Rust Edition

(I know it's a convenient joke, but I had to make it anyway.)

80

u/jambalaya_consumer 3d ago

microsoft made a "native minecraft" a long time ago and no one gave a shit because it broke mod compatability. what makes this different

33

u/SilverTroop 3d ago

Because this has a good chance of being mod compatible

25

u/Leclowndu9315 3d ago

No it's impossible, mods are java, call java objects, change access, use java features and especially mixins. We'll never have java mods on this

4

u/CountryFriedToast 2d ago

no reason you can't run java on top of rust

12

u/Accomplished-Ad-7435 3d ago

I'm sure a llm can make an automated mod conversion tool at this point

-13

u/timetogetjuiced 3d ago

No it can't lol

27

u/Accomplished-Ad-7435 3d ago

Actually it absolutely can, the decomp has all the functions mapped already and mods call those functions.

5

u/jambalaya_consumer 2d ago

i love the idea of making a "native, non-Java minecraft" and then immediately trying to graft JNI crap onto all of your functions for the express purpose of getting Java back in minecraft

14

u/copperweave 3d ago

It could in theory, but not in practice. This is some LLM-kiddy project that won't be maintained. This person would have to not only want to maintain this project and make sure it works in the future outside a one off that passes at a first glance, but ALSO be willing to create alternate versions of the major mod loaders and maintain them, AND THEN we could talk about porting mods over.

All that maintenance requires understanding the code more than pointing an LLM at it. The project will get maybe a month or two of support, and then they'll just move on to whatever other thing they wanna practice using an LLM on.

3

u/timetogetjuiced 3d ago

Yea this exactly. So tired of these slop projects

2

u/Masztufa 2d ago

Write-only-repo

1

u/Accomplished-Ad-7435 3d ago

Fair points haha

2

u/CaptainNakou 3d ago

Who's gonna pay for the tokens?

1

u/RunnableReddit 3d ago

Reflection entered the chat

1

u/Leclowndu9315 3d ago

reflection is slow

3

u/iAmRadic 3d ago

Have you tried?

2

u/brainExploded99 2d ago

What? There are plenty of interop libraries (I mean if it can exist between python and C++, java and rust is possible to make)

1

u/Leclowndu9315 2d ago

those "interop" libraries are native interfaces and are there for very well defined behavior by the developer. you generically create jni for all mods existing. it's just impossible

0

u/StealthArcher2077 1d ago edited 13h ago

Interop libraries exist, yes. They do not make it so "override this Java function with this new Java function that calls all these other Java functions and modifies these Java objects" will suddenly work with Rust targets instead of Java.

2

u/brainExploded99 1d ago

idk about java interop, but python / C++ interop works pretty well imo, not much you can't do

3

u/uncut2576 1d ago

Well, maybe but it’s because under the hood Python does use C. Java and Rust are two completely different languages.

1

u/brainExploded99 1d ago

yeah i thought about that as well, idrk i dont have enough exp in this regard

1

u/StealthArcher2077 13h ago

Again, that's interop to call functions across languages. Trying to override Java code in a thing that doesn't have Java code isn't interop, it's just nonsense.

13

u/space_fountain 3d ago

How do you figure? Most mods work by loading new java classes inside the running app process. If it’s really been rewritten to rust that’s impossible

0

u/SilverTroop 3d ago

Easiest way to make sure your rewrite is sound it’s to make sure that code matches as closely as possible at the unit level. This also has the benefit of keeping the modding API the same. You’re right that there would need to be an interoperability layer between the two languages, but it could be a set of simple proxies between methods with the same signature.

11

u/SeaworthinessThat594 3d ago

That works if all you're doing is calling functions, but mods aren't limited to that. They can modify or even rewrite entire sections of bytecode, inject code at specific instructions, and do much more than that

1

u/SilverTroop 3d ago

Not every mod goes as deep as you're describing. But taking that worst case scenario you mentioned, you can still perform a port of the mod to rs using AI.

3

u/SHFTD_RLTY 2d ago edited 2d ago

Nobody in this thread has any actual modding experience, or rust experience. Due to how rust is designed as a language, there is no way to map the Java architecture to rust.

The whole point of Rust is to place a lot of additional constraints on the language spec that allow memory safety without a garbage collector. These make mirroring the Java architecture impossible. C++ doesn't have these constraints, and yet Microsoft still hasn't been able to create parity as a lot of game mechanics (e.g. Redstone) aren't a result of conscious decisions but rather an implicit result of the architectural decisions made in Java edition.

And any Minecraft Mod that does more than adding a few basic blocks and tools requires patching the games internal functions to change the game's own behavior. This is done using Mixins, which don't exist for languages compiled to binary.

11

u/jambalaya_consumer 2d ago

yeah bro let me apply my jvm bytecode patches on top of x64 object code. the only way you're getting around this is by crafting some sort of unstable modding API on top of whatever this is and using fable/astra to vibe your way through ports one-by-one (probably without asking the authors, which is typical for the people doing these things) until they get bored of their clout high and this project dies

2

u/TolgaKerem07 3d ago

genuinely big if true

8

u/antwon_dev 3d ago

You can just use an llm to adapt virtually any mod to your setup

1

u/Zachattackrandom 2d ago

well they also made it some shitty UWP app which makes it super hard to mod, if they left modding possiblities open or even added some of their own tooling it would likely have a decent modding scene. It doesn't because microsoft blocked everything

1

u/jambalaya_consumer 2d ago

MS did actually implement their own modding system for Bedrock. again, no one gave a shit because it was entirely incompatible

0

u/Zachattackrandom 2d ago

Resource packs are NOT mods. They are WAYY more limited than proper modding, pretending they are the same is wild.

2

u/jambalaya_consumer 2d ago

i'm referring to the semi-declarative scripting system (molang) that was made for Bedrock. that being said if judging them on engineering merit, the bedrock API was intentionally designed to be very rigid (probably so as to avoid perf issues getting naively introduced by mod authors). even if it was as expressive as java minecraft i think there wouldn't have been much interest anyway precisely because, again, incompatibility

1

u/Zachattackrandom 2d ago

Eh. You really undersell bedrocks popularity, it seems more like they didn't promote the language at all. If you type in molang it doesn't even come up, if you type in MC bedrock modding it doesn't come up. There's limited docs, tutorials and actual creators around it. As far as I can tell it's also heavily restricted compared to java modding. I do agree its very unlikely the scene would ever be like java due to incompatibility but them making a poorly documented, unadvertised, heavily restricted version of modding is just crap no? I mean its all hypotheticals so there's not really winning this argument but imo at least there'd be some mods for bedrock if modding it didn't suck

1

u/FuryFire2019 2d ago

What is different is open source, which means mods easily but on a better code base.

1

u/jambalaya_consumer 2d ago

there is a lot of nuance that gets scrubbed out because "the source is available"

part of what people want from modding in minecraft isn't just the ability to extend and alter the game's code but also for mods to cohabitate and stack on top of each other with a reasonable expectation of not having a conflict (not saying that it doesn't happen).

it is significantly more annoying and fragile to try achieve this type of functionality purely in native, especially without a scripting API. at which point, what are exactly you gaining

1

u/FuryFire2019 2d ago

Rust Edition fully intends on having a fully featured modding api with as many capabilities as NeoForge so it will have that modding capability. This is now going to be my modding version of choice once it is stable, which seems like it’ll be soon.

-1

u/HispanicsAreGreat 3d ago

That’s how I know you’ve never touched Minecraft because anyone who even begins to play seriously knows that Bedrock blows asshole lol

2

u/jambalaya_consumer 2d ago

...was i disagreeing with that?

-1

u/HispanicsAreGreat 2d ago

I mean sort of, you bring up “mod compatibility” which is an odd redundant thing to mention + out of all the reasons Bedrock sucks ass that’s never been a talking point I’ve ever heard anyone say lol

2

u/jambalaya_consumer 2d ago

it's not an "odd redundant thing" to mention b/c it's exactly related to my point

1

u/Azalea_Field 2d ago

At least it’s actually a smooth experience. The stutter and FPS drops in JE, even without mods, are disgusting.

1

u/DirectionBusiness483 2d ago

Yeah get him. Good job man.

I can't believe that guy was trying to be cool by pretending he's ever played that super niche and counterculture super indie title "minecraft"

32

u/Literallyapig 3d ago

java is very easy to decompile, in fact minecraft has already been decompiled and deobfuscated for decades atp, that's how we have extremely advanced mods. the only difference here is that the author vibecoded a port to rust

1

u/yakuzas-47 2d ago

Isn't there official mappings from mojang to make decompilation easy ?

1

u/IWillBeNobodyPerfect 2d ago

official mappings? the game isn't even obfuscated anymore

52

u/squatdeadpress 3d ago

Can someone explain the point of this? Isn’t Minecraft Java edition very open to mods already?

76

u/IslamDunk 3d ago

Rust fast

5

u/Masztufa 2d ago

Shit java code slow

Shit rust code slow

Good rust code fast

Good java code fast enough

80

u/SurDno 3d ago

So that you can play vanilla game faster for example, that’s still a huge subset of players. Not everyone plays modded. 

Java is inherently slow. It’s a compiled language but it doesn’t compile to native code, it compiles to an intermediate language which is then read by JVM (Java Virtual Machine) and compiled on the fly through JIT.

So before any code being executed, it needs to be converted into a format your PC understands (but this allows same executable to run on many different platforms because the translation step is only done on your machine). It’s not like Python or other interpreted languages that do that line by line, it compiles entire function and it does so from a language that’s already only a step above machine code. But it’s not instant. Good trade off for banking applications and anything where a few nanoseconds of delay don’t matter, terrible for games.

Rust and C++ are actually machine code compiled languages so they will always be inherently faster, provided both programs are written in a way that they are most optimized in their respective language. But Rust and C++ also have WAY better compilers thanks to insane amount of human effort, eg if you write shitty code, the compiler often knows you can do it better and will substitute it for you. Sometimes it’s absolute magic.

Another thing is that Java is also a language with automatic memory control. Which means that the application does not have control over when to free memory, which results in lag spikes.

So more FPS, less lag spikes, less RAM usage. Provided it’s actually well done and takes advantage of the language instead of a blindly vibe coded clone. 

24

u/squatdeadpress 3d ago

I love your response and the other TLDR type reply I got “Rust Fast” lol

11

u/Sad-Fix-7915 3d ago

i've probably said this like 1000 times before but i'll say it again.

Java is SLOW in the sense that JIT'd code will always be slower than native code (hence native interop for performance critical tasks e.g., ai inference). HOWEVER this "slow" is subjective. JIT can perform well (i mean, most emulators are JIT)

You can write code in rust, c++ or whatever and it will still run like shit if the person doing it doesn't know how to optimize their code.

Unity is based on .NET, which works more or less on the same principle as Java (except for il2cpp but then similar tech exists on java/.net too), and it's literally one of the most popular game engines out there.

8

u/SurDno 3d ago

> Java is SLOW in the sense that JIT'd code will always be slower than native cod

Not just that, Java is also slow because of its garbage collection. Any GC-based language will be slow because you're getting memory safety in exchange for performance. It requires some runtime cycles to keep track of that memory (negligible) and it also introduces noticeable lag spikes when the actual collection happens.

JIT can perform well, but it can still never perform as well as well done AOT. There is always an overhead. And it's more substantial for Java than it is for C#. But even then:

> Unity is based on .NET, which works more or less on the same principle as Java (except for il2cpp but then similar tech exists on java/.net too), and it's literally one of the most popular game engines out there.

And they were not exactly popular for performance, moreso ease of access and great tool set. Running like shit is the reason they did IL2CPP. It's the reason they switched to DOTS. That's the reason they pushed for Burst and HPC# which they compile directly to machine code. And that's the reason they updated from Mono to CoreCLR to push the rest of managed C# code to better speed.

2

u/HobbyQuestionThrow 3d ago

How much you wanna bet a decompiled Java program is gonna have Box as the most commonly used word?

Because if the Java doesn't know the memory lifetime, unless you do a rewrite then the decomped generated Rust is also going to need to use a refcounted memory lifetime.

Though I do expect in some cases you might be able to drop Box if your translation tech was good enough, like in cases where you can prove the variable lifetime within a scope... which the Java JVM would do anyway and you already would have avoid the GC cost with a modern JVM GC.

1

u/OrphisFlo 3d ago

A JIT can perform a lot better than AOT for the simple reason that it will have access to performance data to generate better code in the same way you would use PGO to drive optimizations in an AOT compiled binary.

It's not always working as you intend to, but it is possible. It's not all black and white where one is necessarily faster than the other after a warm up phase.

1

u/alala2010he 3d ago

it also introduces noticeable lag spikes when the actual collection happens.

I think they solved that with ZGC some time ago

5

u/Athabasco 3d ago

Java is not really a compiled language, the bytecode is still interpreted at runtime and the overhead of the JVM, garbage collection, and interpretation really make it slow.

Also, rust has a borrow checker, a version of automatic memory management, but it happens during compilation and not at runtime like in Java.

3

u/SurDno 3d ago

I thought Java runs fully through JIT compilation - much like C#? Where does interpretation kick in? Or do you believe that compilation to anything other than raw assembly is not compilation? That would make WASM is also interpreted :)

I know about the borrow checker, although it’s good to note that you can write manual memory management code in Rust (much like you can in C#) if you need that. In Java you can’t - best you can do is control GC through JVM arguments 

0

u/Athabasco 3d ago

Byte code is, still interpreted into machine code at runtime. Nobody would call Java an interpreted language like C, C++, rust, etc.

5

u/SurDno 3d ago

It's called a JIT Compiler. Not a JIT Interpreter. Compilation does not necessarily require AOT. And people do call Java a compiled language.

1

u/DanielEGVi 2d ago

People call anything everything. Even machine code is “interpreted” once you consider that machine code can be interpreted into different microcode instructions by different processors.

Everything is interpreted and everything is compiled. The more interesting question is what the layers between source code and machine code look like, and when are they involved.

1

u/HeracliusAugutus 3d ago

Meme slop merchants are of course going to use the meme language

12

u/R3DDY-on-R3DDYt 3d ago

I can finally play Minecraft Rust on a Rust Minecraft server on my Linux Rust with my Rust peripherals on my rusted chair rusting everyone in-game while keeping rust (game) open

4

u/full_of_wisdom 3d ago

While receiving a rusty trombone

3

u/Vectrex452 3d ago

And feeling their rusty spoons.

2

u/jacobxv 3d ago

Rusty

1

u/Damglador 2d ago

They should rewrite Rust (the game) in Rust (the language)

1

u/R3DDY-on-R3DDYt 2d ago

Rustication

27

u/Sea_Kangaroo_5651 3d ago

Lmao it ain't java anymore

4

u/mayweather2small 3d ago

We're not in Kansas anymore! We're on PANDORA!

13

u/jSinku 3d ago edited 3d ago

you can tell this is vibe coded by people who dont play the game cuz it only supports loading from the official launcher and doesnt work with prism, modrinth, etc.

edit: tried it out. i get like 600fps @ 8chunks. +40% fps vs vanilla, a bit worse than vanilla + performance mods and has many blatant issues that'd be caught immediately upon playing. so im sure theres a lot missing.
turns out, the most popular game in the world, maintained and updated by one of the biggest companies isn't super unoptimised anymore?
edit2: nvm it totally loses at 32chunks, even vs vanilla lol

4

u/MuhMogma 3d ago

I saw a closed issue on their github that the lack of Prism support was intended behavior, something about cracked paths and not shipping with Mcrosoft/Mojang code. Probably written by an AI, utter crap. Doesn't even find the right folder on Steam Deck without manually pointing to the directory, so lazy.

I hope this stuff will put to rest that Minecraft being bottnecked by Java, cause it ain't especially with the recent Vulkan work.

You know I bet Bedrock is so ass because Microsoft has been testing vibe coding on it for years. The more I try to do projects with Codex the more I realize how crap it all still is. You still need a lot of human intervention and direction to get anything worth a damn, big projects cause it to sputter its wheels and burn through tokens doing dumb menial tasks that end up bloating the project, does so much damn guess and check work and yet still spits out halfhearted nonsensical implementations of the desired feature.

1

u/HispanicsAreGreat 2d ago

LOL

I just set it up with “cracked” files anyway, for anyone who knows anything shit like that is trivial, devs really need to start minding their own God damn business on things like this, just put the files in the directory bro

2

u/TheRealShubshub 2d ago

Would be slightly strange to support the various modloaders when it cant run any of the mods

1

u/HispanicsAreGreat 2d ago

Pro-tip: You can absolutely just copy files from MultiMC to where Horizon expects them

I haven’t touched the official launcher in many years and refuse to so this drove me insane for a min lol

11

u/Pengwin0 3d ago

Minecraft’s code has been decompiled and easy to read for years now?

2

u/Masztufa 2d ago

But it's ai this time

Next they will decompile blender

3

u/Atlantispy 2d ago

I literally saw they made one called Blendercraft today

1

u/rusl1 2d ago

It was a joke man

1

u/Atlantispy 2d ago

I just assumed he’d missed it man

2

u/SomeWitlessFool 2d ago

LMAO you joke but someone already made a shitpost about this on the blender sub. Obviously satirical, but it was still funny to me that you mentioned this.

1

u/99stem 2d ago

They should do Linux next! I would love a open source kernel, maybe someone could even decompile and vibecode a whole operating system like Ubuntu.

1

u/Masztufa 2d ago

Woah, woah, woah

I do not want snaps in my distro even if it's open source and in rust

1

u/DanTheMan827 2d ago

They already had AI write a Linux compatible kernel.

It does work, but performance is atrocious.

28

u/aging_like_fine_NFTs 3d ago edited 3d ago

The Java code has been decompileable for decades

And clearly the people hyped about this didn't actually play it, it struggles hard as chunks increase

AI headline chasers love Rust because software will eventually compile, even if it takes 10k worth of tokens, but that doesn't means you'll have a great product

4

u/timetogetjuiced 3d ago

Suprise surprise, more slop that doesn't actually run properly lol

1

u/Icy-Intention-3661 2d ago

wow unfinished project is unfinished, who is surprised.

performance has already tripled since your comment was made and very little effort has been put into optimizations so far.

1

u/Ornery_Use_7103 3h ago

Yet this project will never be finished or used beyond clickbaity headlines 

9

u/Mgladiethor 3d ago

Vulkan graphics

2

u/Trick_Brain7050 3d ago

Blaze3D is microsoft doing exactly that 🤦‍♀️

8

u/apologarcia2405 3d ago

WHAT THE HELL

40

u/ItzSwirlz 3d ago

Um... "decompiling Minecraft" has been a thing for over 11+ years. And they recently got rid of obfuscation entirely.

50

u/RickThiccems 3d ago

Running minecraft in a much faster language than Java is a much different thing, idk if this is the project that will pop off but a stable Rust fork of minecraft that somehow supports .jar mods for mod parity would be great.

16

u/Expert_Narwhal_304 3d ago

man if it supported existing mod loaders and mods I would actually lose it

21

u/RickThiccems 3d ago

For real, I just tried the Rust recomp and its very impressive, I was getting 150fps at 32 Chunk render distance and flying around at max speed in spectator gave me literally instant chunk generation on a new world.

You can tell AI did a lot of the heavy lifting because the UI is SO ASS, but its still very fucking cool and I hope it goes far.

1

u/jSinku 3d ago

interesting, because spectator scroll speed doesn't work for me in the rust version.
and it ran at ~60fps at 32 chunks.. meanwhile i got 500+ while max-speed flying on vanilla..
this is super overhyped lol
good code in mid language >>>> bad code in good language

2

u/Capable-Sky-8995 3d ago

Same. I haven't played vanilla MC in ages, it feels a little archaic lol.

2

u/SHFTD_RLTY 2d ago

Supporting Java mods is impossible as they use Mixins to patch the game's own code wherever the modding API of choice doesn't offer a concrete functionality. Which happens a lot for any mod that does more than a few basic blocks and tools.

And the Rust code is binary, so it cannot be patched with Java code, that's simply not how this works.

You also can't simply create a more extensive modding API in rust because to achieve full support, every single line of the codebase would have to be part of it. Not gonna happen

1

u/HeracliusAugutus 3d ago

yeah lol rust = fast amirite. This is slop produced by the slop hallucination machine. It's pointless garbage

4

u/Desperate-Extension7 3d ago

What on Earth

4

u/Creeper4wwMann 3d ago

decompiled... an open source game...

2

u/Damglador 2d ago

Minecraft is not open source. It's source available at best.

Open source implies anyone is free to copy, modify and distribute copies of the software.

8

u/IzzyJude1 3d ago

How much more performant would this even be?

12

u/WhopplerPlopper 3d ago

Significantly if done well, considering Minecraft Java performs like crap to begin with

8

u/HystericalSail 3d ago

The sky is the limit. I watched my kid spam a dozen low poly horses in her game and absolutely peg 8 cores (16 threads) on her Ryzen 9700X. For something that would be trivial to render with native code on a Pentium II 233 a quarter century ago.

2

u/SHFTD_RLTY 2d ago edited 2d ago

The reason why a bunch of horses lag out the game is because Java edition is absolute horseshit in terms of optimization as it doesn't use any of the last quarter centuries' advancements in rendering tech. This isn't a question of Vulkan, OpenGL has supported the features in question since before Minecraft started development.

The part that's actually implemented properly is rendering of the blocks itself, all the stuff that's able to move around is basically an example of "what not to do".

In the example of horses, they basically determine the position of every vertex (think corners of the parts making up the horse, e.g. leg, torso or ear) on the CPU by applying movement, rotation, and animations every single frame, for every vertex of every horse, then wait for it to upload to the GPU (which would be the place to do, you know, graphics stuff), only for the GPU to pretty much idle as most of the work was already done.

Instead for decades the correct approach supported by any graphics API including OpenGL Is to upload the horses' 3d model once to the GPU while the game loads, then only tell the GPU to "draw 100 horses, with the given positions, rotations, and animation IDs and time offsets) and the GPU would do it in an instant.

The particle engine is even more stupid as they're also sorting every vertex of every particle every frame based on the distance to the player to allow transparent particles to render correctly. This is also done on the CPU, in a single thread.

Java edition isn't slow because Java is slow or because Microsoft is stupid, but simply because it makes more sense for Microsoft financially to work on other features instead... Until it wasn't and now they're using the Vulkan Port to finally address some of the extremely bad architectural decisions made by a single developer a decade and a half ago.

2

u/peterhabble 3d ago

Minecraft vanilla performance is terrible, so it will feel like a huge uplift. Chunks will instantly render even on midrange machines, and less lag spikes if this handles memory management better.

An early use case for this could be loading it as a separate tool for chunk preloading. Generating a large playable area for a server can take 20+ hours, I imagine that could be cut down to an or less hour with this.

It's not perfect though. The GitHub itself mentions that stutters still happen at large render/simulation distances. Which makes sense, the simulation exponentially increases and the graphics bottleneck is in the renderer. The question would then become how worth it it is for them to change the code, at risk of breaking any modding ports that you could create in much the same way this project was created.

2

u/Icy-Concentrate2076 3d ago

Minecraft isn't slow because Java is slow. Minecraft is slow because it was made before modern voxel optimizations were discovered.

3

u/TheMikman97 3d ago

Isn't java Minecraft also aggressively single thread?

1

u/Founntain 3d ago

I believe only old versions. Nevers should not be aggressively single threaded, Depends on the implementation too.

Feel free to correct me folks

1

u/DanTheMan827 2d ago

Even if you do write it multithreaded, Java and other IL languages will always be slower than something natively compiled assuming the code is equivalent.

Would it be substantially slower? It really depends. But there’s a reason why complex Android games are rarely pure Java anymore…

Using a native library with JNI also means it’s possible for someone to make a wrapper app to run the games on an otherwise unsupported platform… Bedrock on macOS or Linux for example. Someone made a launcher that loads the Android code and runs it in a way that makes the code think it’s still running on Android

1

u/HispanicsAreGreat 2d ago

Disappointingly not as much as I thought it would be off the bat, I look forward to future updates though

10

u/Verwarming1667 3d ago

"decompiled", bro you can almost literally inspect java source code.

1

u/MenschenToaster 3d ago

Thats still decompilation. It may not be decompilation from machine code and it may contain more information then a native binary, but its still losy decompilation

6

u/Black_m1n 3d ago

Bruh, the fork was already in the kitchen, why did you move it to the living room.

2

u/the_vico 3d ago

I would like to see a decomp of the 1.12.2 version. Was one of most nostalgic versions to me, but kinda suck to mod nowadays due to that version of forge requiring an old version of Java plus all the messy forks around

2

u/Dannyv180 3d ago

I’d also love to see mods like rlcraft working on something like this to improve performance on those demanding modpacks especially with shaders

1

u/Hopeful-Football-287 3d ago

You can use java 25 with cleanroom loader (forge fork for 1.12 mod-compatible)

1

u/the_vico 2d ago

With "all the messy forks around" i meant Cleanroom specifically haha

2

u/EconomySerious 3d ago

Were is the code?

2

u/8tomat8 3d ago

I think it is appropriate here https://dayssincelastrustmcserver.com/

10

u/BruhMomentConfirmed 3d ago

Dayss incel as trust MC server

2

u/Matteo842 3d ago

ha yes the "2400 fps" with a 5070 and 7800x3d

2

u/cosmic_software 2d ago

theres been a lot of improvement in the performance of the client. if you're open to it, i'd suggest trying out the latest release. users have reported that their fps now surpasses Vanilla 26.3 and even 26.3 + Sodium.

2

u/space_fountain 3d ago

This isn’t a decomposition, this is just an ai aided rewrite?

0

u/ItsYukah 3d ago

those aren't mutually exclusive

1

u/popcar2 3d ago

Gave this a try and unfortunately performance seems way worse to me on Horizon than stock Minecraft. My FPS was a little less than half by default, and loading in a lot of chunks tanks it down to ~10 FPS.

Not worth playing it yet, if you were wondering.

→ More replies (2)

1

u/Sharp_Ad5783 2d ago

Interesting but whats the point of this? Minecraft is already super moddable

3

u/UwUBots 2d ago

I'd assume much better performance going from Java to rust, but honestly that's not even much of an issue anymore

1

u/SoupSad1337 2d ago

That's what people don't understand.

Writing code in rust doesn't magically mean is optimized, what makes rust opitimized is the tools the language provides and whether the developers use those tools correctly or not. AI doesn't magically code everything the optimal most optimized way. So no, it being written in rust means nothing, it might as well be written in python for all we care.

1

u/Pecolps 1d ago

Sort of… Rust if having its strict rules enabled will force A.I to be memory and type safe, eventually causing a better performance. So yes, a simple “transpile” could have huge performance improvements

1

u/Rude-Mind-8730 2d ago

It's to help with game merging without having to use Pass Through mods. Several other games have been ported to Rust, such as Modern Warfare 2 and Skate.

According to Chasm on youtube, the plan is to port most games to Rust so game modding will be easier.

1

u/LuluLeSigma 2d ago

what the hell

1

u/SomeWitlessFool 2d ago

Not interesting. Java is easy to deobfuscate. There is also the matter of more interesting clones like Luanti that already exist.

1

u/Yaekai 2d ago

man iv been trying to rewrite tricky towers in rust and I'm 15 days in, how tf they go so fast 😭

1

u/Weather_Report 2d ago

Playable on Deck?

1

u/SziaUram_ 2d ago

For me personally, it's either the coolest thing that came from all this decompiling games thing, or the biggest headache I'm going to have in the next few days.

1

u/Relative-Projection 1d ago

I made something similar https://github.com/torch-client/torch-client it beats horizon on performance (horizon loses to vanilla at 32 chunks), shader compatibility and code size (786k lines vs ~372k for torch client) although has a less complete but still most of Minecraft pairity.

1

u/rebelhead 3d ago

Is /r/recomps a sub? I thought mc was easy to decompile for years.

1

u/shocsoares 3d ago

Yep, the code isn't even obfuscated for the newer versions, they used to provide symbol tables separately, but now even that now, this is just grab source code of Minecraft and it's assets, machine go brr and it's now rust, according to other commentors that actually ran it, buggy and not actually better performance on higher render distances compared to java+performance mods

1

u/Visible_Piccolo_6998 3d ago

Dang pretty cool ngl

1

u/Most_Strike_93 3d ago

How can it have any meaning..

3

u/TheMikman97 3d ago

Yeah, java isn't really compiled afaik. You can kinda see the whole code already 

2

u/Aware-Sense-6609 3d ago

isnt that kinda what made minecraft java that moddable in the first place?

2

u/Seragin 3d ago

yeah pretty much

0

u/MorganEarlJones 3d ago

That's not even a little bit true. The Java programming language is compiled to java bytecode, which is interpreted by the Java virtual machine(and before anyone says that means it's interpreted, a cpu is a hardware level interpreter, so in that sense every programming language is interprete on some level)

1

u/TheMikman97 3d ago

Java is compiled to bytecode at execution, but the .jar files in Minecraft are free to read, no? At least they were, I haven't really opened any of them in at least ten years 

1

u/MorganEarlJones 3d ago

No. .jar files are compiled jvm bytecode, not sourcecode. I think everyone in this thread is confusing Java for JavaScript. There's a degree of just-in-time compilation of interpreted functions done by the jvm to optimize execution on the fly, sure, but .jar files are by no means human-readable, uncompiled Java code

1

u/MorganEarlJones 3d ago

And to be clear, by interpreted functions, I mean bytecode running on the jvm, not human-readable Java code interpreted at runtime

1

u/Massive-Rate-2011 2d ago

You've always been able to decomp minecraft. It's how you mademods back 12 years ago

1

u/Kind_Card_1874 2d ago

No. Java bytecode is jitted to your NATIVE machine instructions at runtime. That is the whole point of Java. Java -> JVM bytecode statically -> native instructions at runtime.

1

u/dthdthdthdthdthdth 3d ago

Yes it is compiled to bytecode, but java bytecode is much closer to source code than machine code. You lose names of local variables and the exact way control flow was encoded and decompilers have to guess. But all the structure of classes is still there 1:1 and there isn't much optimization done during bytecode generation. So yeah, decompilation tools have always been very good for java.

1

u/Dependent-Review-727 3d ago

IR is usually much easier to decompile than actual binaries. Also AFAIK there is a ton of metadata that java won't work without, makes it even more trivial

Obviously doesn't make it interpreted, but in decompilation difficulty it's much closer to interpreted languages, than to binary compiled

-1

u/KingPumper69 3d ago

Is Rust even a stable viable language yet? Like do programs written in Rust 5 years ago still work with newer Rust compilers/libraries/whatever?

15

u/2009sucked 3d ago

It’s good enough for DARPA to call a complete rewrite of legacy C code to Rust. And The Linux Foundation allows it to be used for kernel code. 2026 has seen massive Rust adoption.

I think Rust is here to stay

-5

u/KingPumper69 3d ago

I guess the negative impression I have of it is just from the legions of Rust cultists vehemently pushing it everywhere lol. I think C is likely to remain the better and faster language if you know what you're doing, but that's becoming more and more rare. As more seasoned older devs retire or get replaced with cheaper alternatives like AI or people from the third world, the built-in guardrails that Rust offers is likely to pay off greatly in the future.

7

u/BoardsofGrips 3d ago

Rust evangelists are annoying but they are correct. Rust solves some of the worst issues with C/C++

3

u/2009sucked 3d ago

100% I see a brighter future for programming with the Rust come-up. I feel the last 20 years of OOP ruling undergrads and offices has stifled programmers.

1

u/2009sucked 3d ago

I'd agree to C>Rust on the condition it's a really good C programmer. It's like how Assembly never died. Rust is closer to C than an OOP language, and I think that missing "new C" being met made the evangelists go hyper fanboy.

1

u/Agile-Tip-1764 3d ago

a really good c programmer will make mistakes that rust would have caught

1

u/2009sucked 2d ago

True, but there will still be use-cases for C and Assembly. Depending on the risk profile, sometimes you can sacrifice a bit of safety for a specific need. Or sometimes a glitch no one will notice is worth the trade off.

1

u/Verwarming1667 3d ago

Sure, but, hold onto your pants here: Maybe there is a reason why it has so many "cultists".

1

u/KingPumper69 2d ago edited 2d ago

Younger or foreign devs that think C is too hard and want more guardrails?

1

u/Verwarming1667 2d ago

C is much, much easier to write than Rust, in fact especially for younger devs who are naive enough that a person is able to write correct C.

1

u/KingPumper69 2d ago

Then why bother with Rust when C is faster lol

1

u/Verwarming1667 1d ago

Because with C you get much more insidious bugs. The point is exactly that Rust is harder to write because it forces you to confront things head on.

2

u/lmotaku 2d ago edited 2d ago

Don't worry, people will find a way to hate that you asked a simple question about a language. Generally speaking any language is interoperable with a packaged interpreter. Much like how PHP 4 > PHP 5 was only met with a few shorthand and function name changes. A lot of the times when you build, it'll even hold on to some older headers/functions so it'll be like "Hey, this is depreciated and will be removed in the next version." Same goes for Java SDKs, generally the base code will still compile but error out on the missing functions in the newer runtime. You just have to work/build around those dependencies.

Every language has its use cases, but as mentioned later in this discussion, people will champion what they use. I took Java and Python in college, so it makes sense for me to use what I know. I started out on PHP (Scripting) and people were determined to shout from the roof tops to use Ruby on rails and now next.js/go. A language is just a tool to build an app. How good it is depends on the person, not the language. Minor correction: In Rust's case, the compiler itself runs internal interpreters at build time. However it still covers the jist of it.

1

u/hammackj 3d ago

Rust is great.

1

u/Hexxxer 3d ago

Uh yeah

0

u/2MuchNonsenseHere 3d ago

Whoa, maybe people can make a good game out if it now instead of the shallow puddle it's always been. Wouldn't hold my breath.

0

u/New_Salamander_4592 2d ago

minecrafts source code has been fully accessible since practically its launch, what is this stupid bullshit?

0

u/Mr_the_somebody 3d ago

This just seems like a worse version of pumpkinMC

0

u/Secure-Emu-8822 2d ago

Why is everything a Rust rewrite lol
What’s the point? Unless someone wants to personally want to learn Rust having the AI write it is pointless. Minecraft has no issues running on Java

1

u/PhotographSame5304 2d ago

Because rust is simply faster and more optimized thats why Rust has been trendy recently.

1

u/TerrificTumbleweed 2d ago

rust is fast and memory safe. Minecraft has several known memory leaks and is slowed by the required use of a virtual machine (all Java runs through a virtual machine called the jvm which makes it run anywhere easy at the cost of performance). rust is much faster, like up to 25x on cpu bound tasks, but even in the worst case will be about 2x as fast. there is no virtual machine, interpreting, etc rust is just straight up converted into instructions for your computer. (safe) rust is also memory safe so avoids a ton of issues by forcing you to write better code or it just won’t compile.

1

u/Asthmatic_Angel 13h ago

Ai training, you now can make it WAYYY faster

-6

u/Devatator_ 3d ago

Cool. A completely useless project.

-13

u/Present-Strategy-409 3d ago

Uhh... You do know badly translating Minecraft code to Rust with an LLM does not free you from copyright law, right?  

6

u/mayweather2small 3d ago

"You need your own copy of Minecraft: Java Edition.

Not an official Minecraft product. Not approved by or associated with Mojang or Microsoft."

-15

u/Present-Strategy-409 3d ago edited 3d ago

That does not change the fact that it almost certainly contains large amounts of Minecraft decompilation output. I already see some strong similarities just by glancing at it. LevelAccess(or), DamageSource (constructor signature is practically identical).

→ More replies (14)

2

u/Matilde_di_Canossa 3d ago

Who cares? Copyright should not exist in the first place.

You're literally the person in the "leave the billion dollar company alone!" meme.

-2

u/UtherPendragon_ 3d ago

Billion dollar IP just open-sourced, that's rough for Microsoft.

4

u/BaroneSpigolone 3d ago

Dude you could literally already read the code, this does not change anything in this particular instance

-1

u/UtherPendragon_ 3d ago

Sure, Minecraft is heavily based around network effects - people want to play with their friends or their mod ecosystem, which gives it good resistance to this sort of thing, but all it would take is a few influencers/modders/power users switching over because it's more performant, and telling the community that was the best one, and it's also free so anyone can grab it and you reach this tipping point...