Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

30x ore processing? #6038

Open
StoobyMcDooby opened this issue Nov 1, 2024 · 3 comments
Open

30x ore processing? #6038

StoobyMcDooby opened this issue Nov 1, 2024 · 3 comments
Assignees
Labels
Bug FTB Presents Direwolf20 1.21 @Recipe Issues related to recipes (crafting, visibility, ect) state: Fixed in Dev An issue is fixed in-dev and pending for release.

Comments

@StoobyMcDooby
Copy link

Modpack

FTB Presents Direwolf20 1.21

Modpack version

1.3.0

Launcher

CurseForge

Has the pack been modified

No

Log Files

No response

Describe the bug

So...not sure if it's intended, but I'm sure rich in my survival mode now. Taking ores like Iron Ore or Gold Ore and putting them into the mechanical squeezer gives you something like 3-7 Raw Iron or Raw Gold. There's only a few recipes like this where inputting an ore gets you the Raw version of whatever ore it is. Taking that Raw version over to a Marid Crusher then causes you to be able to 6x each one of those Raw versions. You can effectively take one piece of Iron Ore and 30x it.

Ores you can achieve this with include any ore that outputs a Raw version in the squeezer.

Steps to reproduce

  1. Get Iron Ore
  2. Squeezer or Mechanical Squeezer it into 3-7 Raw Iron
  3. Take resulting Raw Iron to a Marid Crusher to then 6x each of the 3-7 Raw Iron
  4. Collect your 18-30 Iron ingots (dependent on whether or not you got either of the 2 additional Raw Iron at a 50% chance each)

Expected behaviour

I mean, I'm assuming you shouldn't be able to double process a single ore to get 30x ingots. Maybe you guys planned it this way though? I'm rich!

Screenshots

No response

Additional information

Thanks for all the gold and iron!

@Gaz492 Gaz492 added the @Recipe Issues related to recipes (crafting, visibility, ect) label Nov 1, 2024
@Raidobw2
Copy link
Contributor

I think you are spot on and there is a little balancing to do. Mekanism will give you x2 with the enrichment chamber and convert an ore to 2 dust. That makes sense.

image

Currently the recipes for the squeezer look a bit cheaty. Netherite scraps for example, clearly has a winner.

image

That's because JAOPCA adds some items and they are parsed into additional recipes, hence why we have 2 recipes for netherite scrap here.

In order to clean this up a bit, we could configure JAOPCA in the following locations:

config/jaopca/modules/integrateddynamics.toml
config/jaopca/modules/integrateddynamics_legacy.toml
config/jaopca/modules/integrateddynamics_non_ingot.toml

Let's configure it in those files to remove netherite_scrap and iesnium integration for Integrated Dynamics like so:
(Example)

[general]
	#The material blacklist of this module.
	materialBlacklist = ["netherite_scrap", "iesnium"]

Afterwards we will be able to add back some recipes manually with KubeJS. To keep this balanced we would use the same pattern Mekanism used, so it would convert ore blocks directly into dust.

image

image

image

Now this is still quite powerful, but definitely looks more balanced!

