Fixed a few things worked on a couple things situated it so that the menu can be scrolled set color coding and made it so it actually shows the username
This commit is contained in:
@@ -4,18 +4,22 @@ A client-side Fabric mod that displays Twitch, YouTube, and TikTok live-stream
|
||||
events in Minecraft. Twitch and YouTube events are received from Streamer.bot;
|
||||
TikTok events are received from TikFinity.
|
||||
|
||||
## Current status
|
||||
## Supported Minecraft versions
|
||||
|
||||
The project is at its initial implementation stage. The default and currently
|
||||
verified build target is Minecraft 26.1.2 with Fabric. A separate legacy
|
||||
client source set is retained for Minecraft 1.20.1.
|
||||
Each version has its own jar (`stream-chat-<minecraft version>-<mod version>.jar`);
|
||||
pick the one that matches your game.
|
||||
|
||||
| Minecraft | Fabric Loader | Fabric API | Mod Menu | Java |
|
||||
|-----------|---------------|------------|----------|------|
|
||||
| 26.1.2 | 0.20.1+ | 0.155.3+26.1.2 | 18.0.2 | 25 |
|
||||
| 1.20.1 | 0.15.11+ | 0.92.2+1.20.1 | 7.2.2 | 17 |
|
||||
|
||||
## Initial setup
|
||||
|
||||
1. Install Fabric Loader 0.20.1 and Fabric API 0.155.3 for Minecraft 26.1.2.
|
||||
1. Install Fabric Loader and Fabric API for your Minecraft version (see table).
|
||||
2. Install Mod Menu to open the mod's settings screen from the Mods menu.
|
||||
3. Configure the Streamer.bot and TikFinity WebSocket addresses in
|
||||
`config/stream-chat.json` or in the in-game settings.
|
||||
`config/stream-chat/stream-chat.json` or in the in-game settings.
|
||||
4. Start Streamer.bot/TikFinity and launch Minecraft. Enabled integrations
|
||||
connect automatically; use the configured keybind or settings screen to
|
||||
toggle them.
|
||||
@@ -27,15 +31,93 @@ checking them for private information.
|
||||
The mod is client-only. It does not send stream events or chat messages to the
|
||||
Minecraft server.
|
||||
|
||||
## Development
|
||||
## Configuration
|
||||
|
||||
Use Java 25 for the Minecraft 26.1.2 target. Build with Gradle:
|
||||
All files live in `config/stream-chat/`:
|
||||
|
||||
```text
|
||||
gradlew build
|
||||
| File | Contents |
|
||||
|------|----------|
|
||||
| `stream-chat.json` | Platform and integration on/off, WebSocket URLs, event destinations (chat, action bar, toast, hidden), emote replacements |
|
||||
| `twitch.yml`, `youtube.yml`, `tiktok.yml` | Message formatting for that platform |
|
||||
|
||||
Each platform file has a `prefix`, a fallback `format`, and an `events:` section
|
||||
with the message format for every event. They are written with defaults the
|
||||
first time the mod runs. Per-event formats are edited only in the file; the
|
||||
settings menu edits the prefix and the chat-message format. For example, in
|
||||
`tiktok.yml`:
|
||||
|
||||
```yaml
|
||||
prefix: "&#FE2C55[TikTok] &r| "
|
||||
events:
|
||||
join: "&e@{username} joined"
|
||||
like: "{prefix}{username} sent {data.likeCount} likes"
|
||||
```
|
||||
|
||||
The Minecraft version, Fabric Loader, Fabric API, Mod Menu, Loom, and Java
|
||||
versions are declared in `gradle.properties`. Select matching versions there
|
||||
before building a different Minecraft target. The legacy 1.20.1 source set
|
||||
was verified separately; other releases need their own compatibility checks.
|
||||
Delete an `events:` line to restore that event's default. Every event is shown
|
||||
in chat by default; change where each one goes (chat, action bar, toast, hidden)
|
||||
in the settings menu.
|
||||
|
||||
### Placeholders
|
||||
|
||||
`{prefix}`, `{platform}`, `{event}`, `{username}`, `{message}`, and
|
||||
`{data.<field>}`, which reads any field from the platform's event (for example
|
||||
`{data.likeCount}`, `{data.repeatCount}`, `{data.bits}`). A missing field is blank.
|
||||
|
||||
### Color codes
|
||||
|
||||
Prefixes and formats support `&` color codes, so each platform can have its own color:
|
||||
|
||||
| Code | Effect |
|
||||
|------|--------|
|
||||
| `&0`-`&9`, `&a`-`&f` | Minecraft colors |
|
||||
| `&#RRGGBB` | Any hex color, e.g. `⎺FF` |
|
||||
| `&l` `&o` `&n` `&m` `&k` | Bold, italic, underline, strikethrough, obfuscated |
|
||||
| `&r` | Reset |
|
||||
| `&&` | A literal `&` |
|
||||
|
||||
Text sent by viewers (usernames and messages) is never interpreted as color codes.
|
||||
|
||||
### Username color
|
||||
|
||||
Each platform file has a `username_color` setting that colors only the viewer's
|
||||
name on that platform, leaving the message text alone. It takes the same codes as
|
||||
above:
|
||||
|
||||
```yaml
|
||||
username_color: "⎺FF" # purple Twitch names
|
||||
```
|
||||
|
||||
Leave it empty for no color. It applies to every event that uses `{username}`.
|
||||
|
||||
### Troubleshooting events
|
||||
|
||||
If events from a platform don't appear, set `"debugLogging": true` in
|
||||
`stream-chat.json` and reload. Every raw message received from Streamer.bot or
|
||||
TikFinity is then written to the game log (`logs/latest.log`), which shows the
|
||||
exact event names and fields being sent. TikFinity's `config` message (its list
|
||||
of configured actions) is not a viewer event and is ignored.
|
||||
|
||||
### Reloading
|
||||
|
||||
Changes to the files are not picked up while the game runs. Press **Reload
|
||||
config** in the settings menu, or bind the **Reload Stream Chat Config** key in
|
||||
Minecraft's controls, to re-read everything. Unsaved edits in the settings menu
|
||||
are discarded by a reload, and saving the menu rewrites the files.
|
||||
|
||||
An existing `config/stream-chat.json` from an earlier version is migrated
|
||||
automatically and kept as `stream-chat.json.bak`.
|
||||
## Development
|
||||
|
||||
Run Gradle with a Java 25+ JVM (Java 17 targets are compiled with
|
||||
`--release 17`). Build every supported version, one jar each, into `dist/`:
|
||||
|
||||
```text
|
||||
powershell -File build-all.ps1
|
||||
```
|
||||
|
||||
Each supported version is defined by `versions/<minecraft version>.properties`
|
||||
(Minecraft, Fabric Loader, Fabric API, Mod Menu, and Java versions). To build a
|
||||
single version, pass its properties as Gradle options, e.g.
|
||||
`gradlew build -Pminecraft_version=1.20.1 -Ploader_version=0.15.11 -Pfabric_api_version=0.92.2+1.20.1 -Pmodmenu_version=7.2.2 -Pjava_version=17`.
|
||||
To add a version, add a properties file; versions starting with `26.` use the
|
||||
`src/versions/modern` sources, all others use `src/versions/legacy`.
|
||||
|
||||
Reference in New Issue
Block a user