Skip to content

Conversation

@SchachSebastian
Copy link

PLEASE READ THE GUIDELINES BEFORE MAKING A CONTRIBUTION

  • Please check if the PR fulfills these requirements
  • The commit message are well described

  • Docs have been added / updated (for features or maybe bugs which were noted). If not, please update the needed documentation here. Feel free to remove this check if you don't need it
    Not yet since some changes might be required

  • All changes have fully been tested

  • What kind of change does this PR introduce? (Bug fix, feature, ...)
    A new feature allowing one to create ae2 patterns using the me_bridge.
    Only works if the connected me system has a pattern encoder.
    Following new lua functions are added:
    • createCraftingPattern(resourceLocationString, allowSubstitutesBoolean, allowFluidSubstitutesBoolean)
      creates all crafting patterns resulting in an item whose resourceLocation matches the given resourceLocationString (regex)

    • createSmeltingPattern(resourceLocationString)
      creates all smelting patterns resulting in an item whose resourceLocation matches the given resourceLocationString (regex)

    • createBlastingPattern(resourceLocationString)
      same as smelting, but for all blasting recipes

    • createSmokingPattern(resourceLocationString)
      same as smelting, but for all smoking recipes

    • createSmithingPattern(resourceLocationString, allowSubstitutesBoolean)
      creates all smithing patterns resulting in an item whose resourceLocation matches the given resourceLocationString (regex)
      does whoever currently ignore trim patterns
      also this function requires reflection to obtain the inputs of the smithingRecipe

    • createStonecuttingPattern(resourceLocationString, allowSubstitutesBoolean)
      creates all stonecutting patterns resulting in an item whose resourceLocation matches the given resourceLocationString (regex)

and then one function that works a little differently

  • createProcessingPattern(inputs, outputs)
    creates a processing pattern that takes the inputs specified in the inputs list and returns the outputs (the first output element will be considered as primary output)
    parameter format:
-- inputs
{
  { "minecraft:diamond", 3 },
  { "minecraft:obsidian", 3 }
}
-- outputs
{
  { "minecraft:stone", 1 }
}
  • What is the current behavior? (You can also link to an open issue here)

  • What is the new behavior (if this is a feature change)?

  • Does this PR introduce a breaking change? (What changes might users need to make in their scripts due to this PR?)
    No, only new functions.

  • Other information:

    • One might want to decide on only one way to create patterns (specifying the name of the output, or all the inputs and outputs). I'm leaving that to you, although I would prefer both :)
    • Currently, the creation of a pattern which result can be crafted in multiple ways will always produce multiple patterns. It would be possible to add an optional list of inputs that filters the recipes even further.
    • maybe renaming to match the rs variant ones, also not for me to decide
    • and maybe move it to dev/0.8 i'm not sure how your branches work

@SirEndii
Copy link
Member

I need to test this and #790 ingame
Not a huge fan of two different ways to create patterns for each peripheral - but I need to test it to decide what we will do

@SirEndii SirEndii mentioned this pull request Oct 20, 2025
2 tasks
@github-actions
Copy link
Contributor

github-actions bot commented Oct 20, 2025

Build Preview

badge

You can find files attached to the below linked Workflow Run URL (Logs).

Name Link
Commit ab02f98
Logs https://github.com/IntelligenceModding/AdvancedPeripherals/actions/runs/18657747005
Jar Files AdvancedPeripherals PR 791
Expires At 2026-01-18T16:00:13Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants