forked from VoxeLibre/VoxeLibre
Fix pig logic issue
This commit is contained in:
parent
c2cb15a47f
commit
e0185a9311
|
@ -94,18 +94,17 @@ mobs:register_mob("mobs_mc:pig", {
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if clicker:get_player_control().sneak then
|
|
||||||
--attempt to enter breed state
|
--attempt to enter breed state
|
||||||
if mobs.enter_breed_state(self,clicker) then
|
if mobs.enter_breed_state(self,clicker) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--ignore other logic
|
||||||
--make baby grow faster
|
--make baby grow faster
|
||||||
if self.baby then
|
if self.baby then
|
||||||
mobs.make_baby_grow_faster(self,clicker)
|
mobs.make_baby_grow_faster(self,clicker)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
if self.child then
|
if self.child then
|
||||||
return
|
return
|
||||||
|
@ -113,6 +112,8 @@ mobs:register_mob("mobs_mc:pig", {
|
||||||
|
|
||||||
-- Put saddle on pig
|
-- Put saddle on pig
|
||||||
local item = clicker:get_wielded_item()
|
local item = clicker:get_wielded_item()
|
||||||
|
local wielditem = item
|
||||||
|
|
||||||
if item:get_name() == mobs_mc.items.saddle and self.saddle ~= "yes" then
|
if item:get_name() == mobs_mc.items.saddle and self.saddle ~= "yes" then
|
||||||
self.base_texture = {
|
self.base_texture = {
|
||||||
"blank.png", -- baby
|
"blank.png", -- baby
|
||||||
|
|
Loading…
Reference in New Issue