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

Boilerplate Registry for Lists #234

Merged
merged 22 commits into from
Oct 2, 2024

Conversation

WaitingIdly
Copy link
Collaborator

changes in this PR:

  • make addBackup and addScripted return a boolean in VirtualizedRegistry (always did in AbstractReloadableStorage).
  • create a new class, StandardListRegistry, which extends VirtualizedRegistry, and contains a number of boilerplate methods for manipulating recipes in a list format. Note that while this refers to lists, anything that implements Collection will work.
  • replaced 141 instances with the new StandardListRegistry, and adjusted code correspondingly.
  • add some javadocs to the new class, along with VirtualizedRegistry, ForgeRegistryWrapper, and NamedRegistry.
  • fix class name paths not recognizing underscores as a valid character in package/class names.
  • fix a new line be added to examples if there are any methods, regardless of if any of the methods have any examples.
  • make Better With Mods Heat compat have a type of ENTRIES instead of the default RECIPES.
  • adjust the lang keys for Astral Sorcery's Fountain to reflect the new changes.
  • added the ability for the documentation to handle generics via a Map<generic name, real class> map.
  • add a pair of lang keys for the now-documented addition and removal methods for lists.
  • side effect of these changes is that Better With Mods Heat, Mekanism Metallurgic Infuser, Mekanism Pressurized Reaction Chamber, Sawmill, LazyAE2 Fluix Aggregation, LazyAE2 Pulse Centrifuge, LazyAE2 Crystal Energization, LazyAE2 ME Circuit Etching now have methods they were previously missing.
  • update examples with these changes.

this should both significantly reduce the number of lines in any relevant class and also standardize the interactions.

@WaitingIdly WaitingIdly added documentation Improvements or additions to documentation refactor Something is rewritten labels Aug 30, 2024
# Conflicts:
#	src/main/java/com/cleanroommc/groovyscript/compat/mods/calculator/AnalysingChamber.java
#	src/main/java/com/cleanroommc/groovyscript/compat/mods/prodigytech/ExplosionFurnace.java
Copy link
Member

@brachy84 brachy84 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@brachy84 brachy84 merged commit ea07ef5 into CleanroomMC:master Oct 2, 2024
@WaitingIdly WaitingIdly deleted the registry-list-boilerplate branch October 4, 2024 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation refactor Something is rewritten
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants