Skip to content

Add generic multi-resource networking - #35

Draft
Kauziin wants to merge 4 commits into
mainfrom
agent/universal-cable-networking
Draft

Add generic multi-resource networking#35
Kauziin wants to merge 4 commits into
mainfrom
agent/universal-cable-networking

Conversation

@Kauziin

@Kauziin Kauziin commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Refactors networking around generic multi-resource capabilities instead of Universal Cable-specific branches.
  • Adds dorios:multi_tube, dorios:multi_exporter, and dorios:multi_importer; UtilityCraft-owned channels are derived from the existing item, fluid, gas, and energy tags.
  • Adds resource-aware face configuration, including wrench UI and copy/paste rotation.
  • Adds an extensible pipe-resource registry so addons can expose additional face channels without hardcoding them in UtilityCore.
  • Adds generic composite endpoint components that reuse the existing item, fluid, and gas handlers.
  • Keeps addon-owned network scanning outside UtilityCore while retaining integration through generic script events.

Addon resource registration

Addons can register an additional channel with:

{
  "id": "overclock",
  "tag": "dorios:overclock_network",
  "translationKey": "ui.utilitycraft:universal_pipe.channel_overclock"
}

Registration uses the utilitycraft:register_pipe_resource script event. UtilityCraft emits utilitycraft:pipe_resource_registry_ready to make registration independent of behavior-pack evaluation order. Face changes emit utilitycraft:pipe_face_update so the owning addon can rescan its network.

Ascendant Technology registers overclock through this interface. The channel remains available in the wrench, while UtilityCore contains no Universal Cable or overclock-specific network rules. Both Universal Cable and Reinforced Cable consume the generic multi-tube capability; Reinforced Cable exposes only Energy and Overclock.

Compatibility

  • Existing single-resource tubes and endpoint tags remain supported.
  • Version 1 pipe-face documents continue to load unchanged; version 2 adds per-resource faces.
  • Unknown addon-owned channel identifiers remain persisted even when the owning addon is absent or has not registered yet.
  • Existing routes remain valid because importer metadata is optional.
  • Existing placed blocks do not need migration or replacement.
  • The existing UtilityCraft machinery overclock behavior is unchanged.

Performance

  • Ordinary single-resource tubes retain the simple global-face path.
  • Per-resource work is limited to blocks tagged as multi-resource.
  • Additional channel registration is event-driven and occurs only during initialization; it adds no polling or continuous scans.
  • Batched neighbor updates scan affected positions once and schedule only the UtilityCraft networks that were touched.
  • Fluid/gas importer lookups run only when optional importer route metadata is present.

Validation

  • Changed JavaScript passed syntax checks.
  • UtilityCraft's DoriosCore and DoriosLib audits passed.
  • Full UtilityCraft and Ascendant Technology entry bundling passed with the projects' expected external modules.
  • Registry tests covered built-in resources, idempotent addon registration, conflicting registration rejection, tag-based availability, unknown-channel preservation, and face-update notifications.
  • Ascendant Technology handshake tests covered initial registration, registry-ready retry, translation metadata, and overclock network rescanning.
  • Wrench form validation covered native RawMessage.with conversion and the Energy + Overclock toggle set.
  • Pipe-face compatibility checks covered version 1 loading, per-resource faces, ordinary tubes, opposite-face connections, tag-derived resources, and preservation of addon-owned channels.
  • Diff whitespace checks passed.

Runtime validation inside Minecraft is still recommended before marking the PR ready for review. The corresponding Ascendant Technology changes should remain in a separate PR.

@Kauziin
Kauziin force-pushed the agent/universal-cable-networking branch from f28a424 to 3b80808 Compare August 29, 2026 23:16
@Kauziin Kauziin changed the title Add universal cable networking Add generic multi-resource networking Aug 29, 2026
@Kauziin
Kauziin force-pushed the agent/universal-cable-networking branch from 3b80808 to 1a2df0b Compare August 30, 2026 00:00
@Kauziin Kauziin self-assigned this Aug 30, 2026
@Kauziin Kauziin added Enhancement New feature or request QoL Optional features for quality of life enchancements codex Update Update a feature or a package labels Aug 30, 2026
@Kauziin
Kauziin requested a review from RealMilo504 August 30, 2026 00:01
Replace Universal Cable-specific core branches with capability-driven multi-resource tubes and endpoints. Add resource-aware face configuration while preserving legacy data, and keep addon-owned resources outside UtilityCore.
@Kauziin
Kauziin force-pushed the agent/universal-cable-networking branch from 1a2df0b to ac32d40 Compare August 30, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex Enhancement New feature or request QoL Optional features for quality of life enchancements Update Update a feature or a package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant