Eh it'd have only taken a few minutes to do. Just write the first line out in a template form, then copy and paste it, then fill in the few things that change each time (and also do multiple templates).
Don't even have to do that. Open the file on an android phone. Then let Google extract the text using Google lense. Then read through once and fix obvious issues. To get something that isn't as good as manual work, but maybe good enough?
GameRegistry.addShapedRecipe(new ItemStack(blocks[e], 1, e), basics[1], 'T', new ItemStack(items[0], 1, 0));
GameRegistry.addShapedRecipe (new ItemStack(blocks[e], 1, 1), basics[1], 'T', new ItemStack(items[0], 1, 1));
GameRegistry.addShapedRecipe(new ItemStack(blocks[0], 1, 2), basics[1], 'T', new ItemStack(items[0], 1, 2));
GameRegistry.addShapedRecipe (new ItemStack(blocks[e], 1, 3), basics[1], 'T' new ItemStack(items[0], 1, 3));
Not OP, but I'm also a transcriber, so I can provide some insight here.
OCR is actually pretty useless when it comes to code posts. It's pretty good for clear screenshots like you might find on Twitter, (though it still makes mistakes even with those sometimes), but I've found that most well-known OCR's, such as Apple's, Google's or ocr.space, actually do worse with monospace fonts (and thus code) than they do with normal fonts; I think probably they're trained on the normal fonts, so when they get the monospace they tend to have a hard time.
Particularly with code, they don't preserve indentation, frequently misinterpret characters (one of the most common ones is 0 becoming Ø, but there are many others), often insert spaces in strange places or have odd choices of where to break lines, and generally just create a mess that's more confusing and time-consuming to fix that doing a post from scratch. It's especially bad with large blocks of code like this post.
I'm curious, but what is the point of transcribing code? Correct me if I'm wrong but the point of the transcriptions are too assist people with vision impairments, and I don't think many of those people can code.
I spare the compilers entirely by just opening command prompt and typing “java Main.java” because I’m too impatient to wait for the compiler I care about compilers
No experience with MC modding and cannot see the whole picture from here, but if you see yourself repeating the same thing with slight differences, re-think your approach. Find everything that's common and refactor those out (logical grouping, default parameters, overloading, inheritance, pre-built options etc.). Do things in a loop. If you find yourself accessing array members by index array[<number>] often, you are probably doing something wrong.
Meh for hacks/mods/reverse engineering stuff function takes priority over elegance. I've hacked together many shitty things when it's just for modifying an existing application.
Let's not forger the rows and rows of 'ModLoader.registerBlock(...)' and 'public static final Block myBlock = new MyBlock().setHardness(5.0F).setResistance(10F).setBlockName("myblock")...'
16
u/Professional-Key-266 Apr 27 '22 edited Apr 28 '22
I agree, but I'd recommended past you to stcik to json recipes
257
u/[deleted] Apr 27 '22 edited Apr 28 '22
Image Transcription: Code
I'm a human volunteer content transcriber and you could be too! If you'd like more information on what we do and why we do it, click here!
401
u/terablast Apr 27 '22 edited Mar 10 '24
ring nutty meeting beneficial teeny psychotic paint rustic imminent toothbrush
This post was mass deleted and anonymized with Redact
46
u/FGaBoX_ Apr 27 '22
what a terrible day to have eyes
58
u/camelonarock Apr 27 '22
How would one optimize it?
14
u/pentesticals Apr 27 '22
Meh for hacks/mods/reverse engineering stuff function takes priority over elegance. I've hacked together many shitty things when it's just for modifying an existing application.
9
u/sigmaclientwastaken evil Apr 27 '22
you haven't used forge until you've done something similar to this
8
u/UNF0RM4TT3D Apr 27 '22
WAIT, this ISN'T the right way to code in Java?
14
u/CodingInMyCup Apr 27 '22
This is the equivalent to saying “back in my day we walked up hill both ways to school” in code.
4
u/Kresenko Apr 28 '22
Let's not forger the rows and rows of 'ModLoader.registerBlock(...)' and 'public static final Block myBlock = new MyBlock().setHardness(5.0F).setResistance(10F).setBlockName("myblock")...'
1
u/shu67 Apr 27 '22
Would love to see how you’ve improved throughout the time
1
u/Bowiemtl Sep 29 '22
correct me if I'm wrong but aren't recipe shapes stored in JSON now? Or was this made before that was supported in the first place?
1
u/protocod Apr 27 '22
Wow
1
u/dominonermandi Apr 27 '22
I actually shuddered when I saw this. 😂
1
u/[deleted] Apr 28 '22
Pixel by pixel FTw!¡
1
u/gamma_02 Apr 28 '22
Hahahaaaaa
Json fixes that in recent versions lol
Source: I'm a mod dev myself
1
u/Lothrazar Apr 28 '22
Ive seen worse in minecraft mods
1
u/EvilStevilTheKenevil May 12 '22
On the one hand, Minecraft Java Edition is (or at least was) total spaghetti under the hood.
Oh the other hand: Oh dear god what does this even do?
1
u/Luuuuuis Apr 28 '22
Aw man you dont want to see my first tries xD
Dont look here xD: https://www.toptal.com/developers/hastebin/oneqovajit.swift
And yes this was used on a public server for more than 100 ppl at times
0
u/[deleted] Apr 28 '22
[deleted] — view deleted comment