integrateddynamics.js
ServerEvents.recipes((event) => {
    // KubeJS seems to not allow rest parameters so we code 2 similar functions, output2 and output3
    const output2 = (outputItemId, amount1, chance1, amount2, chance2) => {
        return [
            {
                "item": {
                    "id": outputItemId,
                    "count": amount1
                },
                "chance": chance1
            },
            {
                "item": {
                    "id": outputItemId,
                    "count": amount2
                },
                "chance": chance2
            }
        ]
    }

    const output3 = (outputItemId, amount1, chance1, amount2, chance2, amount3, chance3) => {
        return [
            {
                "item": {
                    "id": outputItemId,
                    "count": amount1
                },
                "chance": chance1
            },
            {
                "item": {
                    "id": outputItemId,
                    "count": amount2
                },
                "chance": chance2
            },
            {
                "item": {
                    "id": outputItemId,
                    "count": amount3
                },
                "chance": chance3
            }
        ]
    }

    // This function will add a recipe for a squeezer or a mechanical squeezer
    const id_recipe = (type, inputTag, outputItems) => {
        let jsonRecipe = {
            "type": type,
            "input_item": {
                "tag": inputTag
            },
            "output_items": outputItems
        }

        // Mechanical Squeezer requires a duration
        // JAOPCA always added 3200RF for ores which is 40 duration
        if (type === "integrateddynamics:mechanical_squeezer") {
            jsonRecipe.duration = 40
        }

        event.custom(jsonRecipe)
    };

    let machines = ["squeezer", "mechanical_squeezer"]

    // Iesnium is removed through JAOPCA config, not here
    machines.forEach(machine => {
        event.remove({id: "integrateddynamics:" + machine + "/ore/raw_copper"})
        event.remove({id: "integrateddynamics:" + machine + "/ore/raw_osmium"})
        event.remove({id: "integrateddynamics:" + machine + "/ore/raw_aluminum"})
        event.remove({id: "integrateddynamics:" + machine + "/ore/raw_lead"})
        event.remove({id: "integrateddynamics:" + machine + "/ore/raw_zinc"})
        event.remove({id: "integrateddynamics:" + machine + "/ore/raw_gold"})
        event.remove({id: "integrateddynamics:" + machine + "/ore/raw_nickel"})
        event.remove({id: "integrateddynamics:" + machine + "/ore/raw_iron"})
        event.remove({id: "integrateddynamics:" + machine + "/ore/raw_uranium"})
        event.remove({id: "integrateddynamics:" + machine + "/ore/raw_tin"})
        event.remove({id: "integrateddynamics:" + machine + "/ore/raw_mithril"})
        event.remove({id: "integrateddynamics:" + machine + "/ore/raw_silver"})
    });

    // Squeezer ore to dust recipes
    id_recipe("integrateddynamics:squeezer", "c:ores/copper", output3("mekanism:dust_copper", 4, 1, 2, 0.5, 2, 0.5))
    id_recipe("integrateddynamics:squeezer", "c:ores/osmium", output2("mekanism:dust_osmium", 2, 1, 1, 0.75))
    id_recipe("integrateddynamics:squeezer", "c:ores/iesnium", output2("occultism:iesnium_dust", 2, 1, 1, 0.75))
    id_recipe("integrateddynamics:squeezer", "c:ores/aluminum", output2("jaopca:dusts.aluminum", 2, 1, 1, 0.75))
    id_recipe("integrateddynamics:squeezer", "c:ores/lead", output2("mekanism:dust_lead", 2, 1, 1, 0.75))
    id_recipe("integrateddynamics:squeezer", "c:ores/zinc", output2("jaopca:dusts.zinc", 2, 1, 1, 0.75))
    id_recipe("integrateddynamics:squeezer", "c:ores/gold", output2("mekanism:dust_gold", 2, 1, 1, 0.75))
    id_recipe("integrateddynamics:squeezer", "c:ores/nickel", output2("jaopca:dusts.nickel", 2, 1, 1, 0.75))
    id_recipe("integrateddynamics:squeezer", "c:ores/iron", output2("mekanism:dust_iron", 2, 1, 1, 0.75))
    id_recipe("integrateddynamics:squeezer", "c:ores/uranium", output2("mekanism:dust_uranium", 2, 1, 1, 0.75))
    id_recipe("integrateddynamics:squeezer", "c:ores/tin", output2("mekanism:dust_tin", 2, 1, 1, 0.75))
    id_recipe("integrateddynamics:squeezer", "c:ores/mithril", output2("jaopca:dusts.mithril", 2, 1, 1, 0.75))
    id_recipe("integrateddynamics:squeezer", "c:ores/silver", output2("occultism:silver_dust", 2, 1, 1, 0.75))
    
    // Mechanical Squeezer ore to dust recipes
    id_recipe("integrateddynamics:mechanical_squeezer", "c:ores/copper", output3("mekanism:dust_copper", 8, 1, 2, 0.5, 2, 0.25))
    id_recipe("integrateddynamics:mechanical_squeezer", "c:ores/osmium", output3("mekanism:dust_osmium", 3, 1, 2, 0.5, 2, 0.5))
    id_recipe("integrateddynamics:mechanical_squeezer", "c:ores/iesnium", output3("occultism:iesnium_dust", 3, 1, 2, 0.5, 2, 0.5))
    id_recipe("integrateddynamics:mechanical_squeezer", "c:ores/aluminum", output3("jaopca:dusts.aluminum", 3, 1, 2, 0.5, 2, 0.5))
    id_recipe("integrateddynamics:mechanical_squeezer", "c:ores/lead", output3("mekanism:dust_lead", 3, 1, 2, 0.5, 2, 0.5))
    id_recipe("integrateddynamics:mechanical_squeezer", "c:ores/zinc", output3("jaopca:dusts.zinc", 3, 1, 2, 0.5, 2, 0.5))
    id_recipe("integrateddynamics:mechanical_squeezer", "c:ores/gold", output3("mekanism:dust_gold", 3, 1, 2, 0.5, 2, 0.5))
    id_recipe("integrateddynamics:mechanical_squeezer", "c:ores/nickel", output3("jaopca:dusts.nickel", 3, 1, 2, 0.5, 2, 0.5))
    id_recipe("integrateddynamics:mechanical_squeezer", "c:ores/iron", output3("mekanism:dust_iron", 3, 1, 2, 0.5, 2, 0.5))
    id_recipe("integrateddynamics:mechanical_squeezer", "c:ores/uranium", output3("mekanism:dust_uranium", 3, 1, 2, 0.5, 2, 0.5))
    id_recipe("integrateddynamics:mechanical_squeezer", "c:ores/tin", output3("mekanism:dust_tin", 3, 1, 2, 0.5, 2, 0.5))
    id_recipe("integrateddynamics:mechanical_squeezer", "c:ores/mithril", output3("jaopca:dusts.mithril", 3, 1, 2, 0.5, 2, 0.5))
    id_recipe("integrateddynamics:mechanical_squeezer", "c:ores/silver", output3("occultism:silver_dust", 3, 1, 2, 0.5, 2, 0.5))
});

@ArtpokeBr
Copy link
Collaborator

ArtpokeBr commented Nov 22, 2024

@Raidobw2 Thanks for this and also the other contributions, I've made sure to credit ya in this specific script :)
image

@ArtpokeBr ArtpokeBr added the state: Fixed in Dev An issue is fixed in-dev and pending for release. label Nov 22, 2024
@ArtpokeBr ArtpokeBr self-assigned this Nov 22, 2024
@Raidobw2
Copy link
Contributor

I'm glad I could help a bit! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug FTB Presents Direwolf20 1.21 @Recipe Issues related to recipes (crafting, visibility, ect) state: Fixed in Dev An issue is fixed in-dev and pending for release.
Projects
None yet
Development

No branches or pull requests

5 participants
@Gaz492 @Raidobw2 @StoobyMcDooby @ArtpokeBr and others