Merge pull request 'Parrot fixes' (#2549) from parrot_fixes into master

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2549
This commit is contained in:
cora 2022-08-11 12:39:16 +00:00
commit 435df92cf9

@ -92,7 +92,8 @@ local function check_perch(self,dtime)
local n1 = minetest.get_node(vector.offset(p:get_pos(),0,-0.6,0)).name local n1 = minetest.get_node(vector.offset(p:get_pos(),0,-0.6,0)).name
local n2 = minetest.get_node(vector.offset(p:get_pos(),0,0,0)).name local n2 = minetest.get_node(vector.offset(p:get_pos(),0,0,0)).name
local n3 = minetest.get_node(vector.offset(p:get_pos(),0,1,0)).name local n3 = minetest.get_node(vector.offset(p:get_pos(),0,1,0)).name
if n1 == "air" or minetest.get_item_group(n2,"water") > 0 or minetest.get_item_group(n2,"lava") > 0 then if ( n1 == "air" or minetest.get_item_group(n2,"water") > 0 or minetest.get_item_group(n2,"lava") > 0) and
not minetest.is_creative_enabled(p:get_player_name()) then
o:set_detach() o:set_detach()
self.detach_timer = 0 self.detach_timer = 0
return return
@ -118,7 +119,7 @@ end
mcl_mobs:register_mob("mobs_mc:parrot", { mcl_mobs:register_mob("mobs_mc:parrot", {
description = S("Parrot"), description = S("Parrot"),
type = "npc", type = "passive",
spawn_class = "passive", spawn_class = "passive",
pathfinding = 1, pathfinding = 1,
hp_min = 6, hp_min = 6,