HttpInfoServer

HttpInfoServer

Minecraft HTTP API server that runs locally on the player's computer and hosts in-game player's info

by
260 Downloads
fabriclibrarymanagementutility
Rent Server with this Mod

About this Mod

HttpInfoServer

Minecraft fabric mod that collects and sends in-game information to Minecraft HTTP API server (another my repo). The project consists of Minecraft fabric mod (agent) and HTTP API server. The code of the Minecraft fabric mod is located in this repo and the HTTP API server code is located by this link: *link*. Read the full manual to get everything set up correctly.

Manual

The full manual you can read here: read

Build

I recommend you use IDEAs like IntelliJ IDEA or Eclipse. But If you would like to generate a .jar file without any IDEA you can use the command gradle build in the project root (be sure Java version 17 and higher is installed).

Installing

Be sure that you already installed the Fabric of a needed version of Minecraft. Follow the link with releases *link*. Choose and download the .jar file needed version of Minecraft (also check the patch version). Put the downloaded file to the .mods folder (it is located by the %AppData%/.minecraft/mods path in most cases). Run Minecraft using fabric installation in your launcher.

Contribution

I will be glad if you can help in the development of this project. What you can do:

  • Spelling correction. My English is not good, so you can correct the comments in the code or the text in the files (like README.md).
  • Code cleanup
  • Add new features or improve old ones

Code structure:

The code files are located in the folder that follows the path: src/main/java/com.crocoby. There are some files in this folder:

  • HttpInfoServer.java — have an entrance method that is called onInitialize and starts when Minecraft loads. We create and run WebSocket instances in the onInitialize method.
  • WebSocketDoor.java — The project uses the TooTallNate/Java-WebSocket library to make a WebSocket client. The WebSocket class describes the behavior of the WebSocket client that connects to the WebSocket server (another repo). When the server sends a message with the text "collectData" the WebSocket client uses InfoCollector class (this behavior is described in the onMessage method).
  • InfoCollector.java — Have the genJson function that collects data and turns it into JSON string format. This method needs to generate a response for the WebSocket server.
  • mixin/WorldJoinMixin.java — Have the init method that invokes whenever a player joining to any world (server works too). It sends a message in the in-game chat when the WebSocket client is not connected to the WebSocket server.

Available Versions

For minecraft 1.20.6release
MC 1.20.6fabric
May 28, 2024
For minecraft 1.20.4release
MC 1.20.4fabric
May 28, 2024

How to Install HttpInfoServer on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (1.20.6).

3

Install Mod

Open the mod browser in the dashboard and search for "HttpInfoServer". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

fabric

Minecraft Versions

1.20.6, 1.20.4

Server-side

Unsupported

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

HttpInfoServer server crashes on startup – what to do?

Most common cause: wrong fabric 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 (1.20.6). You can switch loaders with one click in the panel.

Is HttpInfoServer compatible with fabric?

HttpInfoServer officially supports fabric for Minecraft 1.20.6, 1.20.4. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with HttpInfoServer – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if HttpInfoServer 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.

Rent Modded Server

Install HttpInfoServer with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
Apache License 2.0
Server-side
Unsupported

Supported Versions

1.20.61.20.4