Ultimine Conduits Compat #1097

Merged
Rover656 merged 8 commits from feat/conduit-ultimine-compat into dev/1.21.1 2025-08-04 18:31:21 +00:00
Rover656 commented 2025-07-01 20:39:37 +00:00 (Migrated from github.com)

Description

Uses a new FTB Ultimine API to ensure that conduits can be broken correctly, without destroying entire bundles or the incorrect conduits.

Visually all bundles are still highlighted, but the correct action will be performed.

Many thanks to the FTB Team for creating this API.

TODO

  • Make all items drop at the origin position rather than at the broken block.
  • Wait for the new API to reach the stable Ultimine release
  • Potentially make the Ultimine bounding boxes ignore conduit bundles that are not of interest - would require further API support, but is purely cosmetic.

Checklist

  • My code follows the style guidelines of this project (.editorconfig, most IDEs will use this for you).
  • I have made corresponding changes to the documentation.
  • My changes are ready for review from a contributor.

Summary by CodeRabbit

New Features

  • Added integration with the FTB Ultimine mod, enabling enhanced multi-block breaking and selection for conduits, including support for facades and network-aware operations.

Bug Fixes

  • Improved item drop handling for conduits and facades, ensuring correct drop positions and consistent behaviour when removing components.

Chores

  • Updated build configuration to include FTB Ultimine as a dependency and added relevant Maven repositories.
  • Applied package-level non-null annotations for improved code reliability.

Documentation

  • Added comments and package-level documentation to clarify future enhancements and code behaviour.
# Description Uses a new FTB Ultimine API to ensure that conduits can be broken correctly, without destroying entire bundles or the incorrect conduits. Visually all bundles are still highlighted, but the correct action will be performed. Many thanks to the FTB Team for creating this API. <!-- If you're submitting a Draft PR, consider providing a TODO list using checkboxes --> # TODO - [x] Make all items drop at the origin position rather than at the broken block. - [x] Wait for the new API to reach the stable Ultimine release - [x] Potentially make the Ultimine bounding boxes ignore conduit bundles that are not of interest - would require further API support, but is purely cosmetic. <!-- For drafts, fill this in as you go; if you are leaving draft, make sure these are all complete. --> # Checklist - [x] My code follows the style guidelines of this project (.editorconfig, most IDEs will use this for you). - [x] I have made corresponding changes to the documentation. - [x] My changes are ready for review from a contributor. <!-- Thanks to: https://embeddedartistry.com/blog/2017/08/04/a-github-pull-request-template-for-your-projects/ for the building blocks of this template --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit **New Features** * Added integration with the FTB Ultimine mod, enabling enhanced multi-block breaking and selection for conduits, including support for facades and network-aware operations. **Bug Fixes** * Improved item drop handling for conduits and facades, ensuring correct drop positions and consistent behaviour when removing components. **Chores** * Updated build configuration to include FTB Ultimine as a dependency and added relevant Maven repositories. * Applied package-level non-null annotations for improved code reliability. **Documentation** * Added comments and package-level documentation to clarify future enhancements and code behaviour. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
coderabbitai[bot] commented 2025-07-01 20:39:43 +00:00 (Migrated from github.com)

Walkthrough

This update introduces direct integration between EnderIO conduits and the FTB Ultimine mod. It adds new Maven repositories and dependencies for FTB Ultimine, implements conduit-specific block break and selection handlers for vein mining compatibility, and adjusts item drop logic to support positional drops. Several new classes and methods facilitate this integration.

Changes

Cohort / File(s) Change Summary
Build configuration: FTB Ultimine dependency & repositories
buildSrc/shared.gradle.kts, enderio/build.gradle.kts, enderio-conduits/build.gradle.kts, gradle.properties
Added FTB Ultimine Maven repositories, declared ftbUltimineVersion property, and included FTB Ultimine as a dependency for both runtime and compile-only contexts.
Integration logic: FTB Ultimine compatibility
enderio-conduits/src/main/java/com/enderio/conduits/EnderIOConduits.java, enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/FTBUltimineCompat.java
Added conditional FTB Ultimine integration initialisation; introduced a compatibility class to register block selection and break handlers.
Conduit bundle item drop logic
enderio-conduits/src/main/java/com/enderio/conduits/common/conduit/bundle/ConduitBundleBlockEntity.java
Overloaded removeConduit and item drop methods to accept explicit drop positions; improved facade provider handling in NBT loading.
FTB Ultimine integration: Block break/selection handlers
enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockBreakHandler.java, enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockSelectionHandler.java
Introduced new handlers for block breaking and selection to support vein mining of conduits, including network and facade-aware logic.
Documentation and annotations
enderio-conduits/src/main/java/com/enderio/conduits/api/bundle/ConduitBundle.java, enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/package-info.java
Added a TODO comment for potential future API enhancement; added package-level non-null annotations for integration package.

