forked from epCode/extra_mobs
Merge pull request 'Use warped fungus on a stick and add mod.conf' (#1) from TechDudie/extra_mobs:master into master
Reviewed-on: epCode/extra_mobs#1
This commit is contained in:
commit
33e907ad29
|
@ -0,0 +1,3 @@
|
||||||
|
name = extra_mobs
|
||||||
|
depends = mc_mobs
|
||||||
|
optional_depends = mc
|
12
strider.lua
12
strider.lua
|
@ -114,8 +114,14 @@ local strider = {
|
||||||
end
|
end
|
||||||
|
|
||||||
local wielditem = clicker:get_wielded_item()
|
local wielditem = clicker:get_wielded_item()
|
||||||
-- No fungus on stick, so using carrot on a stick
|
|
||||||
if wielditem:get_name() ~= mobs_mc.items.carrot_on_a_stick then
|
local controlitem = ""
|
||||||
|
if minetest.get_modpath("mc") then
|
||||||
|
controlitem = "mc:warped_fungus_stick"
|
||||||
|
else
|
||||||
|
controlitem = mobs_mc.items.carrot_on_a_stick
|
||||||
|
end
|
||||||
|
if wielditem:get_name() ~= controlitem then
|
||||||
if mobs:feed_tame(self, clicker, 1, true, true) then return end
|
if mobs:feed_tame(self, clicker, 1, true, true) then return end
|
||||||
end
|
end
|
||||||
if mobs:protect(self, clicker) then return end
|
if mobs:protect(self, clicker) then return end
|
||||||
|
@ -163,7 +169,7 @@ local strider = {
|
||||||
mobs.detach(clicker, {x=1, y=0, z=0})
|
mobs.detach(clicker, {x=1, y=0, z=0})
|
||||||
return
|
return
|
||||||
|
|
||||||
elseif not self.driver and self.saddle == "yes" and wielditem:get_name() == mobs_mc.items.carrot_on_a_stick then
|
elseif not self.driver and self.saddle == "yes" and wielditem:get_name() == controlitem then
|
||||||
-- Ride pig if it has a saddle and player uses a carrot on a stick
|
-- Ride pig if it has a saddle and player uses a carrot on a stick
|
||||||
|
|
||||||
mobs.attach(self, clicker)
|
mobs.attach(self, clicker)
|
||||||
|
|
Loading…
Reference in New Issue