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: MineClone2/MineClone2#4096 Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land> Co-authored-by: nixnoxus <nixnoxus@web.de> Co-committed-by: nixnoxus <nixnoxus@web.de>
This commit is contained in:
parent
a3db7bd504
commit
a86e8e2c8e
|
@ -322,7 +322,7 @@ function mob_class:toggle_sit(clicker,p)
|
||||||
particle = "mobs_mc_wolf_icon_roam.png"
|
particle = "mobs_mc_wolf_icon_roam.png"
|
||||||
self.order = "roam"
|
self.order = "roam"
|
||||||
self.state = "stand"
|
self.state = "stand"
|
||||||
self.walk_chance = default_walk_chance
|
self.walk_chance = 50
|
||||||
self.jump = true
|
self.jump = true
|
||||||
self:set_animation("stand")
|
self:set_animation("stand")
|
||||||
-- TODO: Add sitting model
|
-- TODO: Add sitting model
|
||||||
|
|
|
@ -30,6 +30,8 @@ local strider = {
|
||||||
} },
|
} },
|
||||||
visual_size = {x=3, y=3},
|
visual_size = {x=3, y=3},
|
||||||
sounds = {
|
sounds = {
|
||||||
|
eat = "mobs_mc_animal_eat_generic",
|
||||||
|
distance = 16,
|
||||||
},
|
},
|
||||||
jump = true,
|
jump = true,
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
|
@ -51,6 +53,7 @@ local strider = {
|
||||||
walk_start = 1,
|
walk_start = 1,
|
||||||
walk_end = 20,
|
walk_end = 20,
|
||||||
},
|
},
|
||||||
|
follow = { "mcl_crimson:warped_fungus" },
|
||||||
lava_damage = 0,
|
lava_damage = 0,
|
||||||
fire_damage = 0,
|
fire_damage = 0,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
|
@ -67,8 +70,13 @@ local strider = {
|
||||||
do_custom = function(self, dtime)
|
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
|
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
|
if self.driver then
|
||||||
self.run_velocity = 4
|
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.base_texture[1] = "extra_mobs_strider.png"
|
||||||
self.shaking = false
|
self.shaking = false
|
||||||
else
|
else
|
||||||
|
@ -122,7 +130,7 @@ local strider = {
|
||||||
|
|
||||||
local wielditem = clicker:get_wielded_item()
|
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
|
if self:feed_tame(clicker, 1, true, true) then return end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -206,7 +214,7 @@ textures = { {
|
||||||
} }
|
} }
|
||||||
baby_strider.walk_velocity = 1.2
|
baby_strider.walk_velocity = 1.2
|
||||||
baby_strider.run_velocity = 2.4
|
baby_strider.run_velocity = 2.4
|
||||||
baby_strider.child = 1
|
baby_strider.child = true
|
||||||
|
|
||||||
mcl_mobs.register_mob("mobs_mc:baby_strider", baby_strider)
|
mcl_mobs.register_mob("mobs_mc:baby_strider", baby_strider)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue