Fix "peaceful" setting preventing ALL mob spawns

This commit is contained in:
Wuzzy 2020-03-10 08:49:22 +01:00
parent 140113cbaa
commit a5dfc509b4

View File

@ -1596,7 +1596,7 @@ function mobs:register_egg(mob, desc, background)
inventory_image = invimg,
groups = { spawn_egg = 1 },
on_place = function(itemstack, placer, pointed_thing)
if peaceful_only then
if peaceful_only and minetest.registered_entities[mob].type == "monster" then
minetest.chat_send_player(placer:get_player_name(), minetest.colorize("#FFFF00", S("Hostile mobs are disabled!")))
return itemstack
end