diff --git a/mods/mcl_mobitems/init.lua b/mods/mcl_mobitems/init.lua index 7b1a2761cf..139c421e93 100644 --- a/mods/mcl_mobitems/init.lua +++ b/mods/mcl_mobitems/init.lua @@ -208,6 +208,13 @@ minetest.register_craftitem("mcl_mobitems:rabbit_stew", { groups = { food = 3, eatable = 10 }, }) +minetest.register_tool("mcl_mobitems:carrot_on_a_stick", { + description = "Carrot on a Stick", + wield_image = "mcl_mobitems_carrot_on_a_stick.png", + inventory_image = "mcl_mobitems_carrot_on_a_stick.png", + groups = { transport = 1 }, +}) + ----------- -- Crafting ----------- @@ -234,6 +241,22 @@ minetest.register_craft({ }, }) +minetest.register_craft({ + output = "mcl_mobitems:carrot_on_a_stick", + recipe = { + { "mcl_fishing:fishing_rod", "", }, + { "", "mcl_farming:carrot_item" }, + }, +}) + +minetest.register_craft({ + output = "mcl_mobitems:carrot_on_a_stick", + recipe = { + { "", "mcl_fishing:fishing_rod", }, + { "mcl_farming:carrot_item", "" }, + }, +}) + minetest.register_craft({ type = "shapeless", output = "mcl_mobitems:magma_cream", diff --git a/mods/mcl_mobitems/textures/mcl_mobitems_carrot_on_a_stick.png b/mods/mcl_mobitems/textures/mcl_mobitems_carrot_on_a_stick.png new file mode 100644 index 0000000000..44eb55fc57 Binary files /dev/null and b/mods/mcl_mobitems/textures/mcl_mobitems_carrot_on_a_stick.png differ diff --git a/mods/mobs_mc/pig.lua b/mods/mobs_mc/pig.lua index b6333cf3e0..202c5a61b0 100644 --- a/mods/mobs_mc/pig.lua +++ b/mods/mobs_mc/pig.lua @@ -89,26 +89,25 @@ mobs:register_mob("mobs_mc:pig", { if self.driver and clicker == self.driver then self.driver = nil clicker:set_detach() - default.player_attached[name] = false - default.player_set_animation(clicker, "stand" , 30) + mcl_core.player_attached[name] = false + mcl_core.player_set_animation(clicker, "stand" , 30) elseif not self.driver and self.saddle == "yes" then self.driver = clicker clicker:set_attach(self.object, "", {x = 0, y = 19, z = 0}, {x = 0, y = 0, z = 0}) - default.player_attached[name] = true + mcl_core.player_attached[name] = true minetest.after(0.2, function() - default.player_set_animation(clicker, "sit" , 30) + mcl_core.player_set_animation(clicker, "sit" , 30) end) ----[[ -- ridable pigs - if self.name == "mobs:pig" and self.saddle == "yes" and self.driver then + if self.name == "mobs_mc:pig" and self.saddle == "yes" and self.driver then local item = self.driver:get_wielded_item() - if item:get_name() == "mobs:carrotstick" then + if item:get_name() == "mcl_mobitems:carrot_on_a_stick" then local yaw = self.driver:get_look_yaw() - math.pi / 2 local velo = self.object:getvelocity() local v = 1.5 if math.abs(velo.x) + math.abs(velo.z) < .6 then velo.y = 5 end self.state = "walk" - self:set_animation("walk") self.object:setyaw(yaw) self.object:setvelocity({x = -math.sin(yaw) * v, y = velo.y, z = math.cos(yaw) * v}) @@ -116,7 +115,7 @@ mobs:register_mob("mobs_mc:pig", { local stack = inv:get_stack("main", self.driver:get_wield_index()) stack:add_wear(100) if stack:get_wear() > 65400 then - stack = {name = "fishing:pole", count = 1} + stack = {name = "mcl_fishing:fishing_rod", count = 1} end inv:set_stack("main", self.driver:get_wield_index(), stack) return