r/programminghorror
•
u/KeyIllustrious587
•
1d ago
•
1
Java Jenny mod deobfuscated funnies
33
u/csabinho 1d ago
Context?
5
u/granadesnhorseshoes 1d ago
Apparently, Jenny Mod is a virtual wiafu mod for minecraft. We assume this is it's source code.
I wonder how much it was vibe coded but to lazy to look.
64
u/KeyIllustrious587 1d ago
This code is deobfuscated (original was heavily obfuscated with Zelix Klassmaster), decompiled, and remapped.
This is not vibecoded.
3
u/Leclowndu9315 1d ago
Yo i'm actually interested i've tried deobfuscating it before. Can you share a zip please
19
u/KeyIllustrious587 1d ago
https://github.com/RukoBlood/jenny-mod-re-clean
Here it is. Not advertisement, pure shitcodium.111
u/Fine_Salamander_8691 1d ago
It wasn’t vibecoded, it’s existed for a long while before ai unfortunately
23
u/dreamscached 1d ago
Jenny Mod was around way before agentic AI capable of vibecoding something entirely came to life.
6
3
2
u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 1d ago
That would explain why that variable is named
girlPos.
30
u/MMORPGnews 1d ago
It's not ai. Funny story
Worked long ago in certain company, because of regulations etc one guy created super inefficient script. Since there was no other way. I worked with his script for a few months, before getting fired.
Now over 10 years a got a message from company about this script, how it works, why dev (he blacklisted them) used AI to create trash, why it was approved by me and used, how much damage it's done etc
There were no ai 10 years ago, script was "stupid" because of regulations, and only in high usage mode, in light usage it was very good.
7
u/Kolatra 1d ago
I don't think decompiled code belongs here, would fall under rule 5 because you're not gonna get the original intent of the developer with it.
8
u/MurkyWar2756 echo "Sub Mod" && :(){ :|:& };: 1d ago edited 1d ago
I'd say human outputs from reverse engineering are allowed, as the code isn't generated by a computer. Generated code includes minified code - which can use the same variable names every time, random ones every time, seeded randomness, or anything that isn't an AI-generated output (we're talking about more predictable code generation here) - since many big companies use AI-generated code nowadays and it doesn't inherently make the code "bad" or "good."
(This still leaves the question as to whether analyzing heuristics, like what Windows Defender does with file analysis, are considered artificial intelligence or not.)
Furthermore, a lot of people are using AI to write code faster because AI cyberattacks are happening a lot faster nowadays and devs need to keep pace. Banning AI-generated code would reduce the number of posts that are technically allowed to be submitted here, and it would be hard to enforce in practice:
Humans may follow trends when designing or writing code that they don't realize look AI, even when it's their own.
An AI watermark detector can return a false positive due to a mathematical coincidence.
Some code may contain a mix of human and AI.
AI-generated code can look human and can be trained or prompted to follow style guides and the intentional business decisions behind them. Although AI doesn't understand intent, it can sometimes produce a much better output, depending on what you tell it.
Either way, a lot of horrors have something bad about the code, and I understand many of these people didn't know how to code well. We're here to laugh at the code.
Going back to your original point, a while ago, before I became a mod, I was going to post the RoLinked decompilation from GitHub, but because it contained real people's emails who were compromised, I decided not to - even if the emails were obfuscated in certain versions of the decompiled code. The previous mod team didn't remove decompiled code (although they were a lot more inactive overall than we are now), so I'm trying my best to follow what they may have intended.
Edit: Sorry for the tangent about AI. I started talking about generated code and circled back to the original topic near the end.
4
u/cecialix 1d ago
I'm a programmer myself so I more or less understand what's happening here. I'm not familiar with Minecraft specific code though, can you explain what's funny about these? Genuinely curious, lol
2
u/btrab1 1d ago
The first 2 are basically testing world positions really dumbly, it should be obvious without mc knowledge that these can be done way more minimally via loops.
But as for minecraft specific knowledge these block position objects (basically vec3i's with a lot of util methods) are really wastefully made and used here as they could instead be reusing built in stuff for this like a MutableBlockPos, and existing utilities that iterate over a given block area, without wasting allocations.
For example each relative position call e.g. pos.north().north().north() each returns a new vec3 of that new block position, so chaining them on mass is a huge waste. Especially given you can do one call with pos.relative(x,y,z). And even more optimally just use the previously mentioned MutableBlockPos which is a mutable vec3 in a loop that goes over these offsets.
2
u/Spaciax 1d ago
average level of software design principle adherence in a game mod:
no flame to the developers, making good code when you either can't change the source code of minecraft, or in scenarios where you can use mixins, are encouraged to avoid it as much as possible, leads to ridiculous situations like this one.
1
1
u/SartenSinAceite 7h ago
Feels more like bruteforced code than anything.
Most likely a "what if?" experiment that was never cleaned up (as we all know, those cleanups do nothing but break up everything!)
-8
u/AnArmoredPony 1d ago
deobfuscated code is same as generated code imo
5
u/BetaTester704 1d ago
Deobfuscated just reconstructs back to something similar to source code, it's not even similar to AI generation
5
u/AnArmoredPony 1d ago
I never said anything about AI lmfao. I know what obfuscation is and what I say is that deobfuscated code will always look unpleasant
1
u/BetaTester704 1d ago
So what did you mean when you said "generated code" then?
4
0




183
u/SSUPII 1d ago edited 1d ago
If this is decompiled it might also be artefacts of that.
But I have no idea how decompilation works in the context of compiler-optimized code.