From e0185a93113136862b24ad06bea75f1b2e24901f Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Sat, 24 Apr 2021 18:43:17 -0400 Subject: [PATCH] Fix pig logic issue --- mods/ENTITIES/mobs_mc/pig.lua | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/pig.lua b/mods/ENTITIES/mobs_mc/pig.lua index 5ba091c44..5672f2093 100644 --- a/mods/ENTITIES/mobs_mc/pig.lua +++ b/mods/ENTITIES/mobs_mc/pig.lua @@ -94,17 +94,16 @@ mobs:register_mob("mobs_mc:pig", { return end - if clicker:get_player_control().sneak then - --attempt to enter breed state - if mobs.enter_breed_state(self,clicker) then - return - end + --attempt to enter breed state + if mobs.enter_breed_state(self,clicker) then + return + end - --make baby grow faster - if self.baby then - mobs.make_baby_grow_faster(self,clicker) - return - end + --ignore other logic + --make baby grow faster + if self.baby then + mobs.make_baby_grow_faster(self,clicker) + return end if self.child then @@ -113,6 +112,8 @@ mobs:register_mob("mobs_mc:pig", { -- Put saddle on pig local item = clicker:get_wielded_item() + local wielditem = item + if item:get_name() == mobs_mc.items.saddle and self.saddle ~= "yes" then self.base_texture = { "blank.png", -- baby