Client-Server Communication API
🟡 Updated this year⚠️ Install Order · 2 steps
Install in this order, then this mod last — most mods fail to load without their framework and dependencies in place.
Preview

🔍 Analysis
- 🏆 #698 of 909 fabric mods in this game by downloads
📋 About This Mod
# Client-Server Communication API how to use for developer: - Register packet in common code: ```java public class FooBarPacket implements CscPacket{ public FooBarPacket(ByteBuf buf) { read(buf); } private int foo; @Override public void read(ByteBuf buf) { foo = buf.readInt(); } @Override public void write(ByteBuf buf) { buf.writeInt(foo); } } ``` ```java public static CscPacketType<FooBarPacket> FOO_BAR_PACKET = CscApi.registerPacket( "foo_bar", FooBarPacket.class, FooBarPacket::new ); ``` - Use it on Server: ```java public class ServerClass { private static final Logger log = LoggerFactory.getLogger(ServerClass.class); public void init() { CscServer.getService().registerListener((packet, player) -> { log.info("Received packet {} from player {}", packet.getClass().getSimpleName(), player.getName()); }, ModPackets.FOO_BAR_PACKET); } public void sendFooBarPacket(Player player) { CscServer.getService().sendPacket(new FooBarPacket(), player); } } ``` - Use it on Client: ```java public class ClientClass { private static final Logger log = LoggerFactory.getLogger(ClientClass.class); public void init() { CscClient.getService().registerListener(packet -> { log.info("Received packet: {}", packet); }, ModPackets.FOO_BAR_PACKET); } public void sendFooBarPacket() { CscClient.getService().sendPacket(new FooBarPacket()); } } ```
# Client-Server Communication API
how to use for developer: - Register packet in common code: ```java public class FooBarPacket implements CscPacket{ public FooBarPacket(ByteBuf buf) { read(buf); }
private int foo;
@Override public void read(ByteBuf buf) { foo = buf.readInt(); }
@Override public void write(ByteBuf buf) { buf.writeInt(foo); } } ```
```java
public static CscPacketType
- Use it on Server:
```java public class ServerClass { private static final Logger log = LoggerFactory.getLogger(ServerClass.class);
public void init() { CscServer.getService().registerListener((packet, player) -> { log.info("Received packet {} from player {}", packet.getClass().getSimpleName(), player.getName()); }, ModPackets. FOO_BAR_PACKET); } public void sendFooBarPacket(Player player) { CscServer.getService().sendPacket(new FooBarPacket(), player); } } ``` - Use it on Client:
```java public class ClientClass { private static final Logger log = LoggerFactory.getLogger(ClientClass.class);
public void init() { CscClient.getService().registerListener(packet -> { log.info("Received packet: {}", packet); }, ModPackets. FOO_BAR_PACKET); } public void sendFooBarPacket() { CscClient.getService().sendPacket(new FooBarPacket()); } } ```
📊 Mod Details
- Game
- Minecraft Mods
- Author
- Danrus110_
- Version
- 1.0
- Downloads
- 253
- Endorsements
- 1
- Category
- fabric
- Created
- 2/15/2026
- Updated
- 2/14/2026
- Game Versions
- 1.21.8
🔧 How to Install Minecraft Mods Mods
Download from Modrinth. Use Prism Launcher or drop into your mods folder.
📖 Full step-by-step install guide for Minecraft Mods →
Visit the official mod page for specific installation instructions for this mod.
🎮 Need cheat codes or console commands? Check ur gaming wiki for Minecraft Mods commands, item IDs, and more.
❓ Frequently Asked Questions
Which Minecraft Mods versions does Client-Server Communication API support?
The author lists 1.21.8. Other versions may work but are untested by the author.
What is the latest version of Client-Server Communication API?
Version 1.0, published 2026-02-14 with 253 downloads recorded at the source.
Keep browsing — more Minecraft Mods mods await