The Villainous Horde Manager is an API built upon the code from Cold Snap Horde and its horde system. It aims to maintain a consistent number of enemies until enough have been defeated to conclude the event. Unlike the initial version of Cold Snap Horde, the code for this mod is designed for reusability and is capable of spawning vanilla or modded mobs and directing them towards the target player, similar to how snowmen behave during the horde event.
You can now make your own hordes via JSON magic
Check the github page for detailed information on creating hordes using JSON.
If you are a mod developer and want more control over a custom horde
Refer to the github page, where each module includes an example of how to instantiate hordes and ensure their proper functioning on a given platform (quilt being the same as fabric, in this case).
Interested? Here's some more!
If you are still reading this, you are likely a developer interested in exploring the code for this event. I welcome helpful contributions and am willing to provide assistance within reason to help you set up hordes.
Additional details about horde requirements:
Entities added to the horde must extend the PathfinderMob class. Alternatively, you can utilize the enum system to bypass this, although this is not recommended.
Larger entities are more challenging to spawn due to the system's attempt to avoid situations where mobs would suffocate. It is advisable to minimize the presence of larger mobs or keep their spawn weights low.
The API will scan the environment around a potential spawn point for any solid blocks. The size of the scan depends on the size of the mob, with larger mobs consuming more server resources.
The system endeavors to spawn mobs at a relatively close Y-level to the player, prioritizing locations above the player over those below.
If the system is unable to find a nearby Y-level, it will settle for any available Y-level.
If a player prevents entities from spawning, the horde will cease in order to avoid consuming additional system resources.
Server Hosting
I've partnered with BisectHosting! If you need a quality server, click the picture below and use code "cartoonish" for 25% off your first month!
* Major breaking change to the structure of the format of the JSON, see the github for more details
* Adds in the concept of waves, allowing for, well, waves of enemies to appear instead of one set of enemies and done.
* Waves have most of the concepts the horde once had in them, such as how many enemies need to be killed, how many can be spawned at once, etc.
* As such, each wave in a single horde can play entirely differently!
* Adds in an optional boss phase for each wave
* If boss entities are included, when the life count is depleted in a wave, and alternate boss bar also defined in the config will be displayed, and the wave will only end when the determined boss entities are killed
* Depending on configuration, the normal horde can either continue to spawn, or not during the boss phase.
* Hordes are loaded from a subfolder in the config folder now, again see the github for details
* But, this means if you keep every horde in its own file, and one file breaks, every other horde should work fine.
* Major breaking change to the structure of the format of the JSON, see the github for more details
* Adds in the concept of waves, allowing for, well, waves of enemies to appear instead of one set of enemies and done.
* Waves have most of the concepts the horde once had in them, such as how many enemies need to be killed, how many can be spawned at once, etc.
* As such, each wave in a single horde can play entirely differently!
* Adds in an optional boss phase for each wave
* If boss entities are included, when the life count is depleted in a wave, and alternate boss bar also defined in the config will be displayed, and the wave will only end when the determined boss entities are killed
* Depending on configuration, the normal horde can either continue to spawn, or not during the boss phase.
* Hordes are loaded from a subfolder in the config folder now, again see the github for details
* But, this means if you keep every horde in its own file, and one file breaks, every other horde should work fine.
* /startJsonHorde now can accept a player as an anchorTarget parameter.
* If a non-player is calling /startJsonHorde, anchorTarget is a **required** parameter
* /startJsonHorde now can accept a player as an anchorTarget parameter.
* If a non-player is calling /startJsonHorde, anchorTarget is a **required** parameter
* /startJsonHorde now can accept a player as an anchorTarget parameter.
* If a non-player is calling /startJsonHorde, anchorTarget is a **required** parameter
* Decreases odds of entities spawning in walls
* Utilizes vanilla game techniques to determine if mob spawns are valid, which may increase reliability of hordes (decreasing how much they despawn due to missing spawn points)
* Small optimizations
* More gracefully handles the error when a JSON horde has an entity that isn't a pathfindingmob (Kills the horde and throws an error in the logs, instead of crashing)
* Mobs in hordes will now spawn as expected. (Skeletons have their bows, vindicators have their axes, etc.)
* Json Hordes can now specify how many retries for finding spawn points they want to do.
* Refactored how some of the horde types are handled
* Fixed a crash that can happen when a spawn was invalid.
* Json handling is supported for custom hordes! You can now have you own (basic) horde without needing to make your own mod.
* For information on how to make your own hordes, see the github page.
* Port to 1.19.4
* Splits Hordes into two types. EntityTypeHorde, which is the equivalent to 0.3's horde class, and EntityEnumHorde.
* EntityEnumHorde is meant to make a system like ColdSnapHordes better supported and less janky, where Cold Snap Horde has to rewrite large portions of the code base for custom spawn rules. Using the enums, the consuming mod is expected to provide their own spawn method and is given the method to do so in.
* EnumHordeData can support any enum that extends RuleEnumInterface.