From a86e8e2c8e4d70fe44b70a0c789e87676e42baa9 Mon Sep 17 00:00:00 2001 From: nixnoxus Date: Sat, 13 Apr 2024 23:38:46 +0000 Subject: [PATCH] fix strider breeding & increase riding speed (#4096) - Striders follow `mcl_crimson:warped_fungus` - Striders can be bred with `mcl_crimson:warped_fungus` - Riding speed increased to 2 m/s - Warning fixed Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/4096 Reviewed-by: the-real-herowl Co-authored-by: nixnoxus Co-committed-by: nixnoxus --- mods/ENTITIES/mcl_mobs/breeding.lua | 2 +- mods/ENTITIES/mobs_mc/strider.lua | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/breeding.lua b/mods/ENTITIES/mcl_mobs/breeding.lua index 8d3e03ec6..7b5d91119 100644 --- a/mods/ENTITIES/mcl_mobs/breeding.lua +++ b/mods/ENTITIES/mcl_mobs/breeding.lua @@ -322,7 +322,7 @@ function mob_class:toggle_sit(clicker,p) particle = "mobs_mc_wolf_icon_roam.png" self.order = "roam" self.state = "stand" - self.walk_chance = default_walk_chance + self.walk_chance = 50 self.jump = true self:set_animation("stand") -- TODO: Add sitting model diff --git a/mods/ENTITIES/mobs_mc/strider.lua b/mods/ENTITIES/mobs_mc/strider.lua index 18ce7ea4a..c5a129717 100644 --- a/mods/ENTITIES/mobs_mc/strider.lua +++ b/mods/ENTITIES/mobs_mc/strider.lua @@ -30,6 +30,8 @@ local strider = { } }, visual_size = {x=3, y=3}, sounds = { + eat = "mobs_mc_animal_eat_generic", + distance = 16, }, jump = true, makes_footstep_sound = true, @@ -51,6 +53,7 @@ local strider = { walk_start = 1, walk_end = 20, }, + follow = { "mcl_crimson:warped_fungus" }, lava_damage = 0, fire_damage = 0, light_damage = 0, @@ -67,8 +70,13 @@ local strider = { do_custom = function(self, dtime) if minetest.find_node_near(self.object:get_pos(), 2, {"mcl_core:lava_source","mcl_core:lava_flowing","mcl_nether:nether_lava_source","mcl_nether:nether_lava_flowing"}) then - self.walk_velocity = 2 - self.run_velocity = 4 + if self.driver then + self.walk_velocity = 4 + self.run_velocity = 8 + else + self.walk_velocity = 2 + self.run_velocity = 4 + end self.base_texture[1] = "extra_mobs_strider.png" self.shaking = false else @@ -122,7 +130,7 @@ local strider = { local wielditem = clicker:get_wielded_item() - if wielditem:get_name() ~= "mcl_crimson:warped_fungus" then + if wielditem:get_name() == "mcl_crimson:warped_fungus" then if self:feed_tame(clicker, 1, true, true) then return end end @@ -206,7 +214,7 @@ textures = { { } } baby_strider.walk_velocity = 1.2 baby_strider.run_velocity = 2.4 -baby_strider.child = 1 +baby_strider.child = true mcl_mobs.register_mob("mobs_mc:baby_strider", baby_strider)