I don't think the chance parameter is very relevant, even if you decrease the chance you'll still get same results, just maybe a bit later.jakab wrote:yeah i had to deal with the horse army too :D
here how i fixed it:
/minetest/games/MineClone2/mods/ENTITIES/mobs_mc/horse.lua
go to the bottom, and youll find this :
--Spawn FunctionCode: Select all
mobs:spawn_specific("mobs_mc:horse", mobs_mc.spawn.grassland_savanna, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 15000, 12, mobs_mc.spawn_height.water+3, mobs_mc.spawn_height.overworld_max)
and rewrite the number '15000" (or other huge number in that area ...) and write in a a higher number. that will decrase the chance to spawn horses (this works with any mobs) i personally wrote "35000" :D
I think this problem is because of a number of reasons:
- despawning is off
- mobs roaming randomly have trouble moving uphill, so they eventually end up in water.
- the code to get mobs out of water doesn't work.
This also causes the number of entities to eventually get to the point where the engine can't handle them.
To get the game to be playable again I did the following:
in games\MineClone2-037a833\mods\ENTITIES\mcl_mobs\api.lua
change
local remove_far = false
to
local remove_far = true
This takes care of the monsters, to get horses to despawn I added in in \mobs_mc\horse.lua:
local horse = {
type = "animal",
can_despawn = true,
If you want all animals despawning, it's probably better to edit the mobs:register_mob function in api.lua,
changing
can_despawn = false
to
can_despawn = true
As to getting out of the water, my theory is that find_node_near doesn't necessarily return a surface node (and nowhere it says it's supposed to), so a swimming mob looking for a solid node will usually find one in any random direction. It might be better if they were trying to avoid getting near water in the first place.