Sequence Diagram(s)

sequenceDiagram
    participant Player
    participant EnderIOConduits
    participant FTBUltimineCompat
    participant FTB Ultimine (Event Bus)
    participant ConduitBlockBreakHandler
    participant ConduitBlockSelectionHandler

    Player->>EnderIOConduits: Game start / mod load
    EnderIOConduits->>FTBUltimineCompat: If FTB Ultimine is loaded, call init()
    FTBUltimineCompat->>FTB Ultimine (Event Bus): Register BlockSelectionHandler and BlockBreakHandler

    Player->>FTB Ultimine (Event Bus): Initiates vein mining (block break/selection)
    FTB Ultimine (Event Bus)->>ConduitBlockSelectionHandler: customSelectionCheck(...)
    ConduitBlockSelectionHandler-->>FTB Ultimine (Event Bus): Return selection result

    FTB Ultimine (Event Bus)->>ConduitBlockBreakHandler: breakBlock(...)
    ConduitBlockBreakHandler-->>FTB Ultimine (Event Bus): Return break result
    FTB Ultimine (Event Bus)->>ConduitBlockBreakHandler: postBreak(...)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes

  • Team-EnderIO/EnderIO#1088: Implements direct FTB Ultimine integration for conduit bundles, addressing vein mining compatibility as requested.

Suggested labels

Area-Backend, Type-Enhancement

Poem

A rabbit hopped through Maven fields anew,
With Ultimine in tow, it knew what to do.
Conduits now break in a magical chain,
Facades and networks, all handled with brain.
Integration complete, the code’s looking bright—
Let’s vein mine together, from morning till night!
🐇

Note

️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/conduit-ultimine-compat

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.
<!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- walkthrough_start --> ## Walkthrough This update introduces direct integration between EnderIO conduits and the FTB Ultimine mod. It adds new Maven repositories and dependencies for FTB Ultimine, implements conduit-specific block break and selection handlers for vein mining compatibility, and adjusts item drop logic to support positional drops. Several new classes and methods facilitate this integration. ## Changes | Cohort / File(s) | Change Summary | |---------------------------------------------------------------------------------------------------|---------------| | **Build configuration: FTB Ultimine dependency & repositories**<br>`buildSrc/shared.gradle.kts`, `enderio/build.gradle.kts`, `enderio-conduits/build.gradle.kts`, `gradle.properties` | Added FTB Ultimine Maven repositories, declared `ftbUltimineVersion` property, and included FTB Ultimine as a dependency for both runtime and compile-only contexts. | | **Integration logic: FTB Ultimine compatibility**<br>`enderio-conduits/src/main/java/com/enderio/conduits/EnderIOConduits.java`, `enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/FTBUltimineCompat.java` | Added conditional FTB Ultimine integration initialisation; introduced a compatibility class to register block selection and break handlers. | | **Conduit bundle item drop logic**<br>`enderio-conduits/src/main/java/com/enderio/conduits/common/conduit/bundle/ConduitBundleBlockEntity.java` | Overloaded `removeConduit` and item drop methods to accept explicit drop positions; improved facade provider handling in NBT loading. | | **FTB Ultimine integration: Block break/selection handlers**<br>`enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockBreakHandler.java`, `enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockSelectionHandler.java` | Introduced new handlers for block breaking and selection to support vein mining of conduits, including network and facade-aware logic. | | **Documentation and annotations**<br>`enderio-conduits/src/main/java/com/enderio/conduits/api/bundle/ConduitBundle.java`, `enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/package-info.java` | Added a TODO comment for potential future API enhancement; added package-level non-null annotations for integration package. | ## Sequence Diagram(s) ```mermaid sequenceDiagram participant Player participant EnderIOConduits participant FTBUltimineCompat participant FTB Ultimine (Event Bus) participant ConduitBlockBreakHandler participant ConduitBlockSelectionHandler Player->>EnderIOConduits: Game start / mod load EnderIOConduits->>FTBUltimineCompat: If FTB Ultimine is loaded, call init() FTBUltimineCompat->>FTB Ultimine (Event Bus): Register BlockSelectionHandler and BlockBreakHandler Player->>FTB Ultimine (Event Bus): Initiates vein mining (block break/selection) FTB Ultimine (Event Bus)->>ConduitBlockSelectionHandler: customSelectionCheck(...) ConduitBlockSelectionHandler-->>FTB Ultimine (Event Bus): Return selection result FTB Ultimine (Event Bus)->>ConduitBlockBreakHandler: breakBlock(...) ConduitBlockBreakHandler-->>FTB Ultimine (Event Bus): Return break result FTB Ultimine (Event Bus)->>ConduitBlockBreakHandler: postBreak(...) ``` ## Estimated code review effort 🎯 4 (Complex) | ⏱️ ~40 minutes ## Possibly related issues - Team-EnderIO/EnderIO#1088: Implements direct FTB Ultimine integration for conduit bundles, addressing vein mining compatibility as requested. ## Possibly related PRs - Team-EnderIO/EnderIO#1025: Shares extensive conduit system changes and API updates, directly related in scope and content. ## Suggested labels `Area-Backend`, `Type-Enhancement` ## Poem > A rabbit hopped through Maven fields anew, > With Ultimine in tow, it knew what to do. > Conduits now break in a magical chain, > Facades and networks, all handled with brain. > Integration complete, the code’s looking bright— > Let’s vein mine together, from morning till night! > 🐇✨ <!-- walkthrough_end --> <!-- announcements_start --> > [!NOTE] > <details open="true"> > <summary>⚡️ Unit Test Generation is now available in beta!</summary> > > Learn more [here](https://docs.coderabbit.ai/finishing-touches/unit-test-generation), or try it out under "Finishing Touches" below. > > </details> <!-- announcements_end --> <!-- internal state start --> <!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNwSPbABsvkCiQBHbGlcSHFcLzpIACIAVS9xZnhySABhfAxabHVkdOZuamjIOUhsREpIG3wpCgA2AFZalAxcCkVsBmkFfOp4N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CShImy0T6JjE7gXQDrI7RDJ1E5gAwG4B1lFWuCVieq1CCoxY4OUgwAAG9Gm0QUCv6ATiIBogXAAANoABdIUIVKmx9DLgZUyqVVIMAABfAwDlLYEoSkpKUtKbgDikER9AQAA== --> <!-- internal state end --> <!-- finishing_touch_checkbox_start --> <details> <summary>✨ Finishing Touches</summary> - [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings <details> <summary>🧪 Generate unit tests</summary> - [ ] <!-- {"checkboxId": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} --> Create PR with unit tests - [ ] <!-- {"checkboxId": "07f1e7d6-8a8e-4e23-9900-8731c2c87f58", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} --> Post copyable unit tests in a comment - [ ] <!-- {"checkboxId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} --> Commit unit tests in branch `feat/conduit-ultimine-compat` </details> </details> <!-- finishing_touch_checkbox_end --> <!-- tips_start --> --- Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary>❤️ Share</summary> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </details> <details> <summary>🪧 Tips</summary> ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=Team-EnderIO/EnderIO&utm_content=1097): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit <commit_id>, please review it.` - `Explain this complex logic.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai explain this code block.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@coderabbitai read src/utils.ts and explain its main purpose.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` ### Support Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions. ### CodeRabbit Commands (Invoked using PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR. - `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR. - `@coderabbitai generate unit tests` to generate unit tests for this PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### CodeRabbit Configuration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements. </details> <!-- tips_end -->
Rover656 commented 2025-08-02 20:52:38 +00:00 (Migrated from github.com)

Once FTB Ultimine releases the latest block selection API, this will be ready for merge.

Once FTB Ultimine releases the latest block selection API, this will be ready for merge.
coderabbitai[bot] (Migrated from github.com) reviewed 2025-08-02 20:55:47 +00:00
coderabbitai[bot] (Migrated from github.com) left a comment

Actionable comments posted: 1

🧹 Nitpick comments (5)
buildSrc/shared.gradle.kts (2)

62-68: Minor typo in repository name

"FTB Maven Snaphsots""FTB Maven Snapshots". Keeping spellings consistent helps when grepping logs or Gradle output.

-    name = "FTB Maven Snaphsots"
+    name = "FTB Maven Snapshots"

70-76: Duplicate group across release + snapshot repos may cause version resolution surprises

Both new FTB repositories include the same group filter dev.ftb.mods. Because Gradle searches repositories in declaration order, a snapshot of a library that also exists as a release can silently win and leak into production builds.

Consider narrowing the snapshot repo to mavenContent { snapshotsOnly() } (Gradle 8-style) or moving it below the release repo and adding metadataSources { mavenPom() } to be explicit.

enderio-conduits/src/main/java/com/enderio/conduits/api/bundle/ConduitBundle.java (1)

55-56: Prefer tracking TODOs externally

In‐code TODOs age quickly. If adding a Nullable<Consumer<ItemStack>> drop hook is genuinely planned, open a GitHub issue and reference it here (// TODO(#1234): …). That keeps the backlog visible and searchable.

enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockSelectionHandler.java (1)

18-66: Consider improving robustness of the selection logic.

The implementation correctly handles facade and network-based selection scenarios. However, there are a few areas that could be more robust:

  1. Ray tracing range: Line 47 uses a hardcoded +5 range extension which may not be reliable across different configurations.
  2. Null safety: Lines 59-60 call getConduitNode() without null checks, which could throw exceptions if nodes are invalid.
  3. Side validation: The method doesn't verify it's running on the server side before accessing conduit nodes.

Consider adding defensive checks:

+ // Ensure we're on the server side for node access
+ if (level.isClientSide()) {
+     return Result.PASS;
+ }

  var origNetwork = origConduitBundle.getConduitNode(conduit).getNetwork();
  var network = conduitBundle.getConduitNode(conduit).getNetwork();
+ 
+ // Verify both networks exist
+ if (origNetwork == null || network == null) {
+     return Result.FALSE;
+ }
enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockBreakHandler.java (1)

102-103: Remove empty default case.

The empty default case is unnecessary when using sealed interfaces with exhaustive pattern matching.

Remove these lines:

-        default -> {
-        }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 84bfe2477a and a6f1cfcb14.

📒 Files selected for processing (11)
  • buildSrc/shared.gradle.kts (1 hunks)
  • enderio-conduits/build.gradle.kts (2 hunks)
  • enderio-conduits/src/main/java/com/enderio/conduits/EnderIOConduits.java (2 hunks)
  • enderio-conduits/src/main/java/com/enderio/conduits/api/bundle/ConduitBundle.java (1 hunks)
  • enderio-conduits/src/main/java/com/enderio/conduits/common/conduit/bundle/ConduitBundleBlockEntity.java (7 hunks)
  • enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockBreakHandler.java (1 hunks)
  • enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockSelectionHandler.java (1 hunks)
  • enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/FTBUltimineCompat.java (1 hunks)
  • enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/package-info.java (1 hunks)
  • enderio/build.gradle.kts (2 hunks)
  • gradle.properties (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: for neoforge event subscribers, entitytickevent.pre and other runtime gameplay events should use bus...
Learnt from: Rover656
PR: Team-EnderIO/EnderIO#1074
File: enderio-machines/src/main/java/com/enderio/machines/common/blocks/powered_spawner/MobSpawnTask.java:24-24
Timestamp: 2025-06-08T14:32:16.165Z
Learning: For NeoForge event subscribers, EntityTickEvent.Pre and other runtime gameplay events should use bus = EventBusSubscriber.Bus.GAME, not EventBusSubscriber.Bus.FORGE. The FORGE bus is for mod lifecycle events while GAME bus is for gameplay events.

Applied to files:

  • enderio-conduits/src/main/java/com/enderio/conduits/EnderIOConduits.java
Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Run Tests
  • GitHub Check: Analyze (java-kotlin)
🔇 Additional comments (17)
gradle.properties (1)

46-46: Snapshot version warrants a merge-blocker check

ftbUltimineVersion is pinned to a -SNAPSHOT. The PR description says we must wait for a stable Ultimine release before merging, but nothing in the build scripts enforces that hold. Please either

  1. replace the snapshot with the upcoming release tag before merge, or
  2. add a CI guard (e.g. workflow check) that fails while the property ends with -SNAPSHOT.

This prevents shipping dev builds into public artefacts by accident.

buildSrc/shared.gradle.kts (1)

78-84: Architectury Maven addition looks fine

Repository URL and group filter are correct; no action required.

enderio-conduits/build.gradle.kts (2)

55-56: Property injection looks good

ftbUltimineVersion is wired through gradle.properties; nothing else to flag.


78-80: Check dev/IDE run-configs for missing runtime Ultimine

The module declares Ultimine as compileOnly. That is fine for produced jars (root project supplies the runtime), but local runClient tasks inside this sub-project will start without Ultimine and the new compat code will not load.

If developers ever run the conduits module standalone, add:

runtimeOnly("dev.ftb.mods:ftb-ultimine-neoforge:$ftbUltimineVersion")

guarded with if (project.hasProperty("includeUltimineRuntime")) or similar.

enderio/build.gradle.kts (2)

31-31: Property wired correctly

No issues – consistent with sub-project.


78-80: Runtime-only dependency is fine but beware SNAPSHOT churn

The root jar pulls Ultimine at runtime, completing what conduits marked as compileOnly. Just ensure the snapshot is periodically refreshed or replaced by a release before publishing to Modrinth/CurseForge.

enderio-conduits/src/main/java/com/enderio/conduits/EnderIOConduits.java (2)

19-21: LGTM!

The added imports are appropriate for the FTB Ultimine integration and follow the expected patterns for conditional mod integration.

Also applies to: 25-26, 32-32


60-62: LGTM!

The conditional mod loading check follows best practices for optional mod integration in NeoForge. The pattern correctly prevents initialisation when FTB Ultimine is not present.

enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/package-info.java (1)

1-4: LGTM!

The package-level nullability annotations establish good default null safety contracts for the FTB Ultimine integration classes.

enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/FTBUltimineCompat.java (1)

6-12: LGTM!

The compatibility class correctly registers the FTB Ultimine handlers using the appropriate event registration pattern. The singleton handler instances and lambda registration approach are well-structured.

The TODO comment indicates this is temporary architecture - consider addressing this in future iterations.

enderio-conduits/src/main/java/com/enderio/conduits/common/conduit/bundle/ConduitBundleBlockEntity.java (5)

585-591: LGTM!

The method overload cleanly extends functionality whilst maintaining backward compatibility. The original method delegates to the new variant using the block entity's position as default.


609-611: LGTM!

The item dropping methods are consistently updated to support positional drops. The delegation pattern maintains compatibility whilst the new variants correctly use the provided coordinates for item entity placement.

Also applies to: 679-686


938-947: LGTM!

The dropConnectionItems method correctly accepts a position parameter and uses the positional dropItem method, maintaining consistency with the overall architectural changes.


1122-1124: LGTM!

The positional dropFacadeItem method follows the established pattern for positional item drops, maintaining consistency with other drop methods.


1469-1470: LGTM!

Explicitly setting facadeProvider to ItemStack.EMPTY when the NBT key is missing ensures a consistent default state and improves defensive programming practices.

enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockBreakHandler.java (2)

66-90: Well-implemented facade removal logic.

The facade breaking implementation correctly handles item drops at the origin position, creative mode checks, and light level updates.


120-125: Excellent use of sealed interfaces and records.

The sealed interface pattern with record implementations provides type safety and enables exhaustive pattern matching in the switch expression.

**Actionable comments posted: 1** <details> <summary>🧹 Nitpick comments (5)</summary><blockquote> <details> <summary>buildSrc/shared.gradle.kts (2)</summary><blockquote> `62-68`: **Minor typo in repository name** `"FTB Maven Snaphsots"` → `"FTB Maven Snapshots"`. Keeping spellings consistent helps when grepping logs or Gradle output. ```diff - name = "FTB Maven Snaphsots" + name = "FTB Maven Snapshots" ``` --- `70-76`: **Duplicate group across release + snapshot repos may cause version resolution surprises** Both new FTB repositories include the same group filter `dev.ftb.mods`. Because Gradle searches repositories in declaration order, a snapshot of a library that also exists as a release can silently win and leak into production builds. Consider narrowing the snapshot repo to `mavenContent { snapshotsOnly() }` (Gradle 8-style) or moving it below the release repo and adding `metadataSources { mavenPom() }` to be explicit. </blockquote></details> <details> <summary>enderio-conduits/src/main/java/com/enderio/conduits/api/bundle/ConduitBundle.java (1)</summary><blockquote> `55-56`: **Prefer tracking TODOs externally** In‐code TODOs age quickly. If adding a `Nullable<Consumer<ItemStack>>` drop hook is genuinely planned, open a GitHub issue and reference it here (`// TODO(#1234): …`). That keeps the backlog visible and searchable. </blockquote></details> <details> <summary>enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockSelectionHandler.java (1)</summary><blockquote> `18-66`: **Consider improving robustness of the selection logic.** The implementation correctly handles facade and network-based selection scenarios. However, there are a few areas that could be more robust: 1. **Ray tracing range**: Line 47 uses a hardcoded `+5` range extension which may not be reliable across different configurations. 2. **Null safety**: Lines 59-60 call `getConduitNode()` without null checks, which could throw exceptions if nodes are invalid. 3. **Side validation**: The method doesn't verify it's running on the server side before accessing conduit nodes. Consider adding defensive checks: ```diff + // Ensure we're on the server side for node access + if (level.isClientSide()) { + return Result.PASS; + } var origNetwork = origConduitBundle.getConduitNode(conduit).getNetwork(); var network = conduitBundle.getConduitNode(conduit).getNetwork(); + + // Verify both networks exist + if (origNetwork == null || network == null) { + return Result.FALSE; + } ``` </blockquote></details> <details> <summary>enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockBreakHandler.java (1)</summary><blockquote> `102-103`: **Remove empty default case.** The empty default case is unnecessary when using sealed interfaces with exhaustive pattern matching. Remove these lines: ```diff - default -> { - } ``` </blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used: CodeRabbit UI** **Review profile: CHILL** **Plan: Pro** <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 84bfe2477a65a3a08fddde900ab2367fde300798 and a6f1cfcb146b3faa31243069fda65e0a794bcddc. </details> <details> <summary>📒 Files selected for processing (11)</summary> * `buildSrc/shared.gradle.kts` (1 hunks) * `enderio-conduits/build.gradle.kts` (2 hunks) * `enderio-conduits/src/main/java/com/enderio/conduits/EnderIOConduits.java` (2 hunks) * `enderio-conduits/src/main/java/com/enderio/conduits/api/bundle/ConduitBundle.java` (1 hunks) * `enderio-conduits/src/main/java/com/enderio/conduits/common/conduit/bundle/ConduitBundleBlockEntity.java` (7 hunks) * `enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockBreakHandler.java` (1 hunks) * `enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockSelectionHandler.java` (1 hunks) * `enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/FTBUltimineCompat.java` (1 hunks) * `enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/package-info.java` (1 hunks) * `enderio/build.gradle.kts` (2 hunks) * `gradle.properties` (1 hunks) </details> <details> <summary>🧰 Additional context used</summary> <details> <summary>🧠 Learnings (1)</summary> <details> <summary>📚 Learning: for neoforge event subscribers, entitytickevent.pre and other runtime gameplay events should use bus...</summary> ``` Learnt from: Rover656 PR: Team-EnderIO/EnderIO#1074 File: enderio-machines/src/main/java/com/enderio/machines/common/blocks/powered_spawner/MobSpawnTask.java:24-24 Timestamp: 2025-06-08T14:32:16.165Z Learning: For NeoForge event subscribers, EntityTickEvent.Pre and other runtime gameplay events should use bus = EventBusSubscriber.Bus.GAME, not EventBusSubscriber.Bus.FORGE. The FORGE bus is for mod lifecycle events while GAME bus is for gameplay events. ``` **Applied to files:** - `enderio-conduits/src/main/java/com/enderio/conduits/EnderIOConduits.java` </details> </details> </details> <details> <summary>⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)</summary> * GitHub Check: Run Tests * GitHub Check: Analyze (java-kotlin) </details> <details> <summary>🔇 Additional comments (17)</summary><blockquote> <details> <summary>gradle.properties (1)</summary> `46-46`: **Snapshot version warrants a merge-blocker check** `ftbUltimineVersion` is pinned to a `-SNAPSHOT`. The PR description says we must wait for a stable Ultimine release before merging, but nothing in the build scripts enforces that hold. Please either 1. replace the snapshot with the upcoming release tag before merge, or 2. add a CI guard (e.g. workflow check) that fails while the property ends with `-SNAPSHOT`. This prevents shipping dev builds into public artefacts by accident. </details> <details> <summary>buildSrc/shared.gradle.kts (1)</summary> `78-84`: **Architectury Maven addition looks fine** Repository URL and group filter are correct; no action required. </details> <details> <summary>enderio-conduits/build.gradle.kts (2)</summary> `55-56`: **Property injection looks good** `ftbUltimineVersion` is wired through `gradle.properties`; nothing else to flag. --- `78-80`: **Check dev/IDE run-configs for missing runtime Ultimine** The module declares Ultimine as `compileOnly`. That is fine for produced jars (root project supplies the runtime), but local `runClient` tasks inside this sub-project will start without Ultimine and the new compat code will not load. If developers ever run the conduits module standalone, add: ```kotlin runtimeOnly("dev.ftb.mods:ftb-ultimine-neoforge:$ftbUltimineVersion") ``` guarded with `if (project.hasProperty("includeUltimineRuntime"))` or similar. </details> <details> <summary>enderio/build.gradle.kts (2)</summary> `31-31`: **Property wired correctly** No issues – consistent with sub-project. --- `78-80`: **Runtime-only dependency is fine but beware SNAPSHOT churn** The root jar pulls Ultimine at runtime, completing what conduits marked as `compileOnly`. Just ensure the snapshot is periodically refreshed or replaced by a release before publishing to Modrinth/CurseForge. </details> <details> <summary>enderio-conduits/src/main/java/com/enderio/conduits/EnderIOConduits.java (2)</summary> `19-21`: **LGTM!** The added imports are appropriate for the FTB Ultimine integration and follow the expected patterns for conditional mod integration. Also applies to: 25-26, 32-32 --- `60-62`: **LGTM!** The conditional mod loading check follows best practices for optional mod integration in NeoForge. The pattern correctly prevents initialisation when FTB Ultimine is not present. </details> <details> <summary>enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/package-info.java (1)</summary> `1-4`: **LGTM!** The package-level nullability annotations establish good default null safety contracts for the FTB Ultimine integration classes. </details> <details> <summary>enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/FTBUltimineCompat.java (1)</summary> `6-12`: **LGTM!** The compatibility class correctly registers the FTB Ultimine handlers using the appropriate event registration pattern. The singleton handler instances and lambda registration approach are well-structured. The TODO comment indicates this is temporary architecture - consider addressing this in future iterations. </details> <details> <summary>enderio-conduits/src/main/java/com/enderio/conduits/common/conduit/bundle/ConduitBundleBlockEntity.java (5)</summary> `585-591`: **LGTM!** The method overload cleanly extends functionality whilst maintaining backward compatibility. The original method delegates to the new variant using the block entity's position as default. --- `609-611`: **LGTM!** The item dropping methods are consistently updated to support positional drops. The delegation pattern maintains compatibility whilst the new variants correctly use the provided coordinates for item entity placement. Also applies to: 679-686 --- `938-947`: **LGTM!** The `dropConnectionItems` method correctly accepts a position parameter and uses the positional `dropItem` method, maintaining consistency with the overall architectural changes. --- `1122-1124`: **LGTM!** The positional `dropFacadeItem` method follows the established pattern for positional item drops, maintaining consistency with other drop methods. --- `1469-1470`: **LGTM!** Explicitly setting `facadeProvider` to `ItemStack.EMPTY` when the NBT key is missing ensures a consistent default state and improves defensive programming practices. </details> <details> <summary>enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockBreakHandler.java (2)</summary> `66-90`: **Well-implemented facade removal logic.** The facade breaking implementation correctly handles item drops at the origin position, creative mode checks, and light level updates. --- `120-125`: **Excellent use of sealed interfaces and records.** The sealed interface pattern with record implementations provides type safety and enables exhaustive pattern matching in the switch expression. </details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
@ -0,0 +1,117 @@
package com.enderio.conduits.integration.ftb_ultimine;
coderabbitai[bot] (Migrated from github.com) commented 2025-08-02 20:55:47 +00:00

⚠️ Potential issue

Use ConcurrentHashMap for thread-safe player operations.

The breakOperations map is accessed by multiple players potentially from different threads. Using a regular HashMap could lead to race conditions and data corruption.

Apply this diff to fix the concurrency issue:

-import com.google.common.collect.Maps;
+import java.util.concurrent.ConcurrentHashMap;
-private final Map<Player, BreakOperation> breakOperations = Maps.newHashMap();
+private final Map<Player, BreakOperation> breakOperations = new ConcurrentHashMap<>();
🤖 Prompt for AI Agents
In
enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockBreakHandler.java
at line 25, replace the current HashMap implementation of breakOperations with a
ConcurrentHashMap to ensure thread-safe access when multiple players interact
concurrently. This change prevents race conditions and data corruption by using
a thread-safe map implementation.
_⚠️ Potential issue_ **Use ConcurrentHashMap for thread-safe player operations.** The `breakOperations` map is accessed by multiple players potentially from different threads. Using a regular HashMap could lead to race conditions and data corruption. Apply this diff to fix the concurrency issue: ```diff -import com.google.common.collect.Maps; +import java.util.concurrent.ConcurrentHashMap; ``` ```diff -private final Map<Player, BreakOperation> breakOperations = Maps.newHashMap(); +private final Map<Player, BreakOperation> breakOperations = new ConcurrentHashMap<>(); ``` <details> <summary>🤖 Prompt for AI Agents</summary> ``` In enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockBreakHandler.java at line 25, replace the current HashMap implementation of breakOperations with a ConcurrentHashMap to ensure thread-safe access when multiple players interact concurrently. This change prevents race conditions and data corruption by using a thread-safe map implementation. ``` </details> <!-- fingerprinting:phantom:medusa:lion --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] (Migrated from github.com) reviewed 2025-08-04 18:27:38 +00:00
coderabbitai[bot] (Migrated from github.com) left a comment

Actionable comments posted: 0

♻️ Duplicate comments (1)
enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockBreakHandler.java (1)

18-24: LGTM! Thread safety concern addressed.

The use of ConcurrentHashMap properly addresses the previous review comment about thread safety. The enum singleton pattern is also an excellent choice for this type of handler.

🧹 Nitpick comments (1)
enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockBreakHandler.java (1)

39-57: LGTM! Proper origin block context capture.

The logic correctly captures the breaking context (facade vs specific conduit) and stores it for subsequent blocks. The facade visibility check and conduit identification from hit result are implemented properly.

Note the TODO on line 39 suggests future refactoring to share logic with ConduitBundleBlock.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a6f1cfcb14 and 4e331dd5b8.

📒 Files selected for processing (4)
  • buildSrc/shared.gradle.kts (1 hunks)
  • enderio-conduits/src/main/java/com/enderio/conduits/api/bundle/ConduitBundle.java (1 hunks)
  • enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockBreakHandler.java (1 hunks)
  • gradle.properties (1 hunks)
Files skipped from review due to trivial changes (1)
  • enderio-conduits/src/main/java/com/enderio/conduits/api/bundle/ConduitBundle.java
🚧 Files skipped from review as they are similar to previous changes (2)
  • gradle.properties
  • buildSrc/shared.gradle.kts
Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Run Tests
  • GitHub Check: Analyze (java-kotlin)
