HomeJavaModsChatManager-Core
ChatManager-Core
ModsJava

ChatManager-Core

ChatManager-Core is a library for working with Minecraft chat

⬇ Download on Modrinth

О проекте

ChatManager-Core — это библиотека-ядро для полной переработки чата в Minecraft. Мод не добавляет готовый визуальный интерфейс сам по себе, а перехватывает всю обработку ванильного чата на уровне сети и клиента и заменяет её собственной архитектурой: каналами, событиями, парсингом сообщений и расширяемым API.

Как это работает технически

Через миксины перехватываются пакеты handlePlayerChat и handleSystemChat, а также добавление локальных клиентских сообщений. Стандартная обработка этих пакетов полностью отменяется — вместо неё каждое сообщение оборачивается в единую модель Message (с типами: игрок, система, клиент, ошибка, упоминание, кастомное) и рассылается через событийную шину на базе MegaEvents — открытой библиотеки событий за авторством Ferra13671. Также перехватываются события клавиатуры, мыши и скролла — это нужно, чтобы окна каналов можно было двигать, изменять размер и прокручивать независимо от стандартного игрового интерфейса.

Система каналов

Обработка и удобства чата

AI-стилизация текста

Встроена интеграция с Groq API (внешний облачный сервис для инференса языковых моделей). Пользователь может создать несколько именованных "стилей" — каждый со своей моделью, системным промптом и ограничением на длину ответа — и использовать их для автоматической обработки/переформулирования текста перед отправкой. Для работы этой функции нужен собственный API-ключ, который пользователь получает самостоятельно на сайте Groq и вписывает в конфиг.

Вебхуки — пересылка сообщений на внешние сервисы

Мод умеет отправлять сообщения чата на внешний HTTP-адрес методом POST — это можно использовать, например, для пересылки игрового чата в Discord-канал через вебхук. Настройка двухуровневая:

Функция выключена по умолчанию и требует, чтобы пользователь сам вручную указал адрес назначения в конфигурационном файле — без этого ни одно сообщение никуда не отправляется.

Конфигурация и хранение данных

Все настройки хранятся в человекочитаемых JSON-файлах в папке конфигов мода, генерируются автоматически с значениями по умолчанию при первом запуске. Есть собственный файловый логгер, пишущий отдельный лог-файл для диагностики работы мода.

Для разработчиков других модов

Ядро полностью построено вокруг открытой событийной шины MegaEvents (автор — Ferra13671): получение сообщения, добавление в канал, стак повторов, упоминание игрока, изменение видимости канала, ввод с клавиатуры/мыши, тики клиента — на любое из этих событий можно подписаться из своего мода и построить поверх ядра собственный визуальный слой, не переписывая логику перехвата чата с нуля.

⚠️ Важно перед установкой

Совместимость

Параметр Значение
Minecraft 1.21.4
Загрузчики Fabric, NeoForge (через Architectury)
Java 21+

English

About

ChatManager-Core is a core library for a complete overhaul of Minecraft's chat handling. The mod does not add a ready-made visual interface on its own — instead, it intercepts all vanilla chat processing at the network and client level and replaces it with its own architecture: channels, events, message parsing, and an extensible API.

How it works technically

Mixins intercept the handlePlayerChat and handleSystemChat, as well as locally added client-side messages. Standard processing of these packets is fully cancelled — instead, every message is wrapped into a unified Message model (with types: player, system, client, error, mentioned, custom) and dispatched through an event bus built on MegaEvents, an open-source event library by Ferra13671. Keyboard, mouse, and scroll input are also intercepted, which is required so that channel windows can be moved, resized, and scrolled independently of the standard game UI.

Channel system

Message processing and quality-of-life features

AI text styling

Built-in integration with the Groq API (an external cloud service for LLM inference). Users can define several named "styles," each with its own model, system prompt, and response length limit, and use them to automatically rephrase text before sending it. This feature requires the user's own API key, obtained independently from Groq's website and entered into the config.

Webhooks — forwarding messages to external services

The mod can send chat messages to an external HTTP address via a POST request — useful, for example, for forwarding in-game chat to a Discord channel through a webhook. Configuration is two-tiered:

This feature is disabled by default and requires the user to manually specify a destination address in the config file — without that, no message is ever sent anywhere.

Configuration and data storage

All settings are stored in human-readable JSON files inside the mod's config folder, automatically generated with default values on first launch. A custom file logger writes a dedicated log file for diagnosing mod behavior.

For other mod developers

The core is built entirely around the open MegaEvents event bus (by Ferra13671): message received, message added to a channel, message stacked, player mentioned, channel visibility changed, keyboard/mouse input, client ticks — any of these events can be subscribed to from your own mod to build a custom visual layer on top of the core, without having to reimplement chat interception logic from scratch.

⚠️ Important before installing

Compatibility

Parameter Value
Minecraft 1.21.4
Loaders Fabric, NeoForge (via Architectury)
Java 21+
Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more