qumod-rpc-generator

Generates client-server RPC communication code using the QuModLibs framework.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/Coral5644/NekansModPack --skill qumod-rpc-generator-coral5644
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: qumod-rpc-generator
Source: https://github.com/Coral5644/NekansModPack/tree/main/.cursor/skills/qumod-rpc-generator
Command: npx skills add https://github.com/Coral5644/NekansModPack --skill qumod-rpc-generator-coral5644

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When building NetEase Minecraft mods with the QuModLibs framework, developers often fall back to raw NotifyToServer/NotifyToClient calls, which breaks the project's communication conventions. This Skill enforces the correct QuMod event registration and dispatch patterns for all client-server RPC logic. ## Core Features & Use Cases - QuMod RPC API Reference: Covers server-side Call, MultiClientsCall, @AllowCall, @InjectRPCPlayerId and client-side Call, Request, @AllowCall. - Ready-to-use Code Templates: Provides patterns for server-to-client, client-to-server, and request-response (with callback) communication flows. - Convention Enforcement: Ensures JSON-serializable payloads, automatic playerId injection, and function-name-based routing while forbidding native ModAPI calls. - Use Case: When adding a new feature where the client requests data from the server, use this Skill to generate a @AllowCallStatic server endpoint and a matching client Request call with a response callback. ## Quick Start Generate a QuModLibs RPC endpoint that lets the client request player data from the server and handle the response callback.

Frequently Asked Questions about qumod-rpc-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a client-server RPC endpoint in QuModLibs?▼

Define a server method decorated with @AllowCallStatic, which combines @InjectRPCPlayerId, @AllowCall, and @staticmethod. The client then invokes it with Call("FunctionName", args), where the function name serves as the routing key.

How to send data from server to client in QuMod?▼

Use Call(playerId, "EventName", data) on the server to target one client, Call("*", key, data) to broadcast, or MultiClientsCall for a player list. The client registers a matching @AllowCallStatic method to receive the event.

Can I use NotifyToServer with QuModLibs projects?▼

No. Projects adopting QuMod communication conventions must not call native NotifyToServer or NotifyToClient directly. All RPC traffic should go through QuModLibs Call, Request, and @AllowCall registration to keep routing consistent.

How do I get a return value from a server RPC call?▼

Use the client-side Request(key, args, kwargs, onResponse) method, passing a callback function that receives the server's result. This implements a request-response pattern instead of one-way Call invocations.

Why is playerId appearing as the first argument in my server handler?▼

The @InjectRPCPlayerId decorator (included in @AllowCallStatic) automatically injects the caller's playerId as the first parameter. Clients must not pass playerId manually in Call(), or arguments will shift and break the handler.

What data types can QuMod RPC transmit?▼

Payloads must be JSON-serializable: dict, list, str, int, float, bool, or None. QStruct subclasses are supported because they serialize automatically via signDumps(). Custom objects without serialization will fail.