
Villainous Horde library is a potential starting point for Continuous-Assault events for mods.
The Shorthand Explanation
The code for this mod is based off of Cold Snap Horde and its horde system, where the server will try to keep a consistent number of enemies alive until enough have been killed to end the event. When I wrote the code for Cold Snap Horde's version though, it wasn't very... reusable. This library is my first attempt at fixing that, capable of spawning vanilla mobs and sending them towards the target player like the snowmen do during the horde event.
You can now make your own hordes via JSON magic
See the github page for more information on how to do this.
If you are a mod developer and you want more control over a custom horde
Also see the github page. Each module has an example of how to instantiate hordes and get them to function correctly for a given platform (quilt being the same as fabric, for this case)
Interested? Here's some more!
If you're still reading this, you're probably a developer interested in looking into the code for this event. Which is very neat! I'll happily accept contributions that I see as helpful additions, and help out within reason to get you set up with hordes.We also have the repository listed in the sources with some documentation set up.
Extra details about horde requirements:
- Entities added to the horde must extend the PathfinderMob class.
- Bigger entities are harder to spawn due to the system attempting to avoid situations where mobs would suffocate. Try to keep larger mobs to a minimum/to low spawn weights.
- The system will scan the environment around a potential spawnpoint for any solid blocks. The size of the scan depends on the mob, meaning larger mobs will be more expensive on server resources.
- The system tries to spawn mobs at a relatively close Y level to the player (preferring locations above the player over below).
- If the system can not find a nearby Y level, it'll settle for any Y level it can find.
- If a player makes it impossible for entities to spawn, the horde will end to prevent taking up more system resources.
Can I put this in my modpacks?
Sure!
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!