16 posts
Posted 05 February 2014 - 02:13 AM
I wanted to have an autocrafter driven by data files, without having to manually enter all the data. I had always assumed Minecraft and mods all had these recipes in data files, but looking into it, I guess they are all coded in. I was hoping I could get a dump of these recipes–particularly the shaped and shapeless ones rather than any involving equipment beyond a crafting table. Is there anything for acquiring that with ComputerCraft and possibly peripherals? To be clear, I'm talking about dumping… everything.
The idea I had was to build something like a graph structure from everything so with a Minium Stone perhaps, I could take cobblestone to most arbitrary things. I suspect there are some strange problems like a possible cycle. I also wonder if the program would end up getting terminated if I actually ran it on a turtle for the amount of junk it's trying to do.
I am assuming I'll have to end up looking at one of the recipe mods and make my own little in-game dumper mock item that will vomit a file to disk, and run that once. I just didn't want to get into that if I could help it.
63 posts
Location
Mannin
Posted 05 February 2014 - 03:14 AM
you can't get at that with CC as far as I know…
this mod has all the code you need in its main class, from the look of it… you could strip this down to its bare bones and just dump to a file where it's doing its
for (Object orecipe : CraftingManager.getInstance().getRecipeList()) { loop.
https://github.com/Flow86/Advanced-Recipe-Generator-Mod/blob/master/src/main/java/arg/ARG.javai noticed in DW20 1.5 there was a minium stone bug with turtles… you could use them forever without the stone degrading… i set up a production line of 4 x 8 or something turtles… first line making cobble, then into clay, then into iron, then into gold, then into diamonds - or something like that - with a cobble genning TE device to keep them full… they needed no fuel themselves, they just used compare and rotation to grab, check it crafted, pass on to the input chest of the next turtle… it was ace to watch :)/>
7508 posts
Location
Australia
Posted 05 February 2014 - 03:21 AM
one thing to note is that when you make the mod you've got to make sure that you generate the recipe dump only after the internal server has started, if you do it during the init, pre-init, or post-init states of your own mods loading you will miss any other mod after yours. there's no way to make sure yours is loaded last, so just add a hook to the server start and run your dump code then.
16 posts
Posted 05 February 2014 - 12:39 PM
Thanks folks. Between your advice and mDiyo's stuff I should be able to get a dumper going tonight. I'll try to post back how it went. I haven't been doing Java for awhile, but tons of C#, C++, and Python, so I should be able to follow along so long as there's public information. I've heard a lot of things about writing Minecraft mods. :P/>
Yes the Minium Stone doesn't take damage. I guess you can it is not in the spirit to use it as an infinite converter, but I could always just throw up a mob farm next door to drop the necessary shards.
16 posts
Posted 06 February 2014 - 02:11 AM
Well I said I'd post back so here I am. I couldn't get the dumper to run. I don't think I can get that ARG mod to work right; it's puking like so:
2014-02-06 01:16:53 [INFO] [STDOUT] java.lang.NoSuchFieldError: textureType
2014-02-06 01:16:53 [INFO] [STDOUT] at arg.ARG.createRecipeImages(ARG.java:100)
Which is right up top normally . . .
public void createRecipeImages(TextureStitchEvent.Post evt) {
mapLoaded[evt.map.textureType]++;
. . . but I had shifted it down a bit by the time of that stack trace so I could try to do some reflection on evt.map. Of course it was all obfuscated. This is baby's first poke at some mod source code so it's a mess for me. Eclipse was pretty angry about most of the namespaces and I couldn't casually shut it up. Still, the build batch file sucked down a bunch of stuff and managed to spit out some classes. I found I could zip up main/arg and pass that into the mod pack I'm using and it would at least try to run. That's the best I could muster. Forge documentation implies that field should be there, and I have no tribal knowledge to infer what could be going on. Maybe I'm using an incompatible version of Minecraft or something. I think this mod pack (Never Stop Toasting 1.6) uses 1.6.4.
Any ideas?