Modern-Industrialization icon indicating copy to clipboard operation
Modern-Industrialization copied to clipboard

Various internal machine api improvements

Open Swedz opened this issue 1 year ago • 1 comments

  • 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 avatar Sep 24 '24 07:09 Swedz

~~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?~~ (moved to #939)

Swedz avatar Sep 25 '24 22:09 Swedz