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

Various internal machine api improvements #900

Open
wants to merge 18 commits into
base: 1.21.x
Choose a base branch
from

Conversation

Swedz
Copy link
Contributor

@Swedz Swedz commented Sep 24, 2024

  • Improves model API to allow so it is more extensible

  • Use ResourceLocation for machine casing ids. If no namespace is provided, it defaults to MI's namespace

  • Widen visibility and overridability of some methods and variables in ShapeMatcher, CasingComponent, and MultiblockMachineBlockEntity

  • Make the CableTier of EnergyHatch and CasingComponent accessible

  • Improves shape matcher API to allow for machines to define their own custom shape matcher and also standardizes the various methods triggered relating to multiblock shape matching (lots of duplicate code is removed)

  • Improve the internal storing of components such that they can be accessed and modified in the same way for both and includes some extra utility methods (I think I covered all reasonable use cases)

  • Allow for vertical orientations in OrientationComponent

  • Allow BackgroundRenderedSlot to override the atlas used to render them

@Swedz Swedz changed the title Improve internal machine model API Various internal machine api improvements Sep 25, 2024
@Swedz Swedz marked this pull request as draft September 25, 2024 22:08
@Swedz
Copy link
Contributor Author

Swedz commented Sep 25, 2024

It might make sense to also add the CableTierHolder interface to electric machines and get the tier from their casing component. That can easily be done. Doing it for multi blocks is a little ambiguous since a multi block electric machine can have multiple types of hatches on it. It could just use the highest tier, though. Would either of these changes be acceptable?

@Swedz Swedz marked this pull request as ready for review October 16, 2024 20:50
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.

1 participant