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

the patterning #2689

Draft
wants to merge 64 commits into
base: master
Choose a base branch
from
Draft

the patterning #2689

wants to merge 64 commits into from

Conversation

vrejhead
Copy link
Contributor

What

Rewrote the entire multiblock pattern system.

Implementation Details

BlockPattern now implements IBlockPattern for general pattern stuff, so does the new ExpandablePattern which makes cleanroom and charcoal pile igniter sane. PatternMatchContext and MultiblockShapeInfo are now useless/deleted. The multiblock builder now has a gui that allows one to configure the parameters of autobuild, and so can the multiblock if it wants. Previews now use the autobuild system, where they supply an iterator of maps to autobuild the multiblock with. Multiblock part sharing now only works within the same multiblock class and substructure(yeah substructures exist now, so a controller can have multiple patterns). RelativeDirection has been reworked to have not terrible code, and GreggyBlockPos now exists as a sane alternative to MutableBlockPos. There is probably something I missed but that's hopefully the most important stuff.

Outcome

less kila code

Additional Information

The vacuum freezer and large chemical reactor has "new structures" for testing purposes, so yeah. I'll change them back when the pr is ready to merge.

Potential Compatibility Issues

There's zero backwards compat for addons, my bad :trollface:.

But if addons update properly, then a player's world should still function, ie a multi running a recipe before the update will not void the recipe but instead continue it after the update. Most importantly because for some reason the old front facing was reversed in structure checking code, addons need to flip all their structures across the relative left-right and front-back axis(since relative up-down isn't affected when relative front-back got reversed). A lot of methods that don't use substructure name are deprecated(but still work) and addons should update them to use the new methods as well.

Copy link
Contributor

@ghzdude ghzdude left a comment

Choose a reason for hiding this comment

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

just quickly looked through and noticed some stuff
also i think it might be better if the strings were all lowercase, and ensuring all passed in strings are lowercase

@ghzdude ghzdude added the type: refactor Suggestion to refactor a section of code label Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: refactor Suggestion to refactor a section of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants