add utils to Integration and IntegrationManager to make them more powerful #60

Closed
justliliandev wants to merge 2 commits from feature/powerful_integration into dev/1.18.x
justliliandev commented 2022-06-29 19:49:42 +00:00 (Migrated from github.com)

It's something I did for Tinkers Integration, but wanted to get feedback on this, as tinkers is on hold, during 1.19 port and this shouldn't cause any conflicts

Description

Utils to IntegrationManager:

noneMatch: can be used for denylisting things
anyMatch: for allowlisting, like if the direct glm should apply on an itemstack for specific tinkers tools
allMatch: I don't have an idea for that rn, but it might get a use and is just there to complete the set
forAll: Do something on all integrations: Like sending the GatherDataEvent or other things

Utils to Integration

addEventListener: with reference to relevant EventBuses
createData: has the GatherDataEvent, so not every Integration needs it's own EventListener

Checklist:

  • My code follows the style guidelines of this project (.editorconfig, most IDEs will use this for you)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
It's something I did for Tinkers Integration, but wanted to get feedback on this, as tinkers is on hold, during 1.19 port and this shouldn't cause any conflicts # Description ## Utils to IntegrationManager: noneMatch: can be used for denylisting things anyMatch: for allowlisting, like if the direct glm should apply on an itemstack for specific tinkers tools allMatch: I don't have an idea for that rn, but it might get a use and is just there to complete the set forAll: Do something on all integrations: Like sending the GatherDataEvent or other things ## Utils to Integration addEventListener: with reference to relevant EventBuses createData: has the GatherDataEvent, so not every Integration needs it's own EventListener # Checklist: - [x] My code follows the style guidelines of this project (.editorconfig, most IDEs will use this for you) - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have made corresponding changes to the documentation
justliliandev commented 2022-07-03 12:19:59 +00:00 (Migrated from github.com)

This is closed due to #61 for 1.19 being available

This is closed due to #61 for 1.19 being available

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Team-EnderIO/EnderIO#60
No description provided.