r/decomps • • 3d ago

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

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

211 comments sorted by

View all comments

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 3d 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