[GT-5.09.** & Minetweaker/Crafttweaker Addon] Addon Version 1.7.1- Adding custom Recipes for all Gregtech 5 machines (Now with Fusion Reactor and Ordict support)

  • I am try to re-create the recipe for basic circuit boards just using a silicon plate and etched medium voltage wiring. What is wrong with this script and where do you get the names to use for the items and recipes?


    mods.gregtech.FormingPress.addRecipe(<gregtech:gt.metaitem.4950:32710>, <gregtech:gt.metaitem.4950:17020>, <gregtech:gt.metaitem.4950:32716>, 220, 1920);

  • I am try to re-create the recipe for basic circuit boards just using a silicon plate and etched medium voltage wiring. What is wrong with this script and where do you get the names to use for the items and recipes?


    mods.gregtech.FormingPress.addRecipe(<gregtech:gt.metaitem.4950:32710>, <gregtech:gt.metaitem.4950:17020>, <gregtech:gt.metaitem.4950:32716>, 220, 1920);


    1. There is no gt.metaitem.4950 - presumably 4950 is the id your game assigned to the item, but that will vary depending on what other mods are installed, etc., and what you need is the internal name. In this case, what you want is:
    mods.gregtech.FormingPress.addRecipe(<gregtech:gt.metaitem.01:32710>, <gregtech:gt.metaitem.01:17020>, <gregtech:gt.metaitem.01:32716>, 220, 1920);
    1920 EU/t for 11 seconds, huh? Expensive way to bypass needing polyethylene. To each his (or possibly her) own, I guess.


    2. I know of two ways to get the internal names: A) command /mt hand (faster if you use creative mode to get the items into your hand, and if you have the console log open, you can copy/paste from there), B) NEI Integration mod (can show things in the NEI menu in survival mode, since they don't need to actually be in your inventory, but also needs some config changes to make it show internal names and ore dictionary names, and F3+H in-game to make the NEI entries show metadata)

  • Still not working I have tried both


    import mods.gregtech.FormingPress;


    mods.gregtech.FormingPress.addRecipe(<gregtech:gt.metaitem.01:32710>, <gregtech:gt.plateSilicon>, <gregtech:gt.metaitem.01:32716>, 220, 32);


    and


    mods.gregtech.FormingPress.addRecipe(<gregtech:gt.metaitem.01:32710>, <gregtech:gt.metaitem.01:17020>, <gregtech:gt.metaitem.01:32716>, 220, 32);


    I have both minetweaker and the latest verison of GT Tweaker and I have placed the script file named gregtech.zs in minecraft/scripts. What am I doing wrong?

  • it took on the meta item entry funny enough. Had the file was still a .txt instead of a .zs dunno why it wouldn't take the ore dict version


    The ore dict version needs to use the "ore:" prefix, not "gregtech:" prefix, so it should have been something like this:
    mods.gregtech.FormingPress.addRecipe(<gregtech:gt.metaitem.01:32710>, <ore:plateSilicon>, <gregtech:gt.metaitem.01:32716>, 220, 32);
    However, I've looked at the source code for GTTweaker's ore dictionary support, and it merely translates it internally to a GregTech item, and only if it's a single GregTech item in that particular ore dictionary entry. If you try to use it with one of the "AnyCopper" or "AnyIron" ore dictionary entries, or an entry configured to unificate to a non-GregTech item, that will lead to problems, so I'm disinclined to trust GTTweakers oredict support.


  • You mean you want to remove the assembler recipe for an empty circuit board? That's not a question of a missing modifier, GregTech's API simply doesn't provide a way to do that, so a Minetweaker script won't work. recipes.remove is for removing crafting recipes, not machine-processing recipes, anyway. However, you can disable the assembler recipe for the empty circuit board in the "assembling" section of GregTech/Recipes.cfg by changing "I:gt.metaitem.01.32719_32=32" to "I:gt.metaitem.01.32719_32=0" (should be about line 8768 )

  • mkay that would work. Need to make a tutorial after I get this done. Not very well explained how the syntax works.


    Actually, the easiest fix for this would be for StanH (Minetweaker 3 maker) to add in recipe.remove classes for the machines. You can do things like remove furnace recipes in Minetweaker, and even some mods (buildcraft is one iirc) allow that .remove function. Just not many mods have that function added. It's actually a fix that someone with some java experience could make themselves with MT3's source if they felt like it (I'd try, but I only know enough to read and change certain lines with the .java syntax, like back in 1.4 days when AE3 didn't allow microblocks to cover their cable unless it was painted. In a case like that I know how to add the regular cable to the array so I could use microblocks on the cabling myself, but that was pretty easy. If I knew more about accessing oredicts and how Minetweaker 3 worked I might be able to do something similar assuming I'm correct).


    If you wish to learn more about which machines allow which syntax, open the Minetweaker3.jar in zip, travel the folder to minetweaker/mods/"mod name"/ and here you should see some "AddAction/RemoveAction.class" files, you can then go to /machines for more *Action.class files (similarly you can do the same with GTTweaker.jar.) If you get something like ce2.23 (or another .class editor) you can extract the class files for all the machines in the /machines folder and open them with a class editor, and see which other classes they use. You'll see AddRecipe as one of the handlers, but if it's from a mod you likely won't see RemoveRecipe.

  • I thought I already mentioned that GT5u currently doesn't support machine recipe removal, but even if Blood Asp can be convinced to add support for it, I don't think it would work well to make it possible via "recipes.remove" (which seems to be what you're suggesting, apologies in advance if I'm misunderstanding) - many items in GT can be made on the crafting table, but more efficiently in machines, so Minetweaker would need to be able to disambiguate which recipe you're removing, which would be simpler to do by using Extruder.remove, Wiremill.remove, etc.


    BTW, as far as decompiling java code, I find jd-gui easier since it doesn't require extracting the class files ahead of time. However, Minetweaker has a GitHub repository so you don't actually have to use a decompiler for it: https://github.com/stanhebben/MineTweaker3

  • In GregTech, you can remove all recipes in the config files. That should have been mentioned on this thread a few times already.


    The remove option missing code wise is an technical issue. The recipe handling is highly optimized leading to some limitations. There are things like lists of all items a machine can accept made from all recipes. After an recipe removal, a complete rebuild would be needed what takes quite some time.


    So use the config to stop recipes from being added in the first place since removal is extremely laggy.

  • I thought I already mentioned that GT5u currently doesn't support machine recipe removal, but even if Blood Asp can be convinced to add support for it, I don't think it would work well to make it possible via "recipes.remove" (which seems to be what you're suggesting, apologies in advance if I'm misunderstanding) - many items in GT can be made on the crafting table, but more efficiently in machines, so Minetweaker would need to be able to disambiguate which recipe you're removing, which would be simpler to do by using Extruder.remove, Wiremill.remove, etc.


    BTW, as far as decompiling java code, I find jd-gui easier since it doesn't require extracting the class files ahead of time. However, Minetweaker has a GitHub repository so you don't actually have to use a decompiler for it: https://github.com/stanhebben/MineTweaker3


    In GregTech, you can remove all recipes in the config files. That should have been mentioned on this thread a few times already.


    The remove option missing code wise is an technical issue. The recipe handling is highly optimized leading to some limitations. There are things like lists of all items a machine can accept made from all recipes. After an recipe removal, a complete rebuild would be needed what takes quite some time.


    So use the config to stop recipes from being added in the first place since removal is extremely laggy.



    Was more talking about the IC² Recipes and those other mods that don't have as verbose configs as Gregtech. That's why I used Minetweaker3.jar as an example... ch-ch-ch-chilll

  • Was more talking about the IC² Recipes and those other mods that don't have as verbose configs as Gregtech. That's why I used Minetweaker3.jar as an example... ch-ch-ch-chilll


    Oh, sorry, you hadn't made that clear. I'm not sure about other mods like BuildCraft, but fwiw, I think IC2 processing recipes can be changed without even using Minetweaker, based on these lines in IC2.ini:

    Code
    1. ; To modify recipes or add custom recipes, copy the corresponding .ini file to
    2. ; "minecraft/config/ic2" and modify it.

  • Oh, sorry, you hadn't made that clear. I'm not sure about other mods like BuildCraft, but fwiw, I think IC2 processing recipes can be changed without even using Minetweaker, based on these lines in IC2.ini:

    Code
    1. ; To modify recipes or add custom recipes, copy the corresponding .ini file to
    2. ; "minecraft/config/ic2" and modify it.


    Oh I'm sure there's a way through IC²'s config, but just not through Minetweaker, where there is only a class to add a recipe for each IC² machine, yet that class exists for most all MFR machines (contextually; i.e. for the grinder, theres a class to add a grindable and remove a grindable) and likewise for Buildcraft (Refinery$AddRecipeAction.class and Refinery$RemoveRecipeAction.class, etc.), yet for IC² there is only a MachineAddRecipeAction.class as well as other contextual class files that only add to existing machine recipes. This may be due to how IC² machines handle recipes, but I would assume that if it's possible for most of the buildcraft and mfr machines, it's possible for IC² as well. You get what I mean? I'm not saying there are ways around it, just that it would be less work if integrated.


    Oh yeah, and no offense with that "chill" comment, that wasn't exactly aimed at your post. :thumbsup:
    Edit: Actually just re-checked out the wiki page for gregtech handlers and MT3 and saw just above the recipe lines "Each of these handlers can have recipes added or removed:" wut.

  • Oh I'm sure there's a way through IC²'s config, but just not through Minetweaker, where there is only a class to add a recipe for each IC² machine, yet that class exists for most all MFR machines (contextually; i.e. for the grinder, theres a class to add a grindable and remove a grindable) and likewise for Buildcraft (Refinery$AddRecipeAction.class and Refinery$RemoveRecipeAction.class, etc.), yet for IC² there is only a MachineAddRecipeAction.class as well as other contextual class files that only add to existing machine recipes. This may be due to how IC² machines handle recipes, but I would assume that if it's possible for most of the buildcraft and mfr machines, it's possible for IC² as well. You get what I mean? I'm not saying there are ways around it, just that it would be less work if integrated.


    I did a little poking around the IC2 code with jd-gui, and it looks like IC2 doesn't provide a method for Minetweaker to call to remove a machine recipe, while Buildcraft and MFR might have been persuaded to add such methods at some point. You could try posting a message in the suggestions section to encourage adding the ability to do that (I doubt Blood Asp's justification for not allowing code-based machine recipe removal in GT would be significant for IC2), but the IC2 devs seem to mostly be focusing on the 1.10 port, while MT3 is still in 1.7.10.

  • I did a little poking around the IC2 code with jd-gui, and it looks like IC2 doesn't provide a method for Minetweaker to call to remove a machine recipe, while Buildcraft and MFR might have been persuaded to add such methods at some point. You could try posting a message in the suggestions section to encourage adding the ability to do that (I doubt Blood Asp's justification for not allowing code-based machine recipe removal in GT would be significant for IC2), but the IC2 devs seem to mostly be focusing on the 1.10 port, while MT3 is still in 1.7.10.


    Oh right on. Well that's understandable in that situation, hell I'd prefer to be playing a modded 1.10 game rather than 1.7.10 and IC² is pretty popular when it comes to mod packs. Thanks for doing the digging though, it's been on my brain since I first started thinking about it but I've been to busy with work to put the effort through bugging around with java coding. Plus I have a patch I need to figure out how to add to a different mod that is more important than this anyway in the meantime (can't place items on natura slabs in my mod pack for whatevever reason and it's pissing me off lol), so it's at least nice to know that the IC²~MT3 thing has been looked at. Thanks for the replies and help Mauve, it's appreciated.


    Edit: Small world, just saw that you're the OP on GregTech's Sphax page. I just got my Tennox Assembly Mod Patch posted, working on a couple more mods and missing textures. Gotta love this community.

  • I've got a new issue. I'm trying to edit a gregtech centrifuge recipe to take ic2 rubber (fits in with the rest of the changes I've made in my script) and spit out the same as the current sticky resin recipe (i.e. 3x wood pulp [iirc], 1x plantball [50% chance], and 100mB of liquid glue). I've basically made it so sticky resin is just used in an IC2 Extractor (like it used to), and converts to ic2 rubber instead of rubber ingots (which I made available to craft via putting rubber into a furnace). However, I can't get the output variable to work for liquid glue. I've had to stick with outputting a glue cell (but it contains 1000mB, 10x more than it originally outputted) instead. The script I have now that puts out glue cell is: Centrifuge.addRecipe([<gregtech:gt.metaitem.01:2896> * 3, <gregtech:gt.metaitem.01:30726>, <IC2:itemFuelPlantBall>,], null, <IC2:itemRubber>, null, null, [10000, 10000, 5000], 300, 5); When I use the meta id for liquid glue (forget what the name was, something like _displayFluid:13, or along those lines) it would not take it as a usable variable. It works for now, I just would rather it not be as OP on the glue output if it doesn't need to be (basically want to clean it up a little bit and add the functionality that it should have). I tried looking for similar scripts everywhere, but can't find a single example using gregtech's fluid registry...

  • I'm not sure I understand the notes in the OP correctly. Is GTTweaker 1.0.9 the latest version that supports GT 5.08?


    Also I'm reworking a pack I made last year and I'm getting this interesting error that doesn't happen when GT Tweaker isn't present. I've tried both version 1.0.9 and 1.4.2 and they both give the same error. I'm on GT 5.08.33, IC2 2.2.823, forge 1614, minetweaker 3.0.10 (also tried 3.0.10B), and modtweaker2 0.9.6.



    Thoughts?



    Wow. It helps if gregtech is actually in the mods directory. Disregard this post.

  • Still trying to figure out how to enter the output fluid for the gregtech centrifuge recipe. I would assume that:
    Setup Rules: OutputArray, InputFluid, InputStack, InputCell, OutputFluid, OutputArrayChances, Time in Ticks, EnergyUsage


    Centrifuge.addRecipe([<gregtech:gt.metaitem.01:2896> * 3, <gregtech:gt.metaitem.01:30726>, <IC2:itemFuelPlantBall>,], null, <IC2:itemRubber>, null, <gregtech:gt.GregTech_FluidDisplay:117>, [10000, 10000, 5000], 300, 5);


    Where "<gregtech:gt.GregTech_FluidDisplay:117>" is liquid glue. For whatever reason thought I get: ERROR > 2 methods available but none matches the parameters (minetweaker.item.IItemStack[], null, minetweaker.item.IItemstack, null, minetweaker.item.IItemStack, int[], int, int


    I'm honestly at a lost and can't find one example outputting fluid on a minetweaker script