fix cod behavior
This commit is contained in:
parent
36a24c6c07
commit
7d864fb7b8
8
cod.lua
8
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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user