Disable Capturing mob
This commit is contained in:
parent
15cdd50d03
commit
16d3eea6c0
@ -78,7 +78,7 @@ mobs:register_mob("mobs_animal:bear", {
|
|||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
mobs:capture_mob(self, clicker, 0, 0, 80, false, nil)
|
--mobs:capture_mob(self, clicker, 0, 0, 80, false, nil)
|
||||||
end,
|
end,
|
||||||
after_activate = function(self, staticdata, def, dtime)
|
after_activate = function(self, staticdata, def, dtime)
|
||||||
-- replace bear using the old directx model
|
-- replace bear using the old directx model
|
||||||
|
@ -50,7 +50,7 @@ mobs:register_mob("mobs_animal:bunny", {
|
|||||||
-- feed or tame
|
-- feed or tame
|
||||||
if mobs:feed_tame(self, clicker, 4, true, true) then return end
|
if mobs:feed_tame(self, clicker, 4, true, true) then return end
|
||||||
if mobs:protect(self, clicker) then return end
|
if mobs:protect(self, clicker) then return end
|
||||||
if mobs:capture_mob(self, clicker, 30, 50, 80, false, nil) then return end
|
--if mobs:capture_mob(self, clicker, 30, 50, 80, false, nil) then return end
|
||||||
|
|
||||||
-- Monty Python tribute
|
-- Monty Python tribute
|
||||||
local item = clicker:get_wielded_item()
|
local item = clicker:get_wielded_item()
|
||||||
|
@ -41,7 +41,7 @@ mobs:register_mob("mobs_animal:chicken", {
|
|||||||
|
|
||||||
if mobs:feed_tame(self, clicker, 8, true, true) then return end
|
if mobs:feed_tame(self, clicker, 8, true, true) then return end
|
||||||
if mobs:protect(self, clicker) then return end
|
if mobs:protect(self, clicker) then return end
|
||||||
if mobs:capture_mob(self, clicker, 30, 50, 80, false, nil) then return end
|
--if mobs:capture_mob(self, clicker, 30, 50, 80, false, nil) then return end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
do_custom = function(self, dtime)
|
do_custom = function(self, dtime)
|
||||||
@ -67,16 +67,16 @@ mobs:register_mob("mobs_animal:chicken", {
|
|||||||
max_hear_distance = 5,
|
max_hear_distance = 5,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
after_activate = function(self, staticdata, def, dtime)
|
after_activate = function(self, staticdata, def, dtime)
|
||||||
-- replace chicken using the old directx model
|
-- replace chicken using the old directx model
|
||||||
if self.mesh == "mobs_chicken.x" then
|
if self.mesh == "mobs_chicken.x" then
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
if pos then
|
if pos then
|
||||||
minetest.add_entity(pos, self.name)
|
minetest.add_entity(pos, self.name)
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end,
|
end
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
@ -90,7 +90,7 @@ mobs:spawn({
|
|||||||
day_toggle = true,
|
day_toggle = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
mobs:register_egg("mobs_animal:chicken", "Chicken", "mobs_chicken_egg_inv.png", 1)
|
mobs:register_egg("mobs_animal:chicken", "Chicken egg", "mobs_chicken_egg_inv.png", 1)
|
||||||
|
|
||||||
mobs:alias_mob("mobs:chicken", "mobs_animal:chicken") -- compatibility
|
mobs:alias_mob("mobs:chicken", "mobs_animal:chicken") -- compatibility
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ mobs:register_arrow("mobs_animal:egg_entity", {
|
|||||||
|
|
||||||
hit_node = function(self, pos, node)
|
hit_node = function(self, pos, node)
|
||||||
|
|
||||||
if math.random(1, 10) > 1 then
|
if math.random(1, 8) > 1 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -210,7 +210,7 @@ end
|
|||||||
|
|
||||||
-- egg
|
-- egg
|
||||||
minetest.register_node(":mobs:egg", {
|
minetest.register_node(":mobs:egg", {
|
||||||
description = "Chicken Egg",
|
description = "Egg",
|
||||||
tiles = {"mobs_chicken_egg.png"},
|
tiles = {"mobs_chicken_egg.png"},
|
||||||
inventory_image = "mobs_chicken_egg.png",
|
inventory_image = "mobs_chicken_egg.png",
|
||||||
visual_scale = 0.7,
|
visual_scale = 0.7,
|
||||||
|
@ -67,7 +67,7 @@ mobs:register_mob("mobs_animal:cow", {
|
|||||||
end
|
end
|
||||||
|
|
||||||
if mobs:protect(self, clicker) then return end
|
if mobs:protect(self, clicker) then return end
|
||||||
if mobs:capture_mob(self, clicker, 0, 5, 60, false, nil) then return end
|
--if mobs:capture_mob(self, clicker, 0, 5, 60, false, nil) then return end
|
||||||
|
|
||||||
local tool = clicker:get_wielded_item()
|
local tool = clicker:get_wielded_item()
|
||||||
local name = clicker:get_player_name()
|
local name = clicker:get_player_name()
|
||||||
|
@ -54,7 +54,7 @@ mobs:register_mob("mobs_animal:wolf", {
|
|||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
mobs:capture_mob(self, clicker, 0, 0, 80, true, nil)
|
--mobs:capture_mob(self, clicker, 0, 0, 80, true, nil)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -141,7 +141,7 @@ mobs:register_mob("mobs_animal:dog", {
|
|||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
mobs:capture_mob(self, clicker, 0, 0, 80, false, nil)
|
--mobs:capture_mob(self, clicker, 0, 0, 80, false, nil)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ mobs:register_mob("mobs_animal:kitten", {
|
|||||||
|
|
||||||
if mobs:feed_tame(self, clicker, 4, true, true) then return end
|
if mobs:feed_tame(self, clicker, 4, true, true) then return end
|
||||||
if mobs:protect(self, clicker) then return end
|
if mobs:protect(self, clicker) then return end
|
||||||
if mobs:capture_mob(self, clicker, 50, 50, 90, false, nil) then return end
|
--if mobs:capture_mob(self, clicker, 50, 50, 90, false, nil) then return end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ mobs:register_mob("mobs_animal:pig", {
|
|||||||
},
|
},
|
||||||
on_rightclick = function (self, clicker)
|
on_rightclick = function (self, clicker)
|
||||||
mobs:feed_tame(self, clicker, 8, true, true)
|
mobs:feed_tame(self, clicker, 8, true, true)
|
||||||
mobs:capture_mob(self, clicker, 0, 5, 50, false, nil)
|
--mobs:capture_mob(self, clicker, 0, 5, 50, false, nil)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ for _, col in ipairs(all_colours) do
|
|||||||
if mobs:protect(self, clicker) then return end
|
if mobs:protect(self, clicker) then return end
|
||||||
|
|
||||||
--are we capturing?
|
--are we capturing?
|
||||||
if mobs:capture_mob(self, clicker, 0, 5, 60, false, nil) then return end
|
--if mobs:capture_mob(self, clicker, 0, 5, 60, false, nil) then return end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user