[IC2 Exp | 1.12.2] IC2Guns addon

  • I'm facing an issue with canning machine recipe:

    Debugger shows that addCanningRecipe gets output item stack with NBT ammo MAX_AMMO = 20, however, this recipe produces a magazine with NBT ammo 0. Is it an API bug, or am I doing it the wrong way?

    By the way, I'm totally not a Java programmer, so beware of ugly code.

  • An addon style we've not seen in a long time, looking forward to see how it turns out.

    As for your NBT issue, the ItemStack constructor is a little misleading in that whilst it takes in an NBTTagCompound, that's only for Forge's capabilities and not the ItemStack's own NBT. You'll want to do something like

    Java
    addCanningRecipe(input.forExactStack(makeMagazine(0)),
                     input.forStack(new ItemStack(cartridge, 20)),
                     makeMagazine(ItemMagazine.MAX_AMMO);
    ...
    private static ItemStack makeMagazine(int ammo) {
        ItemStack magazine = new ItemStack(magazine);
        magazine.setTagCompound(ItemMagazine.getNBTForAmmo(ammo));
        return magazine;
    }

    That way the NBT is properly set for the ItemStack (using setTagCompound).

    145 Mods isn't too many. 9 types of copper and 8 types of tin aren't too many. 3 types of coffee though?

    I know that you believe that you understood what you think I said, but I am not sure you realise that what you read was not what I meant.

    ---- Minecraft Crash Report ----
    // I just don't know what went wrong :(

    I see this too much.

  • try downloading the repo, run gradlew setupDecompWorkspace, and after that finishes, try gradlew build. the built mod should be in built/libs. Thats for Windows, idk about the other OS's though...

    I don't think that gradlew eclipse is needed before building...

    My favorite...

    Armor: :Quantum-Helmet::Quantum-Bodyarmor::Quantum-Leggings::Quantum-Boots:

    Item: :Uranium::Uranium Ore::Reactor:

  • try downloading the repo, run gradlew setupDecompWorkspace, and after that finishes, try gradlew build. the built mod should be in built/libs. Thats for Windows, idk about the other OS's though...

    I don't think that gradlew eclipse is needed before building...

    Well yes, I did those steps, this time I tried it on another CLI tool and not powershell, and it.. worked?

  • The rifle doesn't seem to be finished yet, it's just an item which doesn't stack at the moment.

    145 Mods isn't too many. 9 types of copper and 8 types of tin aren't too many. 3 types of coffee though?

    I know that you believe that you understood what you think I said, but I am not sure you realise that what you read was not what I meant.

    ---- Minecraft Crash Report ----
    // I just don't know what went wrong :(

    I see this too much.

  • This is such a great idea. If you polish this and give some decent configure options via the configs I be happy to add this to my pack. I'm making a pack with mostly IC2 / TR mixed in and NO Tinkers. I think this would do wonders :)

    Check out Our Brand New GT New Horizons Server .:Here:.
    Check out Our Brand New GT New Horizons Let's Play Series .:Here:.

  • This mod idea does carry such possibilities and oportunities. Would love to see something other than ICBM or Flans mods (nothing personal JambioFlan! loved your mod since 2010).

  • Is this dead? The Github link from the first post is broken.

    This addon idea is one thing Industrialcraft was always lacking, so would love to see this completed.

    Yep, I got overcringed by Forge mess (and Java, hecking hate it), so I just gave this up. Sorry.

    Here is source code (Idea project) for what I currently have. You can freely use it, try to finish this addon or even integrate it in IC.