Skip to content

Ore Ingredient Changes #310

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

WaitingIdly
Copy link
Collaborator

changes in this PR:

  • change IOreDicts to use a collection instead of a list, and make it not extend IIngredient (other things could represent multiple oredicts).
  • document QUERY examples (only one that exists prior to this PR was IE blueprint crafting molds).
  • make OreDictIngredient extend IngredientBase instead of ItemsIngredient, fixing caching issue.
    • this does make OreDictIngredient no longer cache itemstacks, which worsens performance. there is no good way to avoid this.
  • remove OreDictWildcardIngredient via ore('*'), add OreDictMatcherIngredient via oredict.getOres(~/.*/)
    • *, sm*le, etc are valid oredict names, and so replacing any with the * character with a different object is incorrect. as such, we cannot use the ore Object Mapper for both OreDictIngredient and OreDictWildcardIngredient.
    • we shouldnt cache matches (would have incorrect results if oredicts are modified) but not caching it is quite expensive. making a distinct thing that is clear that it generates the results only when called avoids this.
    • made the creation use a set for ore names
  • add oredict.streamOreNames() for clearing and managing oredicts.

@WaitingIdly WaitingIdly added the refactor Something is rewritten label May 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Something is rewritten
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant