Network tool filter to a single cable network#456
Merged
TeamDman merged 11 commits intoTeamDman:1.19.2from Feb 7, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds the ability to “focus” the Network Tool overlay on a single cable network by holding TOGGLE_NETWORK_TOOL_OVERLAY_KEY and right-clicking a block, with a red error highlight when no cable network exists at the chosen position.
Changes:
- Extend
ServerboundNetworkToolUsePacketto include the hand used and a modifier flag, and route handling to either inspection or overlay focus selection. - Introduce network-tool overlay modes (
SHOW_ALL,SHOW_SELECTED_NETWORK,HIDDEN) and selected-network position storage inNetworkToolItem. - Render a red error overlay marker at the selected position when no network is found.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
platform/minecraft/src/main/java/ca/teamdman/sfm/common/net/ServerboundNetworkToolUsePacket.java |
Adds modifier-based behavior to select an overlay focus position vs. do inspection. |
platform/minecraft/src/main/java/ca/teamdman/sfm/common/net/ServerboundNetworkToolToggleOverlayPacket.java |
Updates overlay toggle behavior to cycle a new mode enum and refresh cached positions. |
platform/minecraft/src/main/java/ca/teamdman/sfm/common/item/NetworkToolItem.java |
Adds overlay mode/selection NBT + recomputation logic for overlay positions. |
platform/minecraft/src/main/java/ca/teamdman/sfm/client/handler/ItemWorldRenderer.java |
Adds red error rendering when a selected focus position has no network. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
platform/minecraft/src/main/java/ca/teamdman/sfm/common/item/NetworkToolItem.java
Outdated
Show resolved
Hide resolved
platform/minecraft/src/main/java/ca/teamdman/sfm/common/item/NetworkToolItem.java
Outdated
Show resolved
Hide resolved
platform/minecraft/src/main/java/ca/teamdman/sfm/common/item/NetworkToolItem.java
Show resolved
Hide resolved
platform/minecraft/src/main/java/ca/teamdman/sfm/common/item/NetworkToolItem.java
Outdated
Show resolved
Hide resolved
platform/minecraft/src/main/java/ca/teamdman/sfm/client/handler/ItemWorldRenderer.java
Outdated
Show resolved
Hide resolved
…etworkToolItem.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…r/ItemWorldRenderer.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…nD/SuperFactoryManager into masond/network-tool-overlay-select
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #450.
Hold the TOGGLE_NETWORK_TOOL_OVERLAY_KEY and right click a block to filter the network tool overlay to only the cable network containing that block. If there's no cable network for that block, it's just highlighted in red to indicate an error.