🔇 Additional comments (4)
enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockBreakHandler.java (4)

26-37: LGTM! Proper validation and early return.

The validation logic correctly identifies conduit blocks and returns PASS for non-conduit blocks, allowing other handlers to process them appropriately.


59-96: LGTM! Comprehensive handling of break operations.

The switch expression with pattern matching is well-implemented. Both facade and conduit break operations include proper validation:

  • Facade operations verify the facade still exists and matches the original
  • Conduit operations verify the conduit is still present in the bundle
  • Light updates are handled correctly for facade changes
  • Creative mode check prevents item duplication

98-105: LGTM! Proper cleanup logic.

The cleanup correctly removes the entire block when the bundle becomes empty, or fires a BLOCK_DESTROY game event when conduits remain. This ensures proper game mechanics are maintained.


107-117: LGTM! Clean resource management and type-safe design.

The postBreak method properly cleans up break operations to prevent memory leaks. The sealed interface with private records provides excellent type safety and clearly separates the two operation types.

**Actionable comments posted: 0** <details> <summary>♻️ Duplicate comments (1)</summary><blockquote> <details> <summary>enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockBreakHandler.java (1)</summary><blockquote> `18-24`: **LGTM! Thread safety concern addressed.** The use of `ConcurrentHashMap` properly addresses the previous review comment about thread safety. The enum singleton pattern is also an excellent choice for this type of handler. </blockquote></details> </blockquote></details> <details> <summary>🧹 Nitpick comments (1)</summary><blockquote> <details> <summary>enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockBreakHandler.java (1)</summary><blockquote> `39-57`: **LGTM! Proper origin block context capture.** The logic correctly captures the breaking context (facade vs specific conduit) and stores it for subsequent blocks. The facade visibility check and conduit identification from hit result are implemented properly. Note the TODO on line 39 suggests future refactoring to share logic with `ConduitBundleBlock`. </blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used: CodeRabbit UI** **Review profile: CHILL** **Plan: Pro** <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between a6f1cfcb146b3faa31243069fda65e0a794bcddc and 4e331dd5b83905f3e9bff846f99169f52cf17211. </details> <details> <summary>📒 Files selected for processing (4)</summary> * `buildSrc/shared.gradle.kts` (1 hunks) * `enderio-conduits/src/main/java/com/enderio/conduits/api/bundle/ConduitBundle.java` (1 hunks) * `enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockBreakHandler.java` (1 hunks) * `gradle.properties` (1 hunks) </details> <details> <summary>✅ Files skipped from review due to trivial changes (1)</summary> * enderio-conduits/src/main/java/com/enderio/conduits/api/bundle/ConduitBundle.java </details> <details> <summary>🚧 Files skipped from review as they are similar to previous changes (2)</summary> * gradle.properties * buildSrc/shared.gradle.kts </details> <details> <summary>⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)</summary> * GitHub Check: Run Tests * GitHub Check: Analyze (java-kotlin) </details> <details> <summary>🔇 Additional comments (4)</summary><blockquote> <details> <summary>enderio-conduits/src/main/java/com/enderio/conduits/integration/ftb_ultimine/ConduitBlockBreakHandler.java (4)</summary> `26-37`: **LGTM! Proper validation and early return.** The validation logic correctly identifies conduit blocks and returns `PASS` for non-conduit blocks, allowing other handlers to process them appropriately. --- `59-96`: **LGTM! Comprehensive handling of break operations.** The switch expression with pattern matching is well-implemented. Both facade and conduit break operations include proper validation: - Facade operations verify the facade still exists and matches the original - Conduit operations verify the conduit is still present in the bundle - Light updates are handled correctly for facade changes - Creative mode check prevents item duplication --- `98-105`: **LGTM! Proper cleanup logic.** The cleanup correctly removes the entire block when the bundle becomes empty, or fires a `BLOCK_DESTROY` game event when conduits remain. This ensures proper game mechanics are maintained. --- `107-117`: **LGTM! Clean resource management and type-safe design.** The `postBreak` method properly cleans up break operations to prevent memory leaks. The sealed interface with private records provides excellent type safety and clearly separates the two operation types. </details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
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#1097
No description provided.