[8.0] Conduit block rewrite #1025
No reviewers
Labels
No labels
Area-Assets
Area-Backend
Area-Conduits
Area-Datapacks
Area-Lang
Area-Mod Compat
Area-Parity
Area-Rendering
Good first issue
MC-1.19.2
MC-1.20.1
MC-1.20.4
MC-1.20.6
MC-1.21
MC-1.21.1
Modtoberfest
P-0-High
P-1-Medium
P-2-Low
Status-Awaiting Response
Status-Behind-Flag
Status-Blocked
Status-Cannot Reproduce
Status-Duplicate
Status-Help Wanted
Status-Incomplete Report
Status-Invalid
Status-Needs LTS Backport
Status-Needs Updating
Status-Stale
Status-To Implement
Status-Triage
Status-Wontfix
Status-Wontmerge
Type-Backport
Type-Bug
Type-Documentation
Type-Enhancement
Type-Question
Type-RFC
Type-Suggestion
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Team-EnderIO/EnderIO#1025
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/conduit-rewrite"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Replaces #958 which had a nasty commit history and became difficult to rebase.
TODO
Breaking Changes
List any breaking changes in this section, such as: changed/removed APIs, changed or removed items/blocks or modifications to recipes and gameplay mechanics.
Major API breaks for mods that add or interact with conduits.
Has supporting logic for loading existing conduit bundles, but it is not saved in a backward-compatible format (i.e. 7.2 cannot be safely downgraded from)
Checklist
Summary by CodeRabbit
New Features
Improvements
Bug Fixes
Removals/Deprecations
Refactor
Chores
Style
Documentation
@coderabbitai summary
✅ Actions performed
Summary regeneration triggered.
Walkthrough
This update introduces a substantial refactor and expansion of the conduit API and client systems. It adds new interfaces, records, enums, and classes for conduit bundles, connections, menus, models, and tickers, while deprecating or removing legacy types. Numerous package reorganisations and method signature changes improve type flexibility and modularity. The client setup is updated to register new model modifiers and screen types, and visual/particle effects for conduit bundles are enhanced. Several filtering interfaces are replaced or consolidated, and new filter APIs are introduced for items, fluids, and entities. Miscellaneous improvements include tooltip handling, slot creation customisation, and dependency updates.
Changes
enderio-conduits/api/,enderio-conduits/api/bundle/,enderio-conduits/api/connection/,enderio-conduits/api/network/,enderio-conduits/api/model/,enderio-conduits/api/screen/,enderio-conduits/api/ticker/enderio-conduits/client/ConduitBundleExtensionfor particle effects; updatedConduitClientSetupto register new model modifiers, screen types, and client extensions; import and registration logic updated.enderio-conduits/common/conduit/block/→common/conduit/bundle/enderio-conduits-modded/src/main/java/com/enderio/modconduits/mods/mekanism/,enderio-conduits-modded/src/main/java/com/enderio/modconduits/mods/refinedstorage/enderio-base/api/filter/ItemFilter,FluidFilter,FilterMenuProvider; removed legacy interfaces (ResourceFilter,ItemStackFilter,FluidStackFilter); refinedEntityFiltermethods.enderio-base/api/misc/RedstoneControl.javaisRedstoneSensitiveproperty to enum, updated constants and constructor, added getter.enderio-base/client/gui/widget/DyeColorPickerWidget.java,enderio-base/common/lang/EIOEnumLang.javaenderio-base/common/lang/EIOLang.javaenderio-base/common/blockentity/Wrenchable.java,enderio-base/common/item/tool/YetaWrenchItem.javaUseOnContext; removed legacy method usage.endercore/client/gui/widgets/IconButtonclass; removed legacyToggleImageButton; improved tooltip and toggle logic in related widgets.endercore/common/menu/BaseEnderMenu.javaendercore/common/util/TooltipUtil.javastylemethod toMutableComponent.endercore/common/blockentity/EnderBlockEntity.javabuild.gradle.kts,enderio-conduits/build.gradle.ktsSequence Diagram(s)
Possibly related PRs
BaseEnumPickerWidgetfor scrolling and ordinal usage, related to tooltip and value management changes in this PR.Suggested labels
P-0-HighPoem
✨ Finishing Touches
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:
I pushed a fix in commit <commit_id>, please review it.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.@coderabbitaiin 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 generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.Support
Need help? Create a ticket on our support page for assistance with any issues or questions.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR.@coderabbitai generate sequence diagramto generate a sequence diagram of the changes in this PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.Other keywords and placeholders
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed.@coderabbitai summaryto generate the high-level summary at a specific location in the PR description.@coderabbitaianywhere in the PR title to generate the title automatically.CodeRabbit Configuration File (
.coderabbit.yaml).coderabbit.yamlfile to the root of your repository.# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.jsonDocumentation and Community
@coderabbitai review
✅ Actions performed
Review triggered.
🛑 Comments failed to post (28)
there are some nice improvements there, well done
I think this should be final?
replace this comment with either ensure annotation or the UseOnly Annotation
also both constructors are identical, is that itended?
i think this should be reference equality
why is this checking hasCustomBackDestination? it will always be true and is already checked by AbstractFilterMenu#clickMenuButton
@ -0,0 +23,4 @@*/@ApiStatus.Experimental@ApiStatus.AvailableSince("8.0.0")public interface ConduitBundle {is there a reason that conduit additions/removals/queries are exposed as api, was there a request for this?
@ -0,0 +8,4 @@@ApiStatus.Experimentalpublic record ConnectionConfigType<T extends ConnectionConfig>(MapCodec<T> codec,StreamCodec<RegistryFriendlyByteBuf, T> streamCodec, Supplier<T> defaultSupplier) {rename defaultSupplier to factory if you want
@ -0,0 +35,4 @@ConduitMenuDataAccess<U> dataAccess);/*** Already projected into gui space (guiLeft & guiRight in Screen), so only local transformations required.@ -0,0 +296,4 @@public boolean isCustomRenderer() {return false;}dual-color redstone control? Not questioning or something, just interested in knowing more.
@ -0,0 +15,4 @@* A11Y tools for conduit block behaviours.*/@EventBusSubscriber(/* value = Dist.CLIENT, */modid = EnderIOConduits.MODULE_MOD_ID, bus = EventBusSubscriber.Bus.GAME)public class ConduitA11yManager {what will this be doing in the future?
Yep that's right, thanks
UseOnly is a good idea - and yes normally both constructors are identical, but they can have different overloads (i.e. client menu uses a buffer to load extra data while server menu reads from the BE)
@ -0,0 +23,4 @@*/@ApiStatus.Experimental@ApiStatus.AvailableSince("8.0.0")public interface ConduitBundle {The developer of Pipe Connector was looking for better ways to interact with the conduit bundles. I think they are useful utilities to expose
@ -0,0 +296,4 @@public boolean isCustomRenderer() {return false;}Redstone control for both insertion and extraction independently has been requested - while we're now in a position where this can be implemented from a technical standpoint, work needs to be done to render both colours well.
@ -0,0 +15,4 @@* A11Y tools for conduit block behaviours.*/@EventBusSubscriber(/* value = Dist.CLIENT, */modid = EnderIOConduits.MODULE_MOD_ID, bus = EventBusSubscriber.Bus.GAME)public class ConduitA11yManager {The intent is to make placing conduits easier by expanding the bounding box of the block when holding a conduit already present in the bundle, so users don't have to struggle with aiming for the tiny conduit square.
Still needs work however, so I've left it commented for now.
Thanks for the review :) I hope to continue working on this PR when Uni chills out a bit :)
I hope you are well!
Actionable comments posted: 1
🔭 Outside diff range comments (1)
🧹 Nitpick comments (2)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 0a7b37d70dedfbb014c5a153aed4ca11e070c968 and
232cfa188d.⛔ Files ignored due to path filters (21)
enderio-base/src/generated/resources/assets/enderio/lang/en_us.jsonis excluded by!**/generated/**enderio-base/src/generated/resources/assets/enderio/models/item/advanced_item_filter.jsonis excluded by!**/generated/**enderio-base/src/generated/resources/assets/enderio/models/item/basic_fluid_filter.jsonis excluded by!**/generated/**enderio-base/src/generated/resources/assets/enderio/models/item/basic_item_filter.jsonis excluded by!**/generated/**enderio-base/src/generated/resources/assets/enderio/models/item/basic_soul_filter.jsonis excluded by!**/generated/**enderio-base/src/generated/resources/assets/enderio/models/item/big_advanced_item_filter.jsonis excluded by!**/generated/**enderio-base/src/generated/resources/assets/enderio/models/item/big_item_filter.jsonis excluded by!**/generated/**enderio-base/src/generated/resources/data/enderio/advancement/recipes/misc/advanced_item_filter.jsonis excluded by!**/generated/**enderio-base/src/generated/resources/data/enderio/advancement/recipes/misc/basic_fluid_filter.jsonis excluded by!**/generated/**enderio-base/src/generated/resources/data/enderio/advancement/recipes/misc/basic_item_filter.jsonis excluded by!**/generated/**enderio-base/src/generated/resources/data/enderio/advancement/recipes/misc/basic_soul_filter.jsonis excluded by!**/generated/**enderio-base/src/generated/resources/data/enderio/advancement/recipes/misc/erase_advanced_item_filter.jsonis excluded by!**/generated/**enderio-base/src/generated/resources/data/enderio/advancement/recipes/misc/erase_basic_fluid_filter.jsonis excluded by!**/generated/**enderio-base/src/generated/resources/data/enderio/advancement/recipes/misc/erase_basic_item_filter.jsonis excluded by!**/generated/**enderio-base/src/generated/resources/data/enderio/recipe/advanced_item_filter.jsonis excluded by!**/generated/**enderio-base/src/generated/resources/data/enderio/recipe/basic_fluid_filter.jsonis excluded by!**/generated/**enderio-base/src/generated/resources/data/enderio/recipe/basic_item_filter.jsonis excluded by!**/generated/**enderio-base/src/generated/resources/data/enderio/recipe/basic_soul_filter.jsonis excluded by!**/generated/**enderio-base/src/generated/resources/data/enderio/recipe/erase_advanced_item_filter.jsonis excluded by!**/generated/**enderio-base/src/generated/resources/data/enderio/recipe/erase_basic_fluid_filter.jsonis excluded by!**/generated/**enderio-base/src/generated/resources/data/enderio/recipe/erase_basic_item_filter.jsonis excluded by!**/generated/**📒 Files selected for processing (23)
build.gradle.kts(1 hunks)endercore/src/main/java/com/enderio/core/client/gui/screen/EnderContainerScreen.java(3 hunks)endercore/src/main/java/com/enderio/core/client/gui/widgets/BaseEnumPickerWidget.java(1 hunks)endercore/src/main/java/com/enderio/core/client/gui/widgets/IconButton.java(1 hunks)endercore/src/main/java/com/enderio/core/client/gui/widgets/ToggleIconButton.java(1 hunks)endercore/src/main/java/com/enderio/core/client/gui/widgets/ToggleImageButton.java(0 hunks)endercore/src/main/java/com/enderio/core/client/icon/EnumIconMap.java(1 hunks)endercore/src/main/java/com/enderio/core/common/blockentity/EnderBlockEntity.java(1 hunks)endercore/src/main/java/com/enderio/core/common/menu/BaseBlockEntityMenu.java(1 hunks)endercore/src/main/java/com/enderio/core/common/menu/BaseEnderMenu.java(1 hunks)endercore/src/main/java/com/enderio/core/common/network/CoreNetwork.java(1 hunks)endercore/src/main/java/com/enderio/core/common/util/TooltipUtil.java(1 hunks)enderio-armory/src/main/java/com/enderio/armory/common/init/ArmoryNetwork.java(1 hunks)enderio-base/src/main/java/com/enderio/EnderIOBase.java(2 hunks)enderio-base/src/main/java/com/enderio/base/api/attachment/StoredEntityData.java(1 hunks)enderio-base/src/main/java/com/enderio/base/api/filter/EntityFilter.java(1 hunks)enderio-base/src/main/java/com/enderio/base/api/filter/FilterMenuProvider.java(1 hunks)enderio-base/src/main/java/com/enderio/base/api/filter/FluidFilter.java(1 hunks)enderio-base/src/main/java/com/enderio/base/api/filter/FluidStackFilter.java(0 hunks)enderio-base/src/main/java/com/enderio/base/api/filter/ItemFilter.java(1 hunks)enderio-base/src/main/java/com/enderio/base/api/filter/ItemStackFilter.java(0 hunks)enderio-base/src/main/java/com/enderio/base/api/filter/ResourceFilter.java(0 hunks)enderio-base/src/main/java/com/enderio/base/api/misc/RedstoneControl.java(2 hunks)💤 Files with no reviewable changes (4)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (7)
🧰 Additional context used
🧬 Code Graph Analysis (1)
enderio-base/src/main/java/com/enderio/EnderIOBase.java (2)
🪛 GitHub Actions: Verify Build
enderio-base/src/main/java/com/enderio/EnderIOBase.java
[error] 1-1: Spotless formatting check failed. Import order and formatting violations detected. Run './gradlew :enderio-base:spotlessApply' to fix.
enderio-base/src/main/java/com/enderio/base/api/attachment/StoredEntityData.java
[error] 1-1: Spotless formatting check failed. Import order and formatting violations detected. Run './gradlew :enderio-base:spotlessApply' to fix.
🔇 Additional comments (11)
@ -0,0 +37,4 @@protected void updateWidgetNarration(NarrationElementOutput pNarrationElementOutput) {}}🛠️ Refactor suggestion
Well-implemented IconButton class with minor accessibility improvement needed.
The IconButton class is a clean implementation of a button with an icon sprite. The design is straightforward, using composition with a Runnable for the action and proper constructor parameters. One improvement could be made:
The
updateWidgetNarrationmethod is empty, which could impact screen reader accessibility. Consider implementing narration support: