Want to tweak things as they spawn? Good news! Cobblemon has these things called SpawningInfluences that let you tweak various parts of the process. A little annoying, ngl, would’ve gone with events, but it consolidates the events into one thing I guess. Also good news: Tim Core allows you to quickly register spawner influences for the following types of spawns:
- Player Spawner - The spawners attached to players. With and without the player injected externally, even though you can get it internally (from the source. Idk, Cobblemon did it this way, so I accommodated it).
- Fishing Spawner - The uh, the spawner that spawns things when the player fishes up a Pokémon. This isn’t attached to a specific player, it’s just run any time any player fishes it up, so the player has to be obtained internally from the source.
- Snack Spawner - A spawner that’s not very tweakable yet, but I made a mixin that lets you crack into its setup and add spawning influences to it. Again, not tied to a player, this time tied to the instance of that specific snack’s block entity.
- General Spawner - Want to hit all of them at once?
registerGeneralSpawnerInfluence is here to help!
I bet you want some examples, huh? Check out Unchained, it’s built off of ‘em.