From ac8cb2ec70692901536aab5dcdb737720fe1b598 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Tue, 1 Oct 2024 09:10:37 +0100 Subject: [PATCH 1/3] tweak on_sound example --- init.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index a430553..024f18f 100644 --- a/init.lua +++ b/init.lua @@ -211,9 +211,8 @@ mobs:register_mob("mob_horse:horse", { end, --[[ on_sound = function(self, def) - -- loudness ranges from (0.0 = cannot hear, to 1.0 = next to sound) if def.loudness > 0.8 then -- if loud enough startle horse into jumping - self.object:set_velocity({x=0, y=5, z=0}) + self.object:set_velocity({x = 0, y = 5, z = 0}) end end ]] @@ -340,4 +339,4 @@ if minetest.get_modpath("lucky_block") then }) end -print("[MOD] Mob Horse loaded") +print("[MOD] Mobs Redo Horse loaded") From 58d84da9ebaa94cef39c3dcf97c3606b5e33f357 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sat, 11 Jan 2025 11:35:27 +0000 Subject: [PATCH 2/3] horse can defend itself --- init.lua | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/init.lua b/init.lua index 024f18f..b8ba5fd 100644 --- a/init.lua +++ b/init.lua @@ -28,7 +28,8 @@ mobs:register_mob("mob_horse:horse", { stand2_start = 25, stand2_end = 25, stand3_start = 55, stand3_end = 75, stand3_loop = false, walk_start = 75, walk_end = 100, - run_start = 75, run_end = 100 + run_start = 75, run_end = 100, + punch_start = 55, punch_end = 75, punch_speed = 35, }, textures = { {"mobs_horse.png"}, -- textures by Mjollna @@ -36,24 +37,27 @@ mobs:register_mob("mob_horse:horse", { {"mobs_horseara.png"} }, fear_height = 3, - runaway = true, + --runaway = true, fly = false, walk_chance = 60, - view_range = 5, + view_range = 10, follow = { "farming:wheat", "default:apple", "farming:oat", "farming:barley", "farming:corn" }, - passive = true, - hp_min = 12, - hp_max = 16, - armor = 200, + passive = false, attack_type = "dogfight", reach = 2.5, damage = 3, + attack_monsters = true, + hp_min = 15, + hp_max = 23, + armor = 100, lava_damage = 5, + fire_damage = 4, fall_damage = 1, water_damage = 0, makes_footstep_sound = true, drops = { - {name = "mobs:leather", chance = 1, min = 0, max = 2} + {name = "mobs:leather", chance = 1, min = 0, max = 2}, + {name = "mobs:meat_raw", chance = 1, min = 1, max = 2} }, do_custom = function(self, dtime) From 3deab2d01c3be55a7c86b591d8af26be45e76bbd Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sat, 11 Jan 2025 11:36:03 +0000 Subject: [PATCH 3/3] view range 7 --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index b8ba5fd..598e095 100644 --- a/init.lua +++ b/init.lua @@ -40,7 +40,7 @@ mobs:register_mob("mob_horse:horse", { --runaway = true, fly = false, walk_chance = 60, - view_range = 10, + view_range = 7, follow = { "farming:wheat", "default:apple", "farming:oat", "farming:barley", "farming:corn"