diff --git a/description.txt b/description.txt index 69cfdc7..7ea736e 100644 --- a/description.txt +++ b/description.txt @@ -1 +1 @@ -MOBS mod of animals, monters and extra, reduced version from tenplush1 and others mods \ No newline at end of file +MOBS mod of animals, fish, farms, monters and extra, reduced version from other mods diff --git a/fishs.lua b/fishs.lua new file mode 100644 index 0000000..6ab7827 --- /dev/null +++ b/fishs.lua @@ -0,0 +1,199 @@ + +local SPRITE_VERSION = minetest.settings:get("mobs_anima.fish_sprite") or false -- set to true to use upright sprites instead of meshes of texture mapping, more faster on slow machines without 3d good gpu + +-- local variables +local l_spawn_chance = 10000 +local l_water_level = minetest.settings:get("water_level") - 1 +local l_visual = "mesh" +local l_visual_size = {x = .75, y = .75} +local l_clown_mesh = "mobs_clowfish.b3d" +local l_trop_mesh = "mobs_fish_blue_white.b3d" +local l_clown_textures = { + {"mobs_clownfish.png"}, + {"mobs_clownfish2.png"} +} +local l_trop_textures = { + {"mobs_fish.png"}, + {"mobs_fish2.png"}, + {"mobs_fish3.png"} +} + +if SPRITE_VERSION then + l_visual = "upright_sprite" + l_visual_size = {x = .5, y = .5} + l_clown_mesh = nil + l_trop_mesh = nil + l_clown_textures = {{"animal_clownfish_clownfish_item.png"}} + l_trop_textures = {{"animal_fish_blue_white_fish_blue_white_item.png"}} +end + + +-- Clownfish +mobs:register_mob("mobs_jam:clownfish", { + type = "animal", + passive = true, + hp_min = 1, + hp_max = 4, + armor = 100, + collisionbox = {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25}, + rotate = 270, + visual = l_visual, + mesh = l_clown_mesh, + textures = l_clown_textures, + visual_size = l_visual_size, + makes_footstep_sound = false, + stepheight = 0, + fly = true, + fly_in = "default:water_source", + fall_speed = 0, + view_range = 8, + water_damage = 0, + air_damage = 0, + lava_damage = 5, + light_damage = 0, + animation = { + speed_normal = 24, + speed_run = 24, + stand_start = 1, + stand_end = 80, + walk_start = 81, + walk_end = 155, + fly_start = 81, + fly_end = 155, + run_start = 81, + run_end = 155 + }, + + on_rightclick = function(self, clicker) + + mobs:capture_mob(self, clicker, 25, 80, 0, true, "mobs_jam:clownfish") + end, + + on_flop = function(self) + +-- print("=== am on land, help!", self.state) + + self.object:set_acceleration({ + x = math.random(-0.1, 0.1), + y = -10, + z = math.random(-0.1, 0.1) + }) + + self.object:set_velocity({x = 0, y = -10, z = 0}) + + return true + end +}) + + +mobs:spawn({ + name = "mobs_jam:clownfish", + nodes = { + "default:water_source", "default:water_flowing", + "default:river_water_source", "default:river_water_flowing" + }, + neighbors = {"default:sand","default:dirt","group:seaplants","group:seacoral"}, + min_light = 5, + interval = 30, + chance = l_spawn_chance, + max_height = l_water_level, + active_object_count = 5 +}) + + +mobs:register_egg("mobs_jam:clownfish", "Clownfish", + "animal_clownfish_clownfish_item.png", 0) + + +-- Tropical fish +mobs:register_mob("mobs_jam:tropical", { + type = "animal", + passive = true, + hp_min = 1, + hp_max = 4, + armor = 100, + collisionbox = {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25}, + rotate = 270, + visual = l_visual, + mesh = l_trop_mesh, + textures = l_trop_textures, + visual_size = l_visual_size, + makes_footstep_sound = false, + stepheight = 0, + fly = true, + fly_in = "default:water_source", + fall_speed = 0, + view_range = 8, + water_damage = 0, + lava_damage = 5, + light_damage = 0, + air_damage = 0, + animation = { + speed_normal = 24, + speed_run = 24, + stand_start = 1, + stand_end = 80, + walk_start = 81, + walk_end = 155, + run_start = 81, + run_end = 155 + }, + + on_rightclick = function(self, clicker) + + mobs:capture_mob(self, clicker, 25, 80, 0, true, "mobs_jam:tropical") + end, + + on_flop = function(self) + +-- print("=== am on land, help!", self.state) + + self.object:set_acceleration({ + x = math.random(-0.1, 0.1), + y = -10, + z = math.random(-0.1, 0.1) + }) + + self.object:set_velocity({x = 0, y = -10, z = 0}) + + return true + end +}) + + +mobs:spawn({ + name = "mobs_jam:tropical", + nodes = { + "default:water_source", "default:water_flowing", + "default:river_water_source", "default:river_water_flowing" + }, + neighbors = {"default:sand","default:dirt","group:seaplants","group:seacoral"}, + min_light = 5, + interval = 30, + chance = l_spawn_chance, + max_height = l_water_level, + active_object_count = 5 +}) + + +mobs:register_egg("mobs_jam:tropical", "Tropical fish", + "animal_fish_blue_white_fish_blue_white_item.png", 0) + + +local function add_food_group(item) + + local def = minetest.registered_items[item] + local grp = def.groups + + grp.food_fish_raw = 1 + + minetest.override_item(item, {groups = grp}) +end + +add_food_group("mobs_jam:tropical") +add_food_group("mobs_jam:clownfish") + +mobs:alias_mob("mobs_fish:clownfish", "mobs_jam:clownfish") +mobs:alias_mob("mobs_fish:tropical", "mobs_jam:tropical") + +print("[MOD] Mobs JAM - animal - Fish - loaded") diff --git a/init.lua b/init.lua index bf2a2a2..5ef7c68 100644 --- a/init.lua +++ b/init.lua @@ -62,6 +62,10 @@ ddoo("penguin") -- D00Med ddoo("panda") -- AspireMint end +if not minetest.get_modpath("mobs_fish") and minetest.settings:get_bool("mobs_animal.fish") ~= false then +dofile(path .. "fishs.lua") -- mobs_water / mobs_fish +end + if not minetest.get_modpath("mobs_doomed") and not minetest.get_modpath("dmobs") then dofile(path .. "fox.lua") -- D00Med dofile(path .. "owl.lua") -- D00Med diff --git a/license.txt b/license.txt index 8b478c6..057d0bd 100644 --- a/license.txt +++ b/license.txt @@ -15,6 +15,20 @@ Texture Copyright (CC0) creative commons zero by LordNeo mobs_balrog_balrog_whip.png + +Source Code: CC-BY-SA-NC for fishs Author: Sapier & +Model/Textures: CC-BY-SA 3.0 for fishs Author: Sapier + mobs_clowfish.b3d + mobs_fish_blue_white.b3d + animal_clownfish_clownfish_item.png + animal_fish_blue_white_fish_blue_white_item.png + mobs_clownfish.png + mobs_clownfish2.png + mobs_fish.png + mobs_fish2.png + mobs_fish3.png + + Chicken/Cow/Panda/Pig/Sheep sounds from freesounds.org under CC0 Mutton, Pork and Rabbit meat textures by Piezo_ under CC0 diff --git a/mod.conf b/mod.conf index c6fdf55..130f969 100644 --- a/mod.conf +++ b/mod.conf @@ -1,6 +1,6 @@ name = mobs_jam depends = mobs, default, fire, mobs, tnt optional_depends = farming, lucky_block, nether -description = MOBS mod of animals, monters and extra, reduced version from tenplush1 and others mods +description = MOBS mod of animals, fish, farms, monters and extra, reduced version from other mods min_minetest_version = 0.4.16 media_license = CC-BY-SA-3.0 diff --git a/models/mobs_clowfish.b3d b/models/mobs_clowfish.b3d new file mode 100644 index 0000000..f6b7bec Binary files /dev/null and b/models/mobs_clowfish.b3d differ diff --git a/models/mobs_fish_blue_white.b3d b/models/mobs_fish_blue_white.b3d new file mode 100644 index 0000000..0008a86 Binary files /dev/null and b/models/mobs_fish_blue_white.b3d differ diff --git a/readme.md b/readme.md index 9db4b7d..7c1f7d8 100644 --- a/readme.md +++ b/readme.md @@ -14,7 +14,7 @@ Reason is the nascisic and petty behaviour of mayority of minetest developers It provides mobs: -* `mobs_animal` a mixed from original PilzAdam with the ones of tenplus1 +* `mobs_animal` a mixed from original PilzAdam with the ones of tenplus1 and * `bee` * `chicken` * `cow` @@ -24,6 +24,8 @@ It provides mobs: * `penguin` * `kitten` * `warthog` + * `clowfish` + * `tropical` * `mobs_monster` disected from original PilzAdam, adapted to mobs_redo * `fire_spirit` * `oerkki` @@ -69,10 +71,13 @@ animals has a bunch of options balrog needs `enable_tnt` to set to true if you want to explote on dead! -## Animals: +## Mobs: **Note**: *After breeding, animals need to rest for 4 minutes and baby animals take 4 minutes to grow up, also feeding them helps them grow quicker...* +### Clowfish +Small fish on water + ### Bee Tends to buzz around flowers and gives honey when killed, you can also right-click a bee to pick it up and place in inventory. 3x bee's in a row can craft a beehive. @@ -127,6 +132,10 @@ Found in dark areas like most monsters, Oerkki wander the caverns stealing away Fire Spirits will not tolerate players roaming around their domain and will fiercely attack until their dying puff of smoke. They will drop their spirit and some fire dust when using ethereal. +### Tropical fish + +Big fish to catch on waters + ### balrog The final boss! it could inclusive crash the server.. be carefully! @@ -143,6 +152,8 @@ CC-BY-SA-NC unless permission of This mod handles several others works under following licences: * Copyright (C) 2016-2020 tenplus1 +* Copyright (C) 2015 Sapier +* Copyright (C) 2015 blert2112 * Copyright (C) 2015 LordNeo * Copyright (C) 2014 Hamlet * Copyright (C) 2014 STHGOM / sparky diff --git a/settingtypes.txt b/settingtypes.txt index 2cc549a..74be135 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -8,3 +8,6 @@ mobs_animal.penguin (Enable Penguin) bool true mobs_animal.rat (Enable Rat) bool true mobs_animal.sheep (Enable Sheep) bool true mobs_animal.warthog (Enable Warthog) bool true +mobs_animal.fish (Enable Fish) bool true + +mobs_animal.fish_sprite (Enable sprites for Fishs event texture mapping) bool false \ No newline at end of file diff --git a/textures/animal_clownfish_clownfish_item.png b/textures/animal_clownfish_clownfish_item.png new file mode 100644 index 0000000..151d48e Binary files /dev/null and b/textures/animal_clownfish_clownfish_item.png differ diff --git a/textures/animal_fish_blue_white_fish_blue_white_item.png b/textures/animal_fish_blue_white_fish_blue_white_item.png new file mode 100644 index 0000000..e0a883d Binary files /dev/null and b/textures/animal_fish_blue_white_fish_blue_white_item.png differ diff --git a/textures/mobs_clownfish.png b/textures/mobs_clownfish.png new file mode 100644 index 0000000..9503fd3 Binary files /dev/null and b/textures/mobs_clownfish.png differ diff --git a/textures/mobs_clownfish2.png b/textures/mobs_clownfish2.png new file mode 100644 index 0000000..86d3179 Binary files /dev/null and b/textures/mobs_clownfish2.png differ diff --git a/textures/mobs_fish.png b/textures/mobs_fish.png new file mode 100644 index 0000000..55dd017 Binary files /dev/null and b/textures/mobs_fish.png differ diff --git a/textures/mobs_fish2.png b/textures/mobs_fish2.png new file mode 100644 index 0000000..b3e0528 Binary files /dev/null and b/textures/mobs_fish2.png differ diff --git a/textures/mobs_fish3.png b/textures/mobs_fish3.png new file mode 100644 index 0000000..2e7b1df Binary files /dev/null and b/textures/mobs_fish3.png differ