
net
Network communication library
About this Mod
Net
Features
- Simplifies the network communication part in development, making development easier.
- Will provide network optimization and protection in the future.
How to use
First, insert implementation "dev.anye.mc:net:version" into the dependencies section of the build.gradle file, replacing version with the version you are actually using.
Then create network communication according to the following code
//Create a DeferredRegister to store your NetHandle
public static final DeferredRegister<NetHandle> EASY_NET = DeferredRegister.create(NetReg.KEY, YourMod.MOD_ID);
//Register your NetHandle to the DeferredRegister above
public static final DeferredHolder<NetHandle, ExampleA> ExampleA = EASY_NET.register("example_a",ExampleA::new);
public static final DeferredHolder<NetHandle, ExampleB> ExampleB = EASY_NET.register("example_b",ExampleB::new);
//Create a DeferredRegister registration method and call it in the Mod main class
public static void reg(IEventBus eventBus){
EASY_NET.register(eventBus);
}
Use the methods in the NetCore class to send data
NetCore.sendToServer(NetPack.createClientPack(CompoundTag data, NetHandle));
NetCore.sendToEntity(NetPack.createServerPack(compoundTag,NetHandle), entity);
public class ExampleA extends NetHandle {
@Override
public void client(IPayloadContext context, CompoundTag dat) {
//Process data sent from the server here
}
@Override
public void server(IPayloadContext context, CompoundTag dat) {
//Process data sent from the client here
}
}
Available Versions
How to Install net on Your Server
Order Server
Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).
Set neoforge Loader
In the panel under "Egg", select the neoforge loader and matching Minecraft version (26.1.2).
Install Mod
Open the mod browser in the dashboard and search for "net". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.
Compatibility
Mod Loaders
Minecraft Versions
26.1.2, 26.1.1, 1.21.10 (+9 more)
Server-side
✓ RequiredRecommended RAM
4 GB(min. 3 GB)Frequently Asked Questions
net server crashes on startup – what to do?
Most common cause: wrong neoforge version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (26.1.2). You can switch loaders with one click in the panel.
Is net compatible with neoforge?
net officially supports neoforge for Minecraft 26.1.2, 26.1.1, 1.21.10. The Mado dashboard automatically detects incompatible loader combinations.
Server lagging with net – how to optimize performance?
Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if net consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.
Similar Mods
Rent Modded Server
Install net with just one click on your server.