ECHO: NetCore is the networking foundation for the ECHO ecosystem. It centralizes packet registration patterns, clientbound sync helpers, serverbound action validation, rate limit policies, optional send handling, debug hooks, and client action helpers.
The addon exists so gameplay chapters can focus on authority and state instead of duplicating fragile network glue. Serverbound packets represent intent only; handlers validate permissions, distance, ownership, inventory, menu state, and world state on the server.
For players, NetCore is a library dependency. For developers, it is the standard way to keep optional addon channels, packet diagnostics, and action rate limits consistent across Terminal buttons, machine screens, scanner requests, and mission actions.
docs/curseforge/echonetcore-banner.pngdocs/curseforge/echonetcore-features.pngECHO: NetCore is the shared packet, sync, server action, rate limiting, and debug network layer for ECHO addons.
Use EchoNetPayloads.optional(event) to create the shared optional registrar, then register packets by category:
PayloadRegistrar registrar = EchoNetPayloads.optional(event);
EchoNetPayloads.clientboundSync(registrar, MySyncPacket.TYPE, MySyncPacket.CODEC, MyNetwork::handleSync);
EchoNetPayloads.serverboundAction(registrar, MyActionPacket.TYPE, MyActionPacket.CODEC,
EchoRateLimitPolicy.of(10, "my_action"), MyNetwork::handleAction);
Serverbound handlers receive a ServerPlayer; packets from non-server contexts are dropped before the handler runs. Rate-limited packets are dropped without mutating gameplay state.
EchoCoreServices.networkBridge() exposes no-op-safe helpers for player data, world data, mission progress, visual state, machine/block-entity state, debug data, faction sync, and discovery toasts. NetCore supplies the real bridge when loaded; ECHO Core falls back to NoOpNetworkService.
Client code can subscribe to generic NetCore sync packets with EchoClientSyncRegistry.register(type, channelId, consumer).
Use EchoNetSend.toPlayer(player, payload, kind) for optional clientbound sends. It catches missing-channel failures and emits packet debug events. Use EchoNetClientActions.sendServerboundAction(payload) from client-only classes for terminal buttons and other UI actions, or EchoNetClientActions.trySendServerboundAction(payload) when optional cross-addon UI sends need a boolean success result.
As of NetCore 1.2, addons may declare packet payload records and handlers, but direct NeoForge packet registration and distribution calls should stay inside NetCore. Addons should use EchoNetPayloads for registration, EchoNetSend for server-to-client sync, and EchoNetClientActions for client-to-server UI/action packets. This keeps optional-channel failures, debug hooks, and rate limits consistent across the ECHO stack.
Serverbound action packets should choose an explicit rate limit:
EchoNetPayloads.serverboundAction(registrar, MyActionPacket.TYPE, MyActionPacket.CODEC,
EchoRateLimitPolicy.of(4, "my_action"), MyNetwork::handleAction);
Use EchoRateLimitPolicy.NONE only when an existing validated flow already owns its throttle semantics.
Packet logging is controlled by NetCore common config:
debugPacketLogging=falselogDroppedPackets=falseenableDebugPackets=falseDebug logs and debug packet handlers stay silent unless explicitly enabled.