From 7d864fb7b83882209ce75feca9de34b301b7b76c Mon Sep 17 00:00:00 2001 From: epCode Date: Tue, 30 Mar 2021 19:00:58 -0700 Subject: [PATCH] fix cod behavior --- cod.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cod.lua b/cod.lua index a2f5ec8..529fd12 100644 --- a/cod.lua +++ b/cod.lua @@ -56,12 +56,12 @@ local cod = { run_end = 20, }, drops = { - {name = "mcl_fishing:fish_raw", + {name = "mcl_fishing:fish_raw", chance = 1, min = 1, max = 1, looting = "common",}, - {name = "mcl_dye:white", + {name = "mcl_dye:white", chance = 20, min = 1, max = 1, @@ -79,7 +79,9 @@ local cod = { do_custom = function(self) self.object:set_bone_position("body", vector.new(0,1,0), vector.new(degrees(dir_to_pitch(self.object:get_velocity())) * -1 + 90,0,0)) if minetest.get_item_group(self.standing_in, "water") ~= 0 then - self.object:add_velocity({ x = 0 , y = math.random(-.05, .05) , z = 0 }) + if self.object:get_velocity().y < 2.5 then + self.object:add_velocity({ x = 0 , y = math.random(-.002, .002) , z = 0 }) + end end for _,object in pairs(minetest.get_objects_inside_radius(self.object:get_pos(), 10)) do local lp = object:get_pos()