mirror of
https://github.com/blert2112/mobs_water.git
synced 2025-07-18 06:00:19 +02:00
Compare commits
3 Commits
master
...
nalc-1.2.0
Author | SHA1 | Date | |
---|---|---|---|
bb28270f65 | |||
6ce28cc28a | |||
a1c3603056 |
@ -133,3 +133,5 @@ if mobs.mod and mobs.mod == "redo" then
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
minetest.log("action","[mobs_crocs] loaded.")
|
||||
|
@ -102,3 +102,5 @@ local SPRITE_VERSION = false -- set to true to use upright sprites instead of me
|
||||
mobs:register_egg("mobs_fish:tropical", "Tropical fish", "animal_fish_blue_white_fish_blue_white_item.png", 0)
|
||||
|
||||
end
|
||||
|
||||
minetest.log("action", "[mobs_fish] loaded.")
|
||||
|
@ -38,3 +38,4 @@ if mobs.mod and mobs.mod == "redo" then
|
||||
|
||||
end
|
||||
|
||||
minetest.log("action", "[mobs_jellyfish] loaded.")
|
||||
|
@ -83,6 +83,7 @@ if mobs.mod and mobs.mod == "redo" then
|
||||
--name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height
|
||||
mobs:spawn_specific("mobs_sharks:shark_lg", l_spawn_in, l_spawn_near, -1, 20, 30, l_spawn_chance, 1, -31000, 0)
|
||||
mobs:register_egg("mobs_sharks:shark_lg", "Shark (large)", l_egg_texture, 0)
|
||||
mobs:alias_mob("mobs:shark_lg", "mobs_sharks:shark_lg")
|
||||
end
|
||||
|
||||
-- medium
|
||||
@ -116,6 +117,7 @@ if mobs.mod and mobs.mod == "redo" then
|
||||
--name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height
|
||||
mobs:spawn_specific("mobs_sharks:shark_md", l_spawn_in, l_spawn_near, -1, 20, 30, l_spawn_chance, 1, -31000, 0)
|
||||
mobs:register_egg("mobs_sharks:shark_md", "Shark (medium)", l_egg_texture, 0)
|
||||
mobs:alias_mob("mobs:shark_md", "mobs_sharks:shark_md")
|
||||
end
|
||||
|
||||
-- small
|
||||
@ -149,6 +151,9 @@ if mobs.mod and mobs.mod == "redo" then
|
||||
--name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height
|
||||
mobs:spawn_specific("mobs_sharks:shark_sm", l_spawn_in, l_spawn_near, -1, 20, 30, l_spawn_chance, 1, -31000, 0)
|
||||
mobs:register_egg("mobs_sharks:shark_sm", "Shark (small)", l_egg_texture, 0)
|
||||
mobs:alias_mob("mobs:shark_sm", "mobs_sharks:shark_sm")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
minetest.log("action", "[mobs_sharks] loaded.")
|
||||
|
@ -1,6 +1,22 @@
|
||||
|
||||
if mobs.mod and mobs.mod == "redo" then
|
||||
|
||||
local sin = math.sin
|
||||
local cos = math.cos
|
||||
|
||||
-- move mob in facing direction
|
||||
local set_velocity = function(self, v)
|
||||
|
||||
local yaw = (self.object:get_yaw() or 0) + self.rotate
|
||||
|
||||
self.object:setvelocity(
|
||||
{
|
||||
x = sin(yaw) * -v,
|
||||
y = self.object:getvelocity().y,
|
||||
z = cos(yaw) * v
|
||||
})
|
||||
end
|
||||
|
||||
local l_colors = {
|
||||
"#604000:175", --brown
|
||||
"#604000:100", --brown2
|
||||
@ -106,3 +122,5 @@ if mobs.mod and mobs.mod == "redo" then
|
||||
mobs:register_egg("mobs_turtles:seaturtle", "Sea Turtle", "default_water.png", 1)
|
||||
|
||||
end
|
||||
|
||||
minetest.log("action", "[mobs_turtles] loaded.")
|
||||
|
Reference in New Issue
Block a user