[IC2 Exp | 1.12.2] IC2Guns addon

  • Do you like shooting that mobs with your Mining Laser? :Mining Laser::Mining Laser::Mining Laser:
    Do you hate fixing your structures after a miss?

    Then it's for you! A good ol' rifle that wipes mobs out and keeps your landscape safe.


    Github


    [TO BE UPDATED]

  • 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
    1. addCanningRecipe(input.forExactStack(makeMagazine(0)),
    2. input.forStack(new ItemStack(cartridge, 20)),
    3. makeMagazine(ItemMagazine.MAX_AMMO);
    4. ...
    5. private static ItemStack makeMagazine(int ammo) {
    6.     ItemStack magazine = new ItemStack(magazine);
    7.     magazine.setTagCompound(ItemMagazine.getNBTForAmmo(ammo));
    8.     return magazine;
    9. }

    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.

  • Hey, can someone attach a compiled version of this mod to this thread? I tried compiling it myself and either there's something wrong or I'm too dum dum to compile it myself, thanks.

  • 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.

  • Also how do you load a magazine into the rifle, can't seem to do anything with the rifle even after filling a few magazines and having them in my inv, etc.

    It's not finished, I've been working on it only for 4 days. I'm going to finish it in a week.

  • 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:.