So, after much procrastination and lack of time (college, mostly), I finally got around to making a mod for creating monster spawners!
This simple mod operates on some fairly basic parameters:
- Mobs spawn only when the light around the spawner is below a certain threshold. (default is 9)
- Mobs will not spawn if there are too many in the area. (Default cap is 7, although stronger pcs can easily stand 12 or more in singleplayer. Amount will vary for your server and/or system)
There are a number of configurable settings at the top of the init.lua, namely MAX_LIGHT, MAX_MOBS, CHANCE, and INTERVAL. The first one is the maximum light in which mobs will spawn. Likewise, MAX_MOBS is the cap on how many mobs will spawn. (Note that players are counted as objects when in range, so if it's set to 7, you'll only ever see 6.) CHANCE is the probability (1/x chance) of a mob spawning per interval. Which brings us to INTERVAL, which determines how many seconds there are between spawnings.
Near the start of the file is a list of tables with mob names in them. If you want to create additional spawners for unlisted mobs (like cows and chickens), create another list.insert() line with the appropriate information. If you are unsure what to add, ask here or look at the original mod's code.
As there currently are no craft recipes for spawners, the only way to get them is through the give privilege, using the form:
/giveme mobspawn:name_spawner
where name is the name of the mob, such as dirt_monster.
Enjoy!
Screenshots:
Spoiler
Depends:
default
mobs?
carbone_mobs?
mobf?
creatures?
zmobs?
senderman?
kpgmobs?
ccmobs?
spidermob?
License: WTFPL (code and textures)
GitHub: https://github.com/HeroOfTheWinds/mobspawn/
Download: https://github.com/HeroOfTheWinds/mobsp ... master.zip
TO-DO:
Fix spawner texture
Add entity inside spawner showing what it spawns
Add support for more mobs
Make recipes for spawners
...Perhaps you have suggestions? :)