πŸ’Ώ Introduction

A mod designed for streamers by streamers!

TwitchSpawn is a Minecraft Mod powered by MinecraftForge API. It listens for live events related to your Twitch channel using various streaming platforms' Socket API. Then it handles those events with the rules handcrafted by you!

Features & Vision

1. All the events!

Thanks to the power of SocketIO, the mod is now able to respond to a wide variety of events! Donations, follows, subscriptions, resubs, bits and many more events including for Youtube and Mixer as well! List of supported streaming platforms:

2. Your own, readable rules!

The mod now comes with its own language to understand you: TwitchSpawn Language (TSL)! With TSL, declaring event handling rules (rule sets) is piece of cake! It is easily understandable. (E.g following sequence is a valid TSL script: DROP minecraft:diamond ON Twitch Follow)

rules.yournickname.tsl
# Drops 2 sticks on 0 to 20 unit donation
DROP minecraft:stick 2
ON Donation
WITH amount IN RANGE [0,20]
EITHER # Selects one random action
# Either drops a diamond block
DROP diamond_block 1
OR
# Or drops an iron block named "Iron Golem Body"
DROP %iron_block{display:{Name:"\"Iron Golem Body\""}}% 2
OR
# Or summons a zombie on given coordinate
SUMMON minecraft:zombie ~ ~+10 ~
# By displaying one common message for any action selected!
ALL DISPLAYING %["Get ready for spoils of battle!"]%
ON Donation
WITH amount IN RANGE [21, 999]
​
# Executes a Minecraft command as the streamer being the source!
EXECUTE %/gamerule keepInventory true%
DISPLAYING %[
{text:"${actor}", color:"red"},
{text:" turned immortality on!", color:"white"},
]%
ON Donation
WITH amount >= 1000
# Instantly does two actions! Throws leggings and boots from the inventory!
BOTH INSTANTLY
THROW leggings AND THROW boots
DISPLAYING %["You forgot to wear your pants!"]%
ON Twitch Subscription
WITH months >= 2
​
# Drops a stick with NBT data, when a Twitch Follow is received!
DROP %minecraft:stick{display:{Name:"\"Stick of Truth!\""}}% 1
ON Twitch Follow

3. One server, multiple streamers!

The mod is capable of parsing more than one ruleset, which makes it possible for multiple streamers to use TwitchSpawn on the same server!

Multiple streamer credentials included in the config file

4. Way better customizability

You can customize the text that is shown on an action, with an easy JSON format and well known Minecraft Text Component syntax!

Messages config using Minecraft JSON Text Component format

5. More reliable than before!

Unlike the Legacy (before v0.3.0) versions, errors will not cause Minecraft to crash with no report. Instead it is aimed to show errors to the user as much as possible. If you're facing any sort of problem, do not hasitate giving our Discord Server a visit!

Exemplar TSL syntax error report upon loading

Downloads

Downloadable files are hosted on CurseForge (https://www.curseforge.com/minecraft/mc-mods/twitchspawn/files). You can also download the mod directly using Twitch App as well.

Translations

Special thanks to my buddies Elanor and Vaelios for translating TwitchSpawn into German and French!

If you would like to contribute to the translations, consider modifying languages and creating a PR!

Special Thanks

Special thanks to each one of those beautiful people:

  • ​ToastNomNomNom - For reaching me, motivating me for a whole new paradigm and helping me do the alpha testings!

  • ​KΓΆfteistkΓΆfte - For his amazing OS_RUN action idea and testings!

  • ​AdmiralLemon - For his bug reports and helps on debugging!

  • ​Darkphan - For his precious Github issues and suggestions!

  • ​iskall85 - For reaching me and motivating me for a 1.12.x refactor/port!

  • ​TheGreatGildersneeze - For his amazing TwitchSpawn server and correction on a misleading documentation page!

  • ​JimilT92 - For his amazing insight on placeholder expressions and detailed issues!

  • ​BisUmTo - For his priceless bug-reports and endless effort on debugging them!

  • ​Diaval - For his epic memes and pair programming sessions!

  • My Guildies: Elanor & Vaelios - For preparing German and French translations!

  • And every single person in our Discord Server for keeping us motivated on this project!

Why a Whole New Paradigm?

The oldest (before v0.3.0) versions started with the idea of spawning items on donations. However, as time passed spawning items was not enough and necessarity of adding more handlers was making it even more complex to both implement and configure. Especially with only one big fat JSON file was leading the config file to an indentation hell.

Even though a new implementation is present, legacy version is still reachable on CurseForge, GitHub and GitBook.

The new version of TwitchSpawn heavily focuses on Usability, Flexibility and Customizability! It now supports multiple streamers in one server and handles every event served by a wide variety of streaming platform Socket APIs. Instead of ugly and complex JSON files, easier file formats are used now. Namely:

  • ​TOML for credentials to be used to communicate with a Socket API

  • ​JSON for display message customization. It uses a well known format, Minecraft's Text Components!

  • ​TSL for declaring the event handling rules. It is a data language, stands for TwitchSpawn Language

β€‹πŸž Special thanks to ToastNomNomNom for reaching me and giving an amazing feedback. Without his assistance and motivation, the new version would never be possible. 🍞

​