Posts by elschemm

    Greetings:


    I have been trying to update my mod code to 1.6.4, and as part of that decided to upgrade my IC2 recipes to experimental.


    I have downloaded the code jar as well as the API jar (306 was the latest I checked), and have discovered that there is a rather nasty inconsistency in there.
    The addRecipe function in IMachineRecipeManager is different between the two versions.


    In the source API, the final parameter is an ItemStack...
    In the actual code, it is an ItemStack[].


    Attempting to add macerator recipes with this difference leads to a null pointer exception.


    I'll try ripping out the API from my code, and just link to the de-obf version in eclipse. Hopefully that will solve the problem for me.


    If someone on the dev team has the time it might be nice for the rest of us if the recipe API code could be updated to reflect the real codebase.


    I noticed several other reports of things not working with IC2 both here and elsewhere (Galacticraft, Mekanism). I know in Mekanisms case that their latest build does the have the correct recipe handler (it's what finally clued me in to compare the two). Perhaps other mods / modders difficulties are also from the combination of the two API functions.


    Thanks for your time.
    Schemm


    Cells are mostly registered at the Liquid Container Dictionary (if they contain a Liquid). The newer Comments say you the ID of the Cells. Then you can find the Metavalue of them in the cells.png by looking up their Index.


    But your Best choice for finding the Metavalue is NEI (or you press F3 + H in vanilla Minecraft to display Debug Values of Items).


    Thanks. My apologies, I hadn't realized that the api files were updated with the newer version. I only updated the jar.
    For future travellers: If you look in the API file, it tells you which number to use for the different types of items (2=cells, 13=liquid, etc), then you can look up in the specific .png file for the which image it is to get aMeta. (Or use GregoriusT's suggestion above.)
    I'll look into the LiquidRegistry as well. It might be a better solution for me. I hadn't thought to check that.
    Thanks for your prompt response.

    According to the GregTech API, I can get an ItemStack of a GregTech item by using

    Code
    1. ItemStack GregTech_API.getGregTechItem(int aIndex, int aAmount, int aMeta)


    Of course, this requires that I know the aIndex and aMeta of the items in question. The comment for the functions indicates that I can get the aIndex from the items.png file. I get the feeling from a couple of posts earlier (about Nickel ingots) that it isn't quite that simple anymore. Might one need to know both the aIndex and aMeta for items?
    Where can one get a list of Index / Meta values for GregTech items (specifically cells, most specifically SeedOil Cell)?
    Any chance of cells getting registered in the oreDictionary? They are probably just as likely to be used by other modders as the dusts and smallDust piles.
    I notice in the ic2 API, that there is a function

    Code
    1. ItemStack getItem(String name)


    that takes a standardized string (they even give a list in the API file. Kinda handy for those of us that want to use IC2 items in our stuff. Any chance of something like that for GregTech items (or has it already been done and I missed it in this thread)?


    Finally, thanks for this mod. I'm sure it has been a lot of work. It sure is fun to play with.