diff --git a/mods/animalia/mobs/wolf.lua b/mods/animalia/mobs/wolf.lua index 10a499b2..65f7299d 100644 --- a/mods/animalia/mobs/wolf.lua +++ b/mods/animalia/mobs/wolf.lua @@ -8,7 +8,8 @@ local follow = { "animalia:mutton_raw", "animalia:beef_raw", "animalia:porkchop_raw", - "animalia:poultry_raw" + "animalia:poultry_raw", "ethereal:fish_raw", "animalworld:rawfish", "mobs_fish:tropical", + "mobs:meat_raw", "mcl_mobitems:chicken", "mcl_fishing:pufferfish_raw", "mcl_mobitems:rotten_flesh", "mcl_mobitems:mutton", "mcl_mobitems:beef", "mcl_mobitems:porkchop", "mcl_mobitems:rabbit", "animalworld:rabbit_raw", "animalworld:pork_raw", "water_life:meat_raw", "xocean:fish_edible", "animalworld:chicken_raw", "mobs:meatblock_raw", "animalworld:chicken_raw", "livingfloatlands:ornithischiaraw", "livingfloatlands:largemammalraw", "livingfloatlands:theropodraw", "livingfloatlands:sauropodraw", "animalworld:raw_athropod", "animalworld:whalemeat_raw", "animalworld:rabbit_raw", "nativevillages:chicken_raw", "mobs:meat_raw", "animalworld:pork_raw", "people:mutton:raw" } if minetest.registered_items["bonemeal:bone"] then @@ -17,7 +18,8 @@ if minetest.registered_items["bonemeal:bone"] then "animalia:beef_raw", "animalia:porkchop_raw", "animalia:mutton_raw", - "animalia:poultry_raw" + "animalia:poultry_raw", "ethereal:fish_raw", "animalworld:rawfish", "mobs_fish:tropical", + "mobs:meat_raw", "mcl_mobitems:chicken", "mcl_fishing:pufferfish_raw", "mcl_mobitems:rotten_flesh", "mcl_mobitems:mutton", "mcl_mobitems:beef", "mcl_mobitems:porkchop", "mcl_mobitems:rabbit", "animalworld:rabbit_raw", "animalworld:pork_raw", "water_life:meat_raw", "xocean:fish_edible", "animalworld:chicken_raw", "mobs:meatblock_raw", "animalworld:chicken_raw", "livingfloatlands:ornithischiaraw", "livingfloatlands:largemammalraw", "livingfloatlands:theropodraw", "livingfloatlands:sauropodraw", "animalworld:raw_athropod", "animalworld:whalemeat_raw", "animalworld:rabbit_raw", "nativevillages:chicken_raw", "mobs:meat_raw", "animalworld:pork_raw", "people:mutton:raw" } end diff --git a/mods/animalworld/ant.lua b/mods/animalworld/ant.lua index a3c8c712..ec18a7e0 100644 --- a/mods/animalworld/ant.lua +++ b/mods/animalworld/ant.lua @@ -34,6 +34,8 @@ mobs:register_mob("animalworld:ant", { drops = { {name = "animalworld:ant", chance = 1, min = 1, max = 1}, }, + on_use = minetest.item_eat(1), + groups = {food = 1, flammable = 2, eatable = 1}, water_damage = 1, lava_damage = 4, light_damage = 0, @@ -54,6 +56,19 @@ mobs:register_mob("animalworld:ant", { }, }) +minetest.register_craftitem(":animalworld:cookedant", { + description = S("Cooked Ant"), + inventory_image = "aantcooked.png", + on_use = minetest.item_eat(2), + groups = {food = 1, flammable = 2, eatable = 2}, +}) + +minetest.register_craft({ + type = "cooking", + output = "animalworld:cookedant", + recipe = "animalworld:ant", + cooktime = 5, +}) if not mobs.custom_spawn_animalworld then mobs:spawn({ @@ -75,11 +90,12 @@ mobs:register_egg("animalworld:ant", S("Ant"), "aant.png") mobs:alias_mob("animalworld:ant", "animalworld:ant") + minetest.register_craftitem(":animalworld:anteggs_raw", { description = S("Raw Ant Eggs"), inventory_image = "animalworld_anteggs_raw.png", on_use = minetest.item_eat(2), - groups = {food_meat_raw = 1, flammable = 2}, + groups = {food = 1, flammable = 2}, }) @@ -87,7 +103,7 @@ minetest.register_craftitem(":animalworld:anteggs_cooked", { description = S("Cooked Ant Eggs"), inventory_image = "animalworld_anteggs_cooked.png", on_use = minetest.item_eat(6), - groups = {food_meat = 1, flammable = 2}, + groups = {food = 1, flammable = 2}, }) minetest.register_craft({ diff --git a/mods/animalworld/blackbird.lua b/mods/animalworld/blackbird.lua index cf82f14c..1e4942cc 100644 --- a/mods/animalworld/blackbird.lua +++ b/mods/animalworld/blackbird.lua @@ -1,22 +1,22 @@ local S = minetest.get_translator("animalworld") mobs:register_mob("animalworld:blackbird", { -stepheight = 3, + stepheight = 3, type = "animal", passive = true, - attack_type = "dogfight", + attack_type = "dogfight", attack_animals = false, reach = 2, - damage = 2, + damage = 2, hp_min = 5, hp_max = 30, armor = 100, - collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.5, 0.3}, + collisionbox = { -0.3, -0.01, -0.3, 0.3, 0.5, 0.3 }, visual = "mesh", mesh = "Blackbird.b3d", - visual_size = {x = 1.0, y = 1.0}, + visual_size = { x = 1.0, y = 1.0 }, textures = { - {"textureblackbird.png"}, + { "textureblackbird.png" }, }, sounds = { random = "animalworld_blackbird", @@ -26,16 +26,72 @@ stepheight = 3, run_velocity = 4, runaway = true, fall_speed = -1, - runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player", "animalworld:wolf", "animalworld:panda", "animalworld:stingray", "marinaramobs:jellyfish", "marinaramobs:octopus", "livingcavesmobs:biter", "livingcavesmobs:flesheatingbacteria"}, - jump = true, - jump_height = 4, - stay_near = {{"default:tree", "default:leaves", "flowers_dandelion_yellow", "default:bush_leaves", "default:grass_1", "naturalbiomes:heath_grass", "naturalbiomes:heath_grass2", "naturalbiomes:heath_grass3", "naturalbiomes:heatherflower", "naturalbiomes:heatherflower2", "naturalbiomes:heatherflower3"}, 6}, - drops = { - {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1}, - {name = "animalworld:chicken_feather", chance = 1, min = 1, max = 1}, - {name = "animalworld:blackbirdcorpse", chance = 7, min = 1, max = 1}, - + runaway_from = { + "animalworld:bear", + "animalworld:crocodile", + "animalworld:tiger", + "animalworld:spider", + "animalworld:spidermale", + "animalworld:shark", + "animalworld:hyena", + "animalworld:kobra", + "animalworld:monitor", + "animalworld:snowleopard", + "animalworld:volverine", + "livingfloatlands:deinotherium", + "livingfloatlands:carnotaurus", + "livingfloatlands:lycaenops", + "livingfloatlands:smilodon", + "livingfloatlands:tyrannosaurus", + "livingfloatlands:velociraptor", + "animalworld:divingbeetle", + "animalworld:scorpion", + "animalworld:polarbear", + "animalworld:leopardseal", + "animalworld:stellerseagle", + "player", + "animalworld:wolf", + "animalworld:panda", + "animalworld:stingray", + "marinaramobs:jellyfish", + "marinaramobs:octopus", + "livingcavesmobs:biter", + "livingcavesmobs:flesheatingbacteria", }, + jump = true, + jump_height = 4, + stay_near = { + { + "default:tree", + "default:leaves", + "flowers_dandelion_yellow", + "default:bush_leaves", + "default:grass_1", + "naturalbiomes:heath_grass", + "naturalbiomes:heath_grass2", + "naturalbiomes:heath_grass3", + "naturalbiomes:heatherflower", + "naturalbiomes:heatherflower2", + "naturalbiomes:heatherflower3", + }, + 6, + }, + + drops = function() + if minetest.get_modpath("animalia") then + return { + { name = "animalia:poultry_raw", chance = 1, min = 1, max = 1 }, + { name = "animalia:feather", chance = 1, min = 1, max = 1 }, + { name = "animalworld:blackbirdcorpse", chance = 7, min = 1, max = 1 }, + } + else + return { + { name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1 }, + { name = "animalworld:chicken_feather", chance = 1, min = 1, max = 1 }, + { name = "animalworld:blackbirdcorpse", chance = 7, min = 1, max = 1 }, + } + end + end, water_damage = 1, lava_damage = 4, light_damage = 0, @@ -46,9 +102,9 @@ stepheight = 3, stand_end = 200, walk_start = 0, walk_end = 100, - fly_start = 250, + fly_start = 250, fly_end = 350, - jump_start = 250, + jump_start = 250, jump_end = 350, punch_start = 100, punch_end = 200, @@ -59,36 +115,65 @@ stepheight = 3, die_rotate = true, }, -fly_in = {"air"}, + fly_in = { "air" }, floats = 0, follow = { - "fishing:bait:worm", "farming:seed_wheat", "farming:seed_rice", "farming:seed_oat", "ethereal:pine_nuts", "ethereal:worm", "naturalbiomes:blackberry", "animalworld:bugice", "animalworld:termitequeen", "animalworld:notoptera", "animalworld:anteggs_raw", "farming:seed_hemp", "farming:seed_barley", "farming:seed_oat", "farming:seed_cotton", "farming:seed_sunflower", "farming:seed_wheat", "farming:seed_rye" + "fishing:bait:worm", + "farming:seed_wheat", + "farming:seed_rice", + "farming:seed_oat", + "ethereal:pine_nuts", + "ethereal:worm", + "naturalbiomes:blackberry", + "animalworld:bugice", + "animalworld:termitequeen", + "animalworld:notoptera", + "animalworld:anteggs_raw", + "farming:seed_hemp", + "farming:seed_barley", + "farming:seed_oat", + "farming:seed_cotton", + "farming:seed_sunflower", + "farming:seed_wheat", + "farming:seed_rye", }, - -view_range = 4, + + view_range = 4, on_rightclick = function(self, clicker) - -- feed or tame - if mobs:feed_tame(self, clicker, 4, false, true) then return end - if mobs:protect(self, clicker) then return end - if mobs:capture_mob(self, clicker, 15, 25, 0, false, nil) then return end + if mobs:feed_tame(self, clicker, 4, false, true) then + return + end + if mobs:protect(self, clicker) then + return + end + if mobs:capture_mob(self, clicker, 15, 25, 0, false, nil) then + return + end end, }) if not mobs.custom_spawn_animalworld then -mobs:spawn({ - name = "animalworld:blackbird", - nodes = {"mcl_core:dirt_with_grass", "default:dirt_with_grass", "naturalbiomes:heath_litter"}, - neighbors = {"group:grass", "group:normal_grass", "naturalbiomes:heath_grass", "naturalbiomes:heath_grass2", "naturalbiomes:heath_grass3", "naturalbiomes:heatherflower"}, - min_light = 0, - interval = 60, - chance = 2000, -- 15000 - active_object_count = 2, - min_height = 0, - max_height = 100, - day_toggle = true, -}) + mobs:spawn({ + name = "animalworld:blackbird", + nodes = { "mcl_core:dirt_with_grass", "default:dirt_with_grass", "naturalbiomes:heath_litter" }, + neighbors = { + "group:grass", + "group:normal_grass", + "naturalbiomes:heath_grass", + "naturalbiomes:heath_grass2", + "naturalbiomes:heath_grass3", + "naturalbiomes:heatherflower", + }, + min_light = 0, + interval = 60, + chance = 2000, -- 15000 + active_object_count = 2, + min_height = 0, + max_height = 100, + day_toggle = true, + }) end mobs:register_egg("animalworld:blackbird", S("Blackbird"), "ablackbird.png") diff --git a/mods/animalworld/blackgrouse.lua b/mods/animalworld/blackgrouse.lua index 88ec378f..b3005e67 100644 --- a/mods/animalworld/blackgrouse.lua +++ b/mods/animalworld/blackgrouse.lua @@ -38,10 +38,19 @@ stepheight = 2, fall_damage = 0, runaway = true, runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:wolf", "animalworld:panda", "animalworld:stingray", "marinaramobs:jellyfish", "marinaramobs:octopus", "livingcavesmobs:biter", "livingcavesmobs:flesheatingbacteria"}, - drops = { - {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1}, + drops = function() + if minetest.get_modpath("animalia") then + return { + { name = "animalia:poultry_raw", chance = 1, min = 1, max = 1 }, + { name = "animalia:feather", chance = 1, min = 1, max = 1 }, + } + else + return { + {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1}, {name = "animalworld:chicken_feather", chance = 1, min = 1, max = 1}, - }, + } + end + end, water_damage = 1, lava_damage = 5, light_damage = 0, diff --git a/mods/animalworld/boar.lua b/mods/animalworld/boar.lua index c2d94130..a5b44ac2 100644 --- a/mods/animalworld/boar.lua +++ b/mods/animalworld/boar.lua @@ -35,10 +35,19 @@ mobs:register_mob("animalworld:boar", { replace_rate = 10, replace_what = {"farming:soil", "farming:soil_wet"}, replace_with = "default:dirt", - drops = { - {name = "animalworld:pork_raw", chance = 1, min = 2, max = 5}, - {name = "animalworld:boarcorpse", chance = 7, min = 1, max = 1}, - }, + drops = (function() + if minetest.get_modpath("animalia") then + return { + {name = "animalia:porkcop_raw", chance = 1, min = 2, max = 5}, + {name = "animalworld:boarcorpse", chance = 7, min = 1, max = 1}, + } + else + return { + {name = "animalworld:pork_raw", chance = 1, min = 2, max = 5}, + {name = "animalworld:boarcorpse", chance = 7, min = 1, max = 1}, + } + end + end), water_damage = 0, lava_damage = 5, light_damage = 0, diff --git a/mods/animalworld/carp.lua b/mods/animalworld/carp.lua index e778aa72..50d7767b 100644 --- a/mods/animalworld/carp.lua +++ b/mods/animalworld/carp.lua @@ -91,7 +91,7 @@ minetest.register_craftitem(":animalworld:rawfish", { description = S("Raw Fish"), inventory_image = "animalworld_rawfish.png", on_use = minetest.item_eat(3), - groups = {food_meat_raw = 1, flammable = 2}, + groups = {fish = 1, food_fish_raw = 1, flammable = 2}, }) -- cooked fish @@ -99,7 +99,7 @@ minetest.register_craftitem(":animalworld:cookedfish", { description = S("Cooked Fish"), inventory_image = "animalworld_cookedfish.png", on_use = minetest.item_eat(5), - groups = {food_meat = 1, flammable = 2}, + groups = {food_fish = 1, flammable = 2}, }) minetest.register_craft({ diff --git a/mods/animalworld/cockatoo.lua b/mods/animalworld/cockatoo.lua index 61619799..6ff64d5c 100644 --- a/mods/animalworld/cockatoo.lua +++ b/mods/animalworld/cockatoo.lua @@ -32,11 +32,19 @@ stepheight = 3, jump_height = 6, stepheight = 3, stay_near = {{"naturalbiomes:outback_leaves", "naturalbiomes:outback_trunk", "naturalbiomes:outback_bush_leaves", "livingdesert:cactus", "livingdesert:cactus3", "livingdesert:cactus2", "livingdesert:cactus4"}, 5}, - drops = { - {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1}, + drops = function() + if minetest.get_modpath("animalia") then + return { + { name = "animalia:poultry_raw", chance = 1, min = 1, max = 1 }, + { name = "animalia:feather", chance = 1, min = 1, max = 1 }, + } + else + return { + {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1}, {name = "animalworld:chicken_feather", chance = 1, min = 1, max = 1}, - - }, + } + end + end, water_damage = 1, lava_damage = 4, light_damage = 0, diff --git a/mods/animalworld/cockroach.lua b/mods/animalworld/cockroach.lua index 06e93faf..660e3ad5 100644 --- a/mods/animalworld/cockroach.lua +++ b/mods/animalworld/cockroach.lua @@ -101,5 +101,12 @@ minetest.register_craft({ {"animalworld:cockroach", "default:torch"} }) +minetest.register_craft({ + type = "cooking", + output = "animalworld:roastroach", + recipe = "animalworld:cockroach", + cooktime = 5, +}) + diff --git a/mods/animalworld/dragonfly.lua b/mods/animalworld/dragonfly.lua index c558bbf2..7174e6a6 100644 --- a/mods/animalworld/dragonfly.lua +++ b/mods/animalworld/dragonfly.lua @@ -33,7 +33,7 @@ stepheight = 3, fly = true, stay_near = {{"naturalbiomes:alderswamp_reed3", "mcl_core:reeds", "naturalbiomes:alderswamp_reed2", "naturalbiomes:alderswamp_reed", "naturalbiomes:alderswamp_yellowflower", "naturalbiomes:waterlily", "marinara:reed_root"}, 4}, drops = { - + {name = "animalworld:fishfood", chance = 1, min = 0, max = 2}, }, water_damage = 4, lava_damage = 4, diff --git a/mods/animalworld/elephant.lua b/mods/animalworld/elephant.lua index 025fe33a..83985308 100644 --- a/mods/animalworld/elephant.lua +++ b/mods/animalworld/elephant.lua @@ -9,9 +9,9 @@ stepheight = 2, attack_animals = true, reach = 3, damage = 16, - hp_min = 75, - hp_max = 120, - armor = 100, + hp_min = 2147483647, + hp_max = 2147483647, + armor = 2147483647, collisionbox = {-1.0, -0.01, -1.0, 1.0, 2, 1.0}, visual = "mesh", mesh = "Elephant.b3d", diff --git a/mods/animalworld/goose.lua b/mods/animalworld/goose.lua index 49134ceb..891a6de2 100644 --- a/mods/animalworld/goose.lua +++ b/mods/animalworld/goose.lua @@ -34,11 +34,20 @@ stepheight = 6, jump_height = 6, stepheight = 1, stay_near = {{"naturalbiomes:alderswamp_reed3", "naturalbiomes:alderswamp_reed2", "naturalbiomes:alderswamp_reed", "naturalbiomes:alderswamp_yellowflower", "naturalbiomes:waterlily"}, 5}, - drops = { - {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1}, + drops = function() + if minetest.get_modpath("animalia") then + return { + { name = "animalia:poultry_raw", chance = 1, min = 1, max = 1 }, + { name = "animalia:feather", chance = 1, min = 1, max = 1 }, + } + else + return { + {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1}, {name = "animalworld:chicken_feather", chance = 1, min = 1, max = 1}, - - }, + } + end + end, + water_damage = 0, lava_damage = 4, light_damage = 0, diff --git a/mods/animalworld/hunger.lua b/mods/animalworld/hunger.lua index aa87952a..6967d0f0 100644 --- a/mods/animalworld/hunger.lua +++ b/mods/animalworld/hunger.lua @@ -62,7 +62,7 @@ hunger_ng.add_hunger_data('animalworld:termitequeen', { satiates = 1.0, }) hunger_ng.add_hunger_data('animalworld:escargots', { - satiates = 5.0, + satiates = 8.0, }) hunger_ng.add_hunger_data('animalworld:locust_roasted', { satiates = 1.0, diff --git a/mods/animalworld/indianrhino.lua b/mods/animalworld/indianrhino.lua index 43363ff6..c6e6848f 100644 --- a/mods/animalworld/indianrhino.lua +++ b/mods/animalworld/indianrhino.lua @@ -3,46 +3,56 @@ local S = minetest.get_translator("animalworld") mobs:register_mob("animalworld:indianrhino", { type = "animal", passive = false, - attack_type = "dogfight", + attack_type = "dogfight", attack_animals = false, attack_monsters = true, group_attack = true, reach = 3, - damage = 14, + damage = 14, hp_min = 90, hp_max = 140, armor = 100, - collisionbox = {-0.8, -0.01, -0.8, 0.8, 1.5, 0.8}, + collisionbox = { -0.8, -0.01, -0.8, 0.8, 1.5, 0.8 }, visual = "mesh", mesh = "Indianrhino.b3d", - visual_size = {x = 1.0, y = 1.0}, + visual_size = { x = 1.0, y = 1.0 }, textures = { - {"textureindianrhino.png"}, + { "textureindianrhino.png" }, }, sounds = { random = "animalworld_rhino", attack = "animalworld_rhino2", - distance = 13, + distance = 13, }, makes_footstep_sound = true, walk_velocity = 1.5, run_velocity = 3, - walk_chance = 20, + walk_chance = 20, runaway = false, - knock_back = false, + knock_back = false, jump = true, - jump_height = 6, + jump_height = 6, stepheight = 2, - stay_near = {{"naturalbiomes:savanna_flowergrass", "naturalbiomes:savanna_grass", "naturalbiomes:savanna_grass2", "naturalbiomes:savanna_grass3", "naturalbiomes:savannagrass"}, 6}, + stay_near = { + { + "naturalbiomes:savanna_flowergrass", + "naturalbiomes:savanna_grass", + "naturalbiomes:savanna_grass2", + "naturalbiomes:savanna_grass3", + "naturalbiomes:savannagrass", + }, + 6, + }, drops = { - {name = "mobs:meat_raw", chance = 1, min = 1, max = 1}, - {name = "mobs:leather", chance = 1, min = 0, max = 2}, + { name = "mobs:meat_raw", chance = 1, min = 1, max = 1 }, + { name = "mobs:leather", chance = 1, min = 0, max = 2 }, + { name = "animalworld:elephantcorpse", chance = 7, min = 1, max = 1 }, }, water_damage = 0, lava_damage = 4, light_damage = 0, fear_height = 3, - pathfinding = true, + pathfinding = true, animation = { speed_normal = 70, stand_start = 0, @@ -60,38 +70,108 @@ mobs:register_mob("animalworld:indianrhino", { die_rotate = true, }, - follow = {"default:apple", "mcl_flowers:tallgrass", "mcl_core:deadbush", "mcl_bamboo:bamboo", "default:dry_dirt_with_dry_grass", "farming:seed_wheat", "default:junglegrass", "farming:seed_oat", "naturalbiomes:savannagrass", "naturalbiomes:savannagrassmall", "naturalbiomes:savanna_flowergrass", "default:dry_grass_1", "default:dry_grass_2", "default:dry_grass_3", "default:grass_1", "default:grass_2", "default:grass_3", "default:grass_4", "default:grass_5", "default:marram_grass_1", "default:marram_grass_2", "default:marram_grass_3", "default:coldsteppe_grass_1", "default:coldsteppe_grass_2", "default:coldsteppe_grass_3", "default:coldsteppe_grass_4", "default:coldsteppe_grass_5", "default:coldsteppe_grass_6", "naturalbiomes:savanna_grass1", "naturalbiomes:savanna_grass2", "naturalbiomes:savanna_grass3", "naturalbiomes:outback_grass1", "naturalbiomes:outback_grass2", "naturalbiomes:outback_grass3", "naturalbiomes:outback_grass4", "naturalbiomes:outback_grass5", "naturalbiomes:outback_grass6", "naturalbiomes:med_grass1", "naturalbiomes:med_grass2", "naturalbiomes:heath_grass1", "naturalbiomes:heath_grass2", "naturalbiomes:heath_grass3", "naturalbiomes:alpine_grass1", "naturalbiomes:alpine_grass2", "naturalbiomes:heath_grass2", "naturalbiomes:heath_grass3", "naturalbiomes:", "naturalbiomes:", "naturalbiomes:bushland_grass", "naturalbiomes:bushland_grass2", "naturalbiomes:bushland_grass3", "naturalbiomes:bushland_grass4", "naturalbiomes:bushland_grass5", "naturalbiomes:bushland_grass6", "naturalbiomes:bushland_grass7", "group:grass", "group:normal_grass"}, + follow = { + "default:apple", + "mcl_flowers:tallgrass", + "mcl_core:deadbush", + "mcl_bamboo:bamboo", + "default:dry_dirt_with_dry_grass", + "farming:seed_wheat", + "default:junglegrass", + "farming:seed_oat", + "naturalbiomes:savannagrass", + "naturalbiomes:savannagrassmall", + "naturalbiomes:savanna_flowergrass", + "default:dry_grass_1", + "default:dry_grass_2", + "default:dry_grass_3", + "default:grass_1", + "default:grass_2", + "default:grass_3", + "default:grass_4", + "default:grass_5", + "default:marram_grass_1", + "default:marram_grass_2", + "default:marram_grass_3", + "default:coldsteppe_grass_1", + "default:coldsteppe_grass_2", + "default:coldsteppe_grass_3", + "default:coldsteppe_grass_4", + "default:coldsteppe_grass_5", + "default:coldsteppe_grass_6", + "naturalbiomes:savanna_grass1", + "naturalbiomes:savanna_grass2", + "naturalbiomes:savanna_grass3", + "naturalbiomes:outback_grass1", + "naturalbiomes:outback_grass2", + "naturalbiomes:outback_grass3", + "naturalbiomes:outback_grass4", + "naturalbiomes:outback_grass5", + "naturalbiomes:outback_grass6", + "naturalbiomes:med_grass1", + "naturalbiomes:med_grass2", + "naturalbiomes:heath_grass1", + "naturalbiomes:heath_grass2", + "naturalbiomes:heath_grass3", + "naturalbiomes:alpine_grass1", + "naturalbiomes:alpine_grass2", + "naturalbiomes:heath_grass2", + "naturalbiomes:heath_grass3", + "naturalbiomes:", + "naturalbiomes:", + "naturalbiomes:bushland_grass", + "naturalbiomes:bushland_grass2", + "naturalbiomes:bushland_grass3", + "naturalbiomes:bushland_grass4", + "naturalbiomes:bushland_grass5", + "naturalbiomes:bushland_grass6", + "naturalbiomes:bushland_grass7", + "group:grass", + "group:normal_grass", + }, view_range = 10, replace_rate = 10, - replace_what = {"farming:soil", "farming:soil_wet"}, + replace_what = { "farming:soil", "farming:soil_wet" }, replace_with = "default:dirt", on_rightclick = function(self, clicker) - -- feed or tame - if mobs:feed_tame(self, clicker, 4, false, true) then return end - if mobs:protect(self, clicker) then return end - if mobs:capture_mob(self, clicker, 0, 0, 25, false, nil) then return end + if mobs:feed_tame(self, clicker, 4, false, true) then + return + end + if mobs:protect(self, clicker) then + return + end + if mobs:capture_mob(self, clicker, 0, 0, 25, false, nil) then + return + end end, }) - if minetest.get_modpath("ethereal") then - spawn_on = {"mcl_core:podzol", "default:dirt_withforest_litter", "ethereal:green_dirt", "ethereal:grass_grove"} + spawn_on = { "mcl_core:podzol", "default:dirt_withforest_litter", "ethereal:green_dirt", "ethereal:grass_grove" } end if not mobs.custom_spawn_animalworld then -mobs:spawn({ - name = "animalworld:indianrhino", - nodes = {"naturalbiomes:savannalitter", "mcl_core:dirt_with_grass"}, - neighbors = {"naturalbiomes:savanna_grass1", "naturalbiomes:savanna_grass2", "naturalbiomes:savanna_grass3", "mcl_core:acaciatree", "mcl_trees:tree_acacia", "mcl_trees:leaves_acacia", "mcl_core:acacialeaves"}, - min_light = 0, - interval = 60, - chance = 2000, -- 15000 - active_object_count = 2, - min_height = 5, - max_height = 50, - day_toggle = true, -}) + mobs:spawn({ + name = "animalworld:indianrhino", + nodes = { "naturalbiomes:savannalitter", "mcl_core:dirt_with_grass" }, + neighbors = { + "naturalbiomes:savanna_grass1", + "naturalbiomes:savanna_grass2", + "naturalbiomes:savanna_grass3", + "mcl_core:acaciatree", + "mcl_trees:tree_acacia", + "mcl_trees:leaves_acacia", + "mcl_core:acacialeaves", + }, + min_light = 0, + interval = 60, + chance = 2000, -- 15000 + active_object_count = 2, + min_height = 5, + max_height = 50, + day_toggle = true, + }) end -mobs:register_egg("animalworld:indianrhino", S("Indian Rhino"), "aindianrhino.png") \ No newline at end of file +mobs:register_egg("animalworld:indianrhino", S("Indian Rhino"), "aindianrhino.png") diff --git a/mods/animalworld/locust.lua b/mods/animalworld/locust.lua index be8d60dd..f9247017 100644 --- a/mods/animalworld/locust.lua +++ b/mods/animalworld/locust.lua @@ -95,7 +95,7 @@ minetest.register_craftitem(":animalworld:locust_roasted", { description = S("Roasted Locust"), inventory_image = "animalworld_locust_roasted.png", on_use = minetest.item_eat(8), - groups = {food_meat = 1, flammable = 2}, + groups = {food_meat = 1, flammable = 2, food = 1}, }) minetest.register_craft({ diff --git a/mods/animalworld/mosquito.lua b/mods/animalworld/mosquito.lua index b8b5de1e..6bea9e30 100644 --- a/mods/animalworld/mosquito.lua +++ b/mods/animalworld/mosquito.lua @@ -35,7 +35,7 @@ mobs:register_mob("animalworld:mosquito", { jump = true, jump_height = 6, stepheight = 3, - drops = { + drops = {name = "animalworld:fishfood", chance = 1, min = 1, max = 1 }, water_damage = 1, lava_damage = 4, diff --git a/mods/animalworld/nandu.lua b/mods/animalworld/nandu.lua index 22016d35..7b854556 100644 --- a/mods/animalworld/nandu.lua +++ b/mods/animalworld/nandu.lua @@ -1,9 +1,8 @@ local S = minetest.get_translator("animalworld") local random = math.random - mobs:register_mob("animalworld:nandu", { -stepheight = 1, + stepheight = 1, type = "animal", passive = false, attack_type = "dogfight", @@ -15,27 +14,89 @@ stepheight = 1, hp_min = 20, hp_max = 50, armor = 100, - collisionbox = {-0.4, -0.01, -0.3, 0.4, 0.8, 0.4}, + collisionbox = { -0.4, -0.01, -0.3, 0.4, 0.8, 0.4 }, visual = "mesh", mesh = "Nandu.b3d", textures = { - {"texturenandu.png"}, -- white - {"texturenandu.png"}, - {"texturenandu.png"}, + { "texturenandu.png" }, -- white + { "texturenandu.png" }, + { "texturenandu.png" }, }, child_texture = { - {"texturenandubaby.png"}, + { "texturenandubaby.png" }, }, makes_footstep_sound = true, walk_velocity = 0.7, run_velocity = 3, - stay_near = {{"people:feeder", "mcl_flowers:tallgrass", "mcl_flowers:tulip_red", "mcl_flowers:sunflower", "mcl_flowers:poppy", "flowers:tulip_black", "flowers:chrysanthemum_green", "flowers:geranium", "flowers:dandelion_white", "default:grass_1", "marinara:reed_bundle", "naturalbiomes:reed_bundle", "farming:straw", "naturalbiomes:bushland_grass", "naturalbiomes:bushland_grass2", "naturalbiomes:bushland_grass3", "naturalbiomes:bushland_grass4"}, 5}, - runaway = true, - runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "animalworld:wolf", "animalworld:panda", "animalworld:stingray", "marinaramobs:jellyfish", "marinaramobs:octopus", "livingcavesmobs:biter", "livingcavesmobs:flesheatingbacteria"}, - drops = { - {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1}, - {name = "animalworld:chicken_feather", chance = 1, min = 0, max = 2}, + stay_near = { + { + "people:feeder", + "mcl_flowers:tallgrass", + "mcl_flowers:tulip_red", + "mcl_flowers:sunflower", + "mcl_flowers:poppy", + "flowers:tulip_black", + "flowers:chrysanthemum_green", + "flowers:geranium", + "flowers:dandelion_white", + "default:grass_1", + "marinara:reed_bundle", + "naturalbiomes:reed_bundle", + "farming:straw", + "naturalbiomes:bushland_grass", + "naturalbiomes:bushland_grass2", + "naturalbiomes:bushland_grass3", + "naturalbiomes:bushland_grass4", + }, + 5, }, + runaway = true, + runaway_from = { + "animalworld:bear", + "animalworld:crocodile", + "animalworld:tiger", + "animalworld:spider", + "animalworld:spidermale", + "animalworld:shark", + "animalworld:hyena", + "animalworld:kobra", + "animalworld:monitor", + "animalworld:snowleopard", + "animalworld:volverine", + "livingfloatlands:deinotherium", + "livingfloatlands:carnotaurus", + "livingfloatlands:lycaenops", + "livingfloatlands:smilodon", + "livingfloatlands:tyrannosaurus", + "livingfloatlands:velociraptor", + "animalworld:divingbeetle", + "animalworld:scorpion", + "animalworld:polarbear", + "animalworld:leopardseal", + "animalworld:stellerseagle", + "animalworld:wolf", + "animalworld:panda", + "animalworld:stingray", + "marinaramobs:jellyfish", + "marinaramobs:octopus", + "livingcavesmobs:biter", + "livingcavesmobs:flesheatingbacteria", + }, + + drops = function() + if minetest.get_modpath("animalia") then + return { + { name = "animalia:poultry_raw", chance = 1, min = 1, max = 1 }, + { name = "animalia:feather", chance = 1, min = 0, max = 2 }, + } + else + return { + { name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1 }, + { name = "animalworld:chicken_feather", chance = 1, min = 0, max = 2 }, + } + end + end, + water_damage = 1, lava_damage = 5, light_damage = 0, @@ -61,27 +122,51 @@ stepheight = 1, die_rotate = true, }, follow = { - "farming:seed_wheat", "mcl_farming:wheat_seeds", "farming:seed_cotton", "farming:seed_barley", "farming:seed_oat", "farming:seed_rye", "farming:corn_cob", "farming:seed_hemp", "farming:seed_barley", "farming:seed_oat", "farming:seed_cotton", "farming:seed_sunflower", "farming:seed_wheat", "farming:seed_rye", "naturalbiomes:hazelnut", "naturalbiomes:hazelnut_cracked", "farming:sunflower_seeds_toasted", "livingfloatlands:roasted_pine_nuts", "livingfloatlands:giantforest_oaknut_cracked", "livingfloatlands:coldsteppe_pine3_pinecone", "livingfloatlands:coldsteppe_pine_pinecone", "livingfloatlands:coldsteppe_pine2_pinecone" + "farming:seed_wheat", + "mcl_farming:wheat_seeds", + "farming:seed_cotton", + "farming:seed_barley", + "farming:seed_oat", + "farming:seed_rye", + "farming:corn_cob", + "farming:seed_hemp", + "farming:seed_barley", + "farming:seed_oat", + "farming:seed_cotton", + "farming:seed_sunflower", + "farming:seed_wheat", + "farming:seed_rye", + "naturalbiomes:hazelnut", + "naturalbiomes:hazelnut_cracked", + "farming:sunflower_seeds_toasted", + "livingfloatlands:roasted_pine_nuts", + "livingfloatlands:giantforest_oaknut_cracked", + "livingfloatlands:coldsteppe_pine3_pinecone", + "livingfloatlands:coldsteppe_pine_pinecone", + "livingfloatlands:coldsteppe_pine2_pinecone", }, view_range = 10, on_rightclick = function(self, clicker) - - if mobs:feed_tame(self, clicker, 8, true, true) then return end - if mobs:protect(self, clicker) then return end - if mobs:capture_mob(self, clicker, 5, 25, 0, false, nil) then return end + if mobs:feed_tame(self, clicker, 8, true, true) then + return + end + if mobs:protect(self, clicker) then + return + end + if mobs:capture_mob(self, clicker, 5, 25, 0, false, nil) then + return + end end, do_custom = function(self, dtime) - self.egg_timer = (self.egg_timer or 0) + dtime if self.egg_timer < 10 then return end self.egg_timer = 0 - if self.child - or math.random(1, 100) > 1 then + if self.child or math.random(1, 100) > 1 then return end @@ -97,91 +182,95 @@ stepheight = 1, end, }) - -local spawn_on = {"mcl_core:dirt_with_grass", "default:dirt_with_grass"} +local spawn_on = { "mcl_core:dirt_with_grass", "default:dirt_with_grass" } if minetest.get_modpath("ethereal") then - spawn_on = {"ethereal:bamboo_dirt", "ethereal:prairie_dirt", "default:dirt_with_grass", "naturalbiomes:bushland_bushlandlitter"} + spawn_on = { + "ethereal:bamboo_dirt", + "ethereal:prairie_dirt", + "default:dirt_with_grass", + "naturalbiomes:bushland_bushlandlitter", + } end - if not mobs.custom_spawn_animalworld then -mobs:spawn({ - name = "animalworld:nandu", - nodes = {"mcl_core:dirt_with_grass", "default:dirt_with_grass"}, - neighbors = {"group:grass", "group:normal_grass", "mcl_flowers:tallgrass", "mcl_flowers:tulip_red", "mcl_flowers:sunflower", "mcl_flowers:poppy"}, - min_light = 14, - interval = 60, - chance = 2000, -- 15000 - active_object_count = 3, - min_height = 10, - max_height = 40, - day_toggle = true, - + mobs:spawn({ + name = "animalworld:nandu", + nodes = { "mcl_core:dirt_with_grass", "default:dirt_with_grass" }, + neighbors = { + "group:grass", + "group:normal_grass", + "mcl_flowers:tallgrass", + "mcl_flowers:tulip_red", + "mcl_flowers:sunflower", + "mcl_flowers:poppy", + }, + min_light = 14, + interval = 60, + chance = 2000, -- 15000 + active_object_count = 3, + min_height = 10, + max_height = 40, + day_toggle = true, on_spawn = function(self, pos) - local nods = minetest.find_nodes_in_area_under_air( - {x = pos.x - 4, y = pos.y - 3, z = pos.z - 4}, - {x = pos.x + 4, y = pos.y + 3, z = pos.z + 4}, - {"default:dirt_with_grass"}) + { x = pos.x - 4, y = pos.y - 3, z = pos.z - 4 }, + { x = pos.x + 4, y = pos.y + 3, z = pos.z + 4 }, + { "default:dirt_with_grass" } + ) if nods and #nods > 0 then - -- min herd of 3 local iter = math.min(#nods, 3) --- print("--- nandu at", minetest.pos_to_string(pos), iter) + -- print("--- nandu at", minetest.pos_to_string(pos), iter) for n = 1, iter do - local pos2 = nods[random(#nods)] local kid = random(4) == 1 and true or nil pos2.y = pos2.y + 2 if minetest.get_node(pos2).name == "air" then - mobs:add_mob(pos2, { - name = "animalworld:nandu", child = kid}) + name = "animalworld:nandu", + child = kid, + }) end end end - end + end, }) end - -mobs:register_egg("animalworld:nandu", ("Nandu"), "anandu.png", 0) - +mobs:register_egg("animalworld:nandu", "Nandu", "anandu.png", 0) mobs:alias_mob("animalworld:andu", "animalworld:nandu") -- compatibility - -- egg entity mobs:register_arrow("animalworld:egg_entity", { visual = "sprite", - visual_size = {x=.5, y=.5}, - textures = {"mobs_chicken_egg.png"}, + visual_size = { x = 0.5, y = 0.5 }, + textures = { "mobs_chicken_egg.png" }, velocity = 6, hit_player = function(self, player) player:punch(minetest.get_player_by_name(self.playername) or self.object, 1.0, { full_punch_interval = 1.0, - damage_groups = {fleshy = 1}, + damage_groups = { fleshy = 1 }, }, nil) end, hit_mob = function(self, player) player:punch(minetest.get_player_by_name(self.playername) or self.object, 1.0, { full_punch_interval = 1.0, - damage_groups = {fleshy = 1}, + damage_groups = { fleshy = 1 }, }, nil) end, hit_node = function(self, pos, node) - if math.random(1, 10) > 1 then return end @@ -190,9 +279,11 @@ mobs:register_arrow("animalworld:egg_entity", { local nod = minetest.get_node_or_nil(pos) - if not nod - or not minetest.registered_nodes[nod.name] - or minetest.registered_nodes[nod.name].walkable == true then + if + not nod + or not minetest.registered_nodes[nod.name] + or minetest.registered_nodes[nod.name].walkable == true + then return end @@ -203,7 +294,7 @@ mobs:register_arrow("animalworld:egg_entity", { textures = ent2.child_texture[1], visual_size = { x = ent2.base_size.x / 2, - y = ent2.base_size.y / 2 + y = ent2.base_size.y / 2, }, collisionbox = { ent2.base_colbox[1] / 2, @@ -211,25 +302,23 @@ mobs:register_arrow("animalworld:egg_entity", { ent2.base_colbox[3] / 2, ent2.base_colbox[4] / 2, ent2.base_colbox[5] / 2, - ent2.base_colbox[6] / 2 + ent2.base_colbox[6] / 2, }, }) ent2.child = true ent2.tamed = true ent2.owner = self.playername - end + end, }) - -- egg throwing item local egg_GRAVITY = 9 local egg_VELOCITY = 19 -- shoot egg -local mobs_shoot_egg = function (item, player, pointed_thing) - +local mobs_shoot_egg = function(item, player, pointed_thing) local playerpos = player:get_pos() minetest.sound_play("default_place_node_hard", { @@ -240,8 +329,8 @@ local mobs_shoot_egg = function (item, player, pointed_thing) local obj = minetest.add_entity({ x = playerpos.x, - y = playerpos.y +1.5, - z = playerpos.z + y = playerpos.y + 1.5, + z = playerpos.z, }, "animalworld:egg_entity") local ent = obj:get_luaentity() @@ -253,13 +342,13 @@ local mobs_shoot_egg = function (item, player, pointed_thing) obj:setvelocity({ x = dir.x * egg_VELOCITY, y = dir.y * egg_VELOCITY, - z = dir.z * egg_VELOCITY + z = dir.z * egg_VELOCITY, }) obj:setacceleration({ x = dir.x * -3, y = -egg_GRAVITY, - z = dir.z * -3 + z = dir.z * -3, }) -- pass player name to egg for chick ownership @@ -271,12 +360,11 @@ local mobs_shoot_egg = function (item, player, pointed_thing) return item end - -- egg minetest.register_node(":animalworld:egg", { description = S("Bird Egg"), - tiles = {"mobs_chicken_egg.png"}, - inventory_image = "mobs_chicken_egg.png", + tiles = { "mobs_chicken_egg.png" }, + inventory_image = "mobs_chicken_egg.png", visual_scale = 0.7, drawtype = "plantlike", wield_image = "mobs_chicken_egg.png", @@ -286,53 +374,52 @@ minetest.register_node(":animalworld:egg", { sunlight_propagates = true, selection_box = { type = "fixed", - fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2} + fixed = { -0.2, -0.5, -0.2, 0.2, 0, 0.2 }, }, - groups = {food_egg = 1, snappy = 2, swordy = 1, handy = 1, dig_immediate = 3}, + groups = { food_egg = 1, snappy = 2, swordy = 1, handy = 1, dig_immediate = 3 }, _mcl_hardness = 0.8, _mcl_blast_resistance = 1, after_place_node = function(pos, placer, itemstack) if placer:is_player() then - minetest.set_node(pos, {name = "animalworld:egg", param2 = 1}) + minetest.set_node(pos, { name = "animalworld:egg", param2 = 1 }) end end, - on_use = mobs_shoot_egg + on_use = mobs_shoot_egg, }) - -- fried egg minetest.register_craftitem(":animalworld:chicken_egg_fried", { description = S("Fried Egg"), inventory_image = "animalworld_chicken_egg_fried.png", on_use = minetest.item_eat(2), - groups = {food_egg_fried = 1, flammable = 2}, + groups = { food_egg_fried = 1, flammable = 2 }, }) minetest.register_craft({ - type = "cooking", - recipe = "animalworld:egg", + type = "cooking", + recipe = "animalworld:egg", output = "animalworld:chicken_egg_fried", }) -- raw chicken minetest.register_craftitem(":animalworld:chicken_raw", { -description = S("Raw Birdmeat"), + description = S("Raw Birdmeat"), inventory_image = "animalworld_chicken_raw.png", on_use = minetest.item_eat(2), - groups = {food_meat_raw = 1, food_chicken_raw = 1, flammable = 2}, + groups = { food_meat_raw = 1, food_chicken_raw = 1, flammable = 2 }, }) -- cooked chicken minetest.register_craftitem(":animalworld:chicken_cooked", { -description = S("Cooked Birdmeat"), + description = S("Cooked Birdmeat"), inventory_image = "animalworld_chicken_cooked.png", on_use = minetest.item_eat(6), - groups = {food_meat = 1, food_chicken = 1, flammable = 2}, + groups = { food_meat = 1, food_chicken = 1, flammable = 2 }, }) minetest.register_craft({ - type = "cooking", - recipe = "animalworld:chicken_raw", + type = "cooking", + recipe = "animalworld:chicken_raw", output = "animalworld:chicken_cooked", }) @@ -340,7 +427,7 @@ minetest.register_craft({ minetest.register_craftitem(":animalworld:chicken_feather", { description = S("Feather"), inventory_image = "animalworld_chicken_feather.png", - groups = {flammable = 2}, + groups = { flammable = 2 }, }) minetest.register_craft({ diff --git a/mods/animalworld/olm.lua b/mods/animalworld/olm.lua index ed4be0d1..c15eff10 100644 --- a/mods/animalworld/olm.lua +++ b/mods/animalworld/olm.lua @@ -30,7 +30,7 @@ stepheight = 0.0, runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player", "animalworld:wolf", "animalworld:panda", "animalworld:stingray", "marinaramobs:jellyfish", "marinaramobs:octopus", "livingcavesmobs:biter", "livingcavesmobs:flesheatingbacteria"}, jump = false, stepheight = 0.0, - drops = { + drops = {name = "mobs:meat_raw", chance = 2, min = 1, max = 1 }, water_damage = 0, air_damage = 1, diff --git a/mods/animalworld/owl.lua b/mods/animalworld/owl.lua index 1e7d9650..fc30c84e 100644 --- a/mods/animalworld/owl.lua +++ b/mods/animalworld/owl.lua @@ -1,23 +1,23 @@ local S = minetest.get_translator("animalworld") mobs:register_mob("animalworld:owl", { -stepheight = 3, + stepheight = 3, type = "monster", passive = false, - attack_type = "dogfight", + attack_type = "dogfight", attack_animals = true, owner_loyal = true, reach = 2, - damage = 3, + damage = 3, hp_min = 5, hp_max = 35, armor = 100, - collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.5, 0.3}, + collisionbox = { -0.3, -0.01, -0.3, 0.3, 0.5, 0.3 }, visual = "mesh", mesh = "Owl.b3d", - visual_size = {x = 1.0, y = 1.0}, + visual_size = { x = 1.0, y = 1.0 }, textures = { - {"textureowl.png"}, + { "textureowl.png" }, }, sounds = { random = "animalworld_owl", @@ -27,15 +27,24 @@ stepheight = 3, run_velocity = 5, fall_speed = 0, jump = true, - jump_height = 6, + jump_height = 6, stepheight = 3, fly = true, - drops = { - {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1}, - {name = "animalworld:chicken_feather", chance = 1, min = 1, max = 1}, - {name = "animalworld:owlcorpse", chance = 7, min = 1, max = 1}, - - }, + drops = function() + if minetest.get_modpath("animalia") then + return { + { name = "animalia:poultry_raw", chance = 1, min = 1, max = 1 }, + { name = "animalia:feather", chance = 1, min = 1, max = 1 }, + { name = "animalworld:owlcorpse", chance = 7, min = 1, max = 1 }, + } + else + return { + { name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1 }, + { name = "animalworld:chicken_feather", chance = 1, min = 1, max = 1 }, + { name = "animalworld:owlcorpse", chance = 7, min = 1, max = 1 }, + } + end + end, water_damage = 1, lava_damage = 4, light_damage = 0, @@ -57,38 +66,54 @@ stepheight = 3, die_rotate = true, }, -fly_in = {"air"}, + fly_in = { "air" }, floats = 0, follow = { - "animalworld:rabbit_raw", "mcl_mobitems:chicken", "mobs:meat_raw", "animalworld:chicken_raw", "water_life:meat_raw" + "animalworld:rabbit_raw", + "mcl_mobitems:chicken", + "mobs:meat_raw", + "animalworld:chicken_raw", + "water_life:meat_raw", }, - -view_range = 10, + + view_range = 10, on_rightclick = function(self, clicker) - -- feed or tame - if mobs:feed_tame(self, clicker, 4, false, true) then return end - if mobs:protect(self, clicker) then return end - if mobs:capture_mob(self, clicker, 0, 25, 0, false, nil) then return end + if mobs:feed_tame(self, clicker, 4, false, true) then + return + end + if mobs:protect(self, clicker) then + return + end + if mobs:capture_mob(self, clicker, 0, 25, 0, false, nil) then + return + end end, }) if minetest.get_modpath("ethereal") then - spawn_on = {"mcl_core:dirt_with_grass", "default:dirt_with_coniferous_litter"}, {"default:pine_needles"}, {"ethereal:mushroom_dirt"} + spawn_on = + { "mcl_core:dirt_with_grass", "default:dirt_with_coniferous_litter" }, + { "default:pine_needles" }, + { "ethereal:mushroom_dirt" } end if not mobs.custom_spawn_animalworld then -mobs:spawn({ - name = "animalworld:owl", - nodes = {"default:pine_needles"}, {"naturalbiomes:pine_leaves"}, {"naturalbiomes:alppine1_leaves"}, {"naturalbiomes:birch_leaves"}, {"mcl_core:podzol"}, - min_light = 0, - interval = 60, - chance = 2000, -- 15000 - min_height = 10, - max_height = 60, - day_toggle = false, -}) + mobs:spawn({ + name = "animalworld:owl", + nodes = { "default:pine_needles" }, + { "naturalbiomes:pine_leaves" }, + { "naturalbiomes:alppine1_leaves" }, + { "naturalbiomes:birch_leaves" }, + { "mcl_core:podzol" }, + min_light = 0, + interval = 60, + chance = 2000, -- 15000 + min_height = 10, + max_height = 60, + day_toggle = false, + }) end mobs:register_egg("animalworld:owl", S("Owl"), "aowl.png") diff --git a/mods/animalworld/parrot.lua b/mods/animalworld/parrot.lua index 2bdf54c6..2766aa7b 100644 --- a/mods/animalworld/parrot.lua +++ b/mods/animalworld/parrot.lua @@ -36,11 +36,19 @@ stepheight = 3, fall_damage = 0, stepheight = 3, stay_near = {{"naturalbiomes:bamboo_leaves", "naturalbiomes:bambooforest_groundgrass"}, 5}, - drops = { - {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1}, + drops = function() + if minetest.get_modpath("animalia") then + return { + { name = "animalia:poultry_raw", chance = 1, min = 1, max = 1 }, + { name = "animalia:feather", chance = 1, min = 1, max = 1 }, + } + else + return { + {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1}, {name = "animalworld:chicken_feather", chance = 1, min = 1, max = 1}, - - }, + } + end + end, water_damage = 1, lava_damage = 4, light_damage = 0, diff --git a/mods/animalworld/parrotflying.lua b/mods/animalworld/parrotflying.lua index f060d9d7..808577bd 100644 --- a/mods/animalworld/parrotflying.lua +++ b/mods/animalworld/parrotflying.lua @@ -34,11 +34,19 @@ stepheight = 3, jump_height = 6, fly = true, stepheight = 3, - drops = { - {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1}, + drops = function() + if minetest.get_modpath("animalia") then + return { + { name = "animalia:poultry_raw", chance = 1, min = 1, max = 1 }, + { name = "animalia:feather", chance = 1, min = 1, max = 1 }, + } + else + return { + {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1}, {name = "animalworld:chicken_feather", chance = 1, min = 1, max = 1}, - - }, + } + end + end, water_damage = 1, lava_damage = 4, light_damage = 0, diff --git a/mods/animalworld/puffin.lua b/mods/animalworld/puffin.lua index 4b357f41..d1e94044 100644 --- a/mods/animalworld/puffin.lua +++ b/mods/animalworld/puffin.lua @@ -30,11 +30,19 @@ stepheight = 3, jump_height = 6, fly = true, stepheight = 3, - drops = { - {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1}, + drops = function() + if minetest.get_modpath("animalia") then + return { + { name = "animalia:poultry_raw", chance = 1, min = 1, max = 1 }, + { name = "animalia:feather", chance = 1, min = 1, max = 1 }, + } + else + return { + {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1}, {name = "animalworld:chicken_feather", chance = 1, min = 1, max = 1}, - - }, + } + end + end, water_damage = 0, lava_damage = 4, light_damage = 0, diff --git a/mods/animalworld/rat.lua b/mods/animalworld/rat.lua index b60a19ce..4b580f8d 100644 --- a/mods/animalworld/rat.lua +++ b/mods/animalworld/rat.lua @@ -33,6 +33,18 @@ mobs:register_mob("animalworld:rat", { {name = "mobs:meat_raw", chance = 1, min = 1, max = 3}, }, + drops = function() + if minetest.get_modpath("animalia") then + return { + { name = "animalia:rat_raw", chance = 1, min = 1, max = 3 }, + } + else + return { + {name = "mobs:meat_raw", chance = 1, min = 1, max = 3}, + } + end + end, + water_damage = 0, lava_damage = 5, light_damage = 0, diff --git a/mods/animalworld/roadrunner.lua b/mods/animalworld/roadrunner.lua index 7cf113bc..80ee538d 100644 --- a/mods/animalworld/roadrunner.lua +++ b/mods/animalworld/roadrunner.lua @@ -31,11 +31,19 @@ stepheight = 3, jump = true, jump_height = 3, stay_near = {{"livingdesert:date_palm_leaves", "mcl_core:deadbush", "mcl_core:cactus", "livingdesert:yucca", "default:dry_shrub", "livingdesert:figcactus_trunk", "livingdesert:coldsteppe_grass1", "livingdesert:cactus", "livingdesert:cactus3", "livingdesert:cactus2", "livingdesert:cactus4"}, 5}, - drops = { - {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1}, + drops = function() + if minetest.get_modpath("animalia") then + return { + { name = "animalia:poultry_raw", chance = 1, min = 1, max = 1 }, + { name = "animalia:feather", chance = 1, min = 1, max = 1 }, + } + else + return { + {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1}, {name = "animalworld:chicken_feather", chance = 1, min = 1, max = 1}, - - }, + } + end + end, water_damage = 1, lava_damage = 4, light_damage = 0, diff --git a/mods/animalworld/robin.lua b/mods/animalworld/robin.lua index 694c1c21..e1f88271 100644 --- a/mods/animalworld/robin.lua +++ b/mods/animalworld/robin.lua @@ -31,11 +31,19 @@ stepheight = 5, runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player", "animalworld:wolf", "animalworld:panda", "animalworld:stingray", "marinaramobs:jellyfish", "marinaramobs:octopus", "livingcavesmobs:biter", "livingcavesmobs:flesheatingbacteria"}, jump = true, jump_height = 4, - drops = { - {name = "animalworld:chicken_raw", chance = 1, min = 0, max = 1}, + drops = function() + if minetest.get_modpath("animalia") then + return { + { name = "animalia:poultry_raw", chance = 1, min = 0, max = 1 }, + { name = "animalia:feather", chance = 1, min = 0, max = 1 }, + } + else + return { + {name = "animalworld:chicken_raw", chance = 1, min = 0, max = 1}, {name = "animalworld:chicken_feather", chance = 1, min = 0, max = 1}, - - }, + } + end + end, water_damage = 1, lava_damage = 4, light_damage = 0, diff --git a/mods/animalworld/snail.lua b/mods/animalworld/snail.lua index 0c9fa557..d5ba180f 100644 --- a/mods/animalworld/snail.lua +++ b/mods/animalworld/snail.lua @@ -13,27 +13,61 @@ mobs:register_mob("animalworld:snail", { hp_min = 10, hp_max = 20, armor = 100, - collisionbox = {-0.2, -0.01, -0.2, 0.2, 0.3, 0.2}, + collisionbox = { -0.2, -0.01, -0.2, 0.2, 0.3, 0.2 }, visual = "mesh", mesh = "Snail.b3d", textures = { - {"texturesnail.png"}, + { "texturesnail.png" }, }, makes_footstep_sound = true, - sounds = { - }, + sounds = {}, walk_velocity = 0.2, run_velocity = 0.4, runaway = false, - stay_near = {{"farming:cabbage6", "farming:carrot8", "farming:raspberry_4", "farming:cucumber_4", "farming:lettuce_5", "farming:beetroot_5", "flowers:dandelion_yellow", "mcl_flowers:tallgrass", "mcl_flowers:tulip_red", "mcl_flowers:sunflower", "mcl_flowers:poppy"}, 6}, + stay_near = { + { + "farming:cabbage6", + "farming:carrot8", + "farming:raspberry_4", + "farming:cucumber_4", + "farming:lettuce_5", + "farming:beetroot_5", + "flowers:dandelion_yellow", + "mcl_flowers:tallgrass", + "mcl_flowers:tulip_red", + "mcl_flowers:sunflower", + "mcl_flowers:poppy", + }, + 6, + }, jump = false, jump_height = 3, pushable = true, - follow = {"default:apple", "default:dry_dirt_with_dry_grass", "farming:seed_wheat", "default:junglegrass", "farming:seed_oat", "default:kelp", "seaweed", "xocean:kelp", - "default:grass", "farming:cucumber", "farming:cabbage", "mcl_farming:beetroot_item", "mcl_farming:carrot_item", "mcl_farming:melon_item", "mcl_farming:potato_item", "mcl_farming:pumpkin_item", "mcl_farming:sweet_berry", "xocean:seagrass", "farming:lettuce", "default:junglegrass"}, + follow = { + "default:apple", + "default:dry_dirt_with_dry_grass", + "farming:seed_wheat", + "default:junglegrass", + "farming:seed_oat", + "default:kelp", + "seaweed", + "xocean:kelp", + "default:grass", + "farming:cucumber", + "farming:cabbage", + "mcl_farming:beetroot_item", + "mcl_farming:carrot_item", + "mcl_farming:melon_item", + "mcl_farming:potato_item", + "mcl_farming:pumpkin_item", + "mcl_farming:sweet_berry", + "xocean:seagrass", + "farming:lettuce", + "default:junglegrass", + }, view_range = 5, drops = { - {name = "animalworld:snail", chance = 3, min = 1, max = 1}, + { name = "animalworld:snail", chance = 3, min = 1, max = 1 }, }, water_damage = 1, lava_damage = 5, @@ -52,45 +86,65 @@ mobs:register_mob("animalworld:snail", { die_rotate = true, }, on_rightclick = function(self, clicker) - - if mobs:feed_tame(self, clicker, 8, true, true) then return end - if mobs:protect(self, clicker) then return end - if mobs:capture_mob(self, clicker, 25, 0, 0, false, nil) then return end + if mobs:feed_tame(self, clicker, 8, true, true) then + return + end + if mobs:protect(self, clicker) then + return + end + if mobs:capture_mob(self, clicker, 25, 0, 0, false, nil) then + return + end end, }) - if not mobs.custom_spawn_animalworld then -mobs:spawn({ - name = "animalworld:snail", - nodes = {"mcl_core:dirt_with_grass", "default:dirt_with_grass", "mcl_core:dirt_with_grass"}, - neighbors = {"mcl_flowers:tallgrass", "mcl_flowers:tulip_red", "mcl_flowers:sunflower", "mcl_flowers:poppy", "farming:cucumber", "farming:cabbage_6", "farming:lettuce_5", "farming:beetroot_5", "flowers:dandelion_yellow", "farming:strawberry_7", "farming:parsley_3"}, - min_light = 0, - interval = 30, - chance = 800, -- 15000 - active_object_count = 3, - min_height = 6, - max_height = 40, -}) + mobs:spawn({ + name = "animalworld:snail", + nodes = { "mcl_core:dirt_with_grass", "default:dirt_with_grass", "mcl_core:dirt_with_grass" }, + neighbors = { + "mcl_flowers:tallgrass", + "mcl_flowers:tulip_red", + "mcl_flowers:sunflower", + "mcl_flowers:poppy", + "farming:cucumber", + "farming:cabbage_6", + "farming:lettuce_5", + "farming:beetroot_5", + "flowers:dandelion_yellow", + "farming:strawberry_7", + "farming:parsley_3", + }, + min_light = 0, + interval = 30, + chance = 800, -- 15000 + active_object_count = 3, + min_height = 6, + max_height = 40, + }) end mobs:register_egg("animalworld:snail", S("Snail"), "asnail.png") - mobs:alias_mob("animalworld:snail", "animalworld:snail") -- compatibility minetest.register_craftitem(":animalworld:escargots", { description = S("Escargots"), inventory_image = "animalworld_escargots.png", - on_use = minetest.item_eat(2), - groups = {food_meat_raw = 1, flammable = 2}, + on_use = minetest.item_eat(8), + groups = { flammable = 2, eatable = 8, food = 1 }, }) - minetest.register_craft({ output = "animalworld:escargots", type = "shapeless", - recipe = - {"animalworld:snail", "farming:garlic_clove", "animalworld:butter", "farming:bread"} + recipe = { "animalworld:snail", "farming:garlic_clove", "animalworld:butter", "farming:bread" }, }) +if minetest.get_modpath("x_farming") then + minetest.register_craft({ + output = "animalworld:escargots", + type = "shapeless", + recipe = { "x_farming:chorus_snail", "farming:garlic_clove", "animalworld:butter", "farming:bread" }, + }) +end diff --git a/mods/animalworld/squid.lua b/mods/animalworld/squid.lua index e3458f6d..0060e521 100644 --- a/mods/animalworld/squid.lua +++ b/mods/animalworld/squid.lua @@ -93,7 +93,7 @@ minetest.register_craftitem(":animalworld:rawmollusk", { description = S("Raw Mollusk"), inventory_image = "animalworld_rawmollusk.png", on_use = minetest.item_eat(3), - groups = {food_meat_raw = 1, flammable = 2}, + groups = {food_fish_raw = 1, flammable = 2, food = 1,} }) -- cooked fish @@ -101,7 +101,7 @@ minetest.register_craftitem(":animalworld:cookedmollusk", { description = S("Fried Mollusk"), inventory_image = "animalworld_cookedmollusk.png", on_use = minetest.item_eat(5), - groups = {food_meat = 1, flammable = 2}, + groups = {food_fish = 1, flammable = 2, food = 1}, }) minetest.register_craft({ diff --git a/mods/animalworld/stellerseagle.lua b/mods/animalworld/stellerseagle.lua index 24580fb0..e3cb9f01 100644 --- a/mods/animalworld/stellerseagle.lua +++ b/mods/animalworld/stellerseagle.lua @@ -31,11 +31,19 @@ stepheight = 3, jump_height = 6, stepheight = 3, fly = true, - drops = { - {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1}, + drops = function() + if minetest.get_modpath("animalia") then + return { + { name = "animalia:poultry_raw", chance = 1, min = 1, max = 1 }, + { name = "animalia:feather", chance = 1, min = 1, max = 1 }, + } + else + return { + {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1}, {name = "animalworld:chicken_feather", chance = 1, min = 1, max = 1}, - - }, + } + end + end, water_damage = 1, lava_damage = 4, light_damage = 0, diff --git a/mods/animalworld/termite.lua b/mods/animalworld/termite.lua index 8d36d00d..b36178fc 100644 --- a/mods/animalworld/termite.lua +++ b/mods/animalworld/termite.lua @@ -149,6 +149,12 @@ minetest.register_craft({ recipe = "animalworld:termiteconcrete", }) +minetest.register_craft({ + type = "cooking", + output = "animalworld:termitequeen", + recipe = "animalworld:termite", +}) + minetest.register_node("animalworld:termiteconcreteblue", { description = S("Termite Concrete Blue"), tiles = {"termiteconcreteblue.png"}, diff --git a/mods/animalworld/textures/aantcooked.png b/mods/animalworld/textures/aantcooked.png new file mode 100644 index 00000000..89e655e1 Binary files /dev/null and b/mods/animalworld/textures/aantcooked.png differ diff --git a/mods/animalworld/toucan.lua b/mods/animalworld/toucan.lua index 8fa271ec..f5b75f81 100644 --- a/mods/animalworld/toucan.lua +++ b/mods/animalworld/toucan.lua @@ -32,11 +32,19 @@ stepheight = 6, jump_height = 4, stepheight = 6, stay_near = {{"default:acacia_tree", "mcl_core:jungletree", "mcl_core:jungleleaves", "mcl_trees:leaves_jungle", "mcl_trees:leaves_mangrove", "default:acacia_leaves", "default:jungleleaves", "default:jungletree", "livingjungle:samauma_trunk", "livingjungle:samauma_leaves"}, 5}, - drops = { - {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1}, + drops = function() + if minetest.get_modpath("animalia") then + return { + { name = "animalia:poultry_raw", chance = 1, min = 1, max = 1 }, + { name = "animalia:feather", chance = 1, min = 1, max = 1 }, + } + else + return { + {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1}, {name = "animalworld:chicken_feather", chance = 1, min = 1, max = 1}, - - }, + } + end + end, water_damage = 1, lava_damage = 4, light_damage = 0, diff --git a/mods/animalworld/trophies.lua b/mods/animalworld/trophies.lua index cfe736e8..2332204d 100644 --- a/mods/animalworld/trophies.lua +++ b/mods/animalworld/trophies.lua @@ -1109,6 +1109,31 @@ minetest.register_node("animalworld:crocodileskinhanging", { sounds = animalworld.sounds.node_sound_wood_defaults() }) +minetest.register_craft({ + output = "animalworld:crocodileskin", + type = "shapeless", + recipe = + {"animalworld:crocodilecorpse", "default:sword_stone"} + +}) + +minetest.register_craft({ + output = "animalworld:crocodileskinhanging", + type = "shapeless", + recipe = + {"animalworld:crocodileskin"} + +}) + +minetest.register_craft({ + output = "animalworld:crocodileskin", + type = "shapeless", + recipe = + {"animalworld:crocodileskinhanging"} + +}) + + minetest.register_craft({ type = "fuel", recipe = "animalworld:crocodileskinhanging", diff --git a/mods/animalworld/vulture.lua b/mods/animalworld/vulture.lua index 103bd9d9..3aeef72a 100644 --- a/mods/animalworld/vulture.lua +++ b/mods/animalworld/vulture.lua @@ -1,22 +1,22 @@ local S = minetest.get_translator("animalworld") mobs:register_mob("animalworld:vulture", { -stepheight = 3, + stepheight = 3, type = "animal", passive = true, - attack_type = "dogfight", + attack_type = "dogfight", attack_animals = false, reach = 2, - damage = 1, + damage = 1, hp_min = 5, hp_max = 45, armor = 100, - collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.5, 0.3}, + collisionbox = { -0.3, -0.01, -0.3, 0.3, 0.5, 0.3 }, visual = "mesh", mesh = "Vulture.b3d", - visual_size = {x = 1.0, y = 1.0}, + visual_size = { x = 1.0, y = 1.0 }, textures = { - {"texturevulture.png"}, + { "texturevulture.png" }, }, sounds = { random = "animalworld_vulture", @@ -25,18 +25,52 @@ stepheight = 3, walk_velocity = 5, run_velocity = 6, runaway = true, - runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player"}, + runaway_from = { + "animalworld:bear", + "animalworld:crocodile", + "animalworld:tiger", + "animalworld:spider", + "animalworld:spidermale", + "animalworld:shark", + "animalworld:hyena", + "animalworld:kobra", + "animalworld:monitor", + "animalworld:snowleopard", + "animalworld:volverine", + "livingfloatlands:deinotherium", + "livingfloatlands:carnotaurus", + "livingfloatlands:lycaenops", + "livingfloatlands:smilodon", + "livingfloatlands:tyrannosaurus", + "livingfloatlands:velociraptor", + "animalworld:divingbeetle", + "animalworld:scorpion", + "animalworld:polarbear", + "animalworld:leopardseal", + "animalworld:stellerseagle", + "player", + }, fall_speed = 0, jump = true, - jump_height = 6, + jump_height = 6, fly = true, stepheight = 3, - drops = { - {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1}, - {name = "animalworld:chicken_feather", chance = 1, min = 1, max = 1}, - {name = "animalworld:vulturecorpse", chance = 7, min = 1, max = 1}, - - }, + drops = function() + if minetest.get_modpath("animalia") then + return { + { name = "animalia:poultry_raw", chance = 1, min = 1, max = 1 }, + { name = "animalia:feather", chance = 1, min = 1, max = 1 }, + { name = "animalworld:vulturecorpse", chance = 7, min = 1, max = 1 }, + } + else + return { + { name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1 }, + { name = "animalworld:chicken_feather", chance = 1, min = 1, max = 1 }, + { name = "animalworld:vulturecorpse", chance = 7, min = 1, max = 1 }, + } + end + end, + water_damage = 1, lava_damage = 4, light_damage = 0, @@ -53,37 +87,85 @@ stepheight = 3, die_loop = false, die_rotate = true, }, -fly_in = {"air"}, + fly_in = { "air" }, floats = 0, follow = { - "ethereal:fish_raw", "animalworld:rawfish", "mcl_mobitems:chicken", "mcl_fishing:pufferfish_raw", "mcl_mobitems:rotten_flesh", "mcl_mobitems:mutton", "mcl_mobitems:beef", "mcl_mobitems:porkchop", "mcl_mobitems:rabbit", "mobs_fish:tropical", - "mobs:meat_raw", "animalworld:rabbit_raw", "animalworld:pork_raw", "water_life:meat_raw" + "ethereal:fish_raw", + "animalworld:rawfish", + "mcl_mobitems:chicken", + "mcl_fishing:pufferfish_raw", + "mcl_mobitems:rotten_flesh", + "mcl_mobitems:mutton", + "mcl_mobitems:beef", + "mcl_mobitems:porkchop", + "mcl_mobitems:rabbit", + "mobs_fish:tropical", + "mobs:meat_raw", + "animalworld:rabbit_raw", + "animalworld:pork_raw", + "water_life:meat_raw", }, - -view_range = 10, + + view_range = 10, on_rightclick = function(self, clicker) - -- feed or tame - if mobs:feed_tame(self, clicker, 4, false, true) then return end - if mobs:protect(self, clicker) then return end - if mobs:capture_mob(self, clicker, 0, 25, 0, false, nil) then return end + if mobs:feed_tame(self, clicker, 4, false, true) then + return + end + if mobs:protect(self, clicker) then + return + end + if mobs:capture_mob(self, clicker, 0, 25, 0, false, nil) then + return + end end, }) if not mobs.custom_spawn_animalworld then -mobs:spawn({ - name = "animalworld:vulture", - nodes = {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_grass", "default:dirt_with_grass"}, {"default:dry_dirt_with_dry_grass"}, {"default:desert_sand"}, {"default:stone"}, {"livingdesert:coldsteppe_ground4"}, {"livingdesert:coldsteppe_ground3"}, {"default:stone"}, {"livingdesert:coldsteppe_ground4"}, {"livingdesert:coldsteppe_ground3"}, - neighbors = {"group:grass", "mcl_flowers:tallgrass", "mcl_flowers:tulip_red", "mcl_flowers:sunflower", "mcl_flowers:poppy", "mcl_core:birchtree", "mcl_trees:tree_birch", "mcl_trees:tree_oak", "mcl_trees:tree_dark_oak", "mcl_core:tree", "mcl_trees:leaves_oak", "mcl_trees:leaves_dark_oak", "mcl_core:leaves", "mcl_core:birchleaves", "mcl_core:darkleaves", "mcl_core:spruceleaves", "group:normal_grass", "livingdesert:coldsteppe_grass1", "livingdesert:coldsteppe_grass2", "livingdesert:coldsteppe_grass3", "livingdesert:coldsteppe_grass4", "default:dry_shrub"}, - min_light = 0, - interval = 60, - chance = 2000, -- 15000 - active_object_count = 3, - min_height = 50, - max_height = 300, - day_toggle = true, -}) + mobs:spawn({ + name = "animalworld:vulture", + nodes = { "mcl_core:dirt_with_grass", "mcl_core:dirt_with_grass", "default:dirt_with_grass" }, + { "default:dry_dirt_with_dry_grass" }, + { "default:desert_sand" }, + { "default:stone" }, + { "livingdesert:coldsteppe_ground4" }, + { "livingdesert:coldsteppe_ground3" }, + { "default:stone" }, + { "livingdesert:coldsteppe_ground4" }, + { "livingdesert:coldsteppe_ground3" }, + neighbors = { + "group:grass", + "mcl_flowers:tallgrass", + "mcl_flowers:tulip_red", + "mcl_flowers:sunflower", + "mcl_flowers:poppy", + "mcl_core:birchtree", + "mcl_trees:tree_birch", + "mcl_trees:tree_oak", + "mcl_trees:tree_dark_oak", + "mcl_core:tree", + "mcl_trees:leaves_oak", + "mcl_trees:leaves_dark_oak", + "mcl_core:leaves", + "mcl_core:birchleaves", + "mcl_core:darkleaves", + "mcl_core:spruceleaves", + "group:normal_grass", + "livingdesert:coldsteppe_grass1", + "livingdesert:coldsteppe_grass2", + "livingdesert:coldsteppe_grass3", + "livingdesert:coldsteppe_grass4", + "default:dry_shrub", + }, + min_light = 0, + interval = 60, + chance = 2000, -- 15000 + active_object_count = 3, + min_height = 50, + max_height = 300, + day_toggle = true, + }) end mobs:register_egg("animalworld:vulture", S("Vulture"), "avulture.png") diff --git a/mods/animalworld/wildboar.lua b/mods/animalworld/wildboar.lua index a3d58cc8..c5063390 100644 --- a/mods/animalworld/wildboar.lua +++ b/mods/animalworld/wildboar.lua @@ -14,16 +14,16 @@ mobs:register_mob("animalworld:wildboar", { hp_min = 35, hp_max = 85, armor = 100, - collisionbox = {-0.5, -0.01, -0.5, 0.5, 0.95, 0.5}, + collisionbox = { -0.5, -0.01, -0.5, 0.5, 0.95, 0.5 }, visual = "mesh", mesh = "Wildboar.b3d", textures = { - {"texturewildboar.png"}, - {"texturewildboar2.png"}, - {"texturewildboar3.png"}, + { "texturewildboar.png" }, + { "texturewildboar2.png" }, + { "texturewildboar3.png" }, }, child_texture = { - {"texturewildboarbaby.png"}, + { "texturewildboarbaby.png" }, }, makes_footstep_sound = true, sounds = { @@ -35,16 +35,65 @@ mobs:register_mob("animalworld:wildboar", { jump = true, jump_height = 4, pushable = true, - stay_near = {{"people:feeder", "mcl_flowers:double:fern", "mcl_flowers:fern", "mcl_flowers:tallgrass", "mcl_farming:sweet_berry_bush_3", "mcl_core:sprucetree", "mcl_trees:tree_spruce", "mcl_trees:leaves_spruce", "default:fern_1", "default:fern_2", "marinara:reed_bundle", "naturalbiomes:reed_bundle", "farming:straw", "naturalbiomes:med_flower2", "naturalbiomes:med_grass1", "naturalbiomes:med_grass2", "naturalbiomes:med_flower3"}, 6}, - follow = {"default:apple", "mcl_farming:beetroot_item", "mcl_farming:mushroom_red", "mcl_farming:mushroom_brown", "mcl_farming:carrot_item", "mcl_farming:melon_item", "mcl_farming:potato_item", "mcl_farming:pumpkin_item", "mcl_farming:wheat_item", "mcl_farming:sweet_berry", "farming:potato", "ethereal:banana_bread", "farming:melon_slice", "farming:carrot", "farming:seed_rice", "farming:corn", "naturalbiomes:hazelnut", "livingfloatlands:giantforest_oaknut"}, + stay_near = { + { + "people:feeder", + "mcl_flowers:double:fern", + "mcl_flowers:fern", + "mcl_flowers:tallgrass", + "mcl_farming:sweet_berry_bush_3", + "mcl_core:sprucetree", + "mcl_trees:tree_spruce", + "mcl_trees:leaves_spruce", + "default:fern_1", + "default:fern_2", + "marinara:reed_bundle", + "naturalbiomes:reed_bundle", + "farming:straw", + "naturalbiomes:med_flower2", + "naturalbiomes:med_grass1", + "naturalbiomes:med_grass2", + "naturalbiomes:med_flower3", + }, + 6, + }, + follow = { + "default:apple", + "mcl_farming:beetroot_item", + "mcl_farming:mushroom_red", + "mcl_farming:mushroom_brown", + "mcl_farming:carrot_item", + "mcl_farming:melon_item", + "mcl_farming:potato_item", + "mcl_farming:pumpkin_item", + "mcl_farming:wheat_item", + "mcl_farming:sweet_berry", + "farming:potato", + "ethereal:banana_bread", + "farming:melon_slice", + "farming:carrot", + "farming:seed_rice", + "farming:corn", + "naturalbiomes:hazelnut", + "livingfloatlands:giantforest_oaknut", + }, view_range = 10, replace_rate = 10, - replace_what = {"farming:soil", "farming:soil_wet"}, + replace_what = { "farming:soil", "farming:soil_wet" }, replace_with = "default:dirt", - drops = { - {name = "animalworld:pork_raw", chance = 1, min = 1, max = 3}, - {name = "mobs:leather", chance = 1, min = 0, max = 2}, - }, + drops = function() + if minetest.get_modpath("animalia") then + return { + { name = "animalia:porkcop_raw", chance = 1, min = 1, max = 3 }, + { name = "mobs:leather", chance = 1, min = 0, max = 2 }, + } + else + return { + { name = "animalworld:pork_raw", chance = 1, min = 1, max = 3 }, + { name = "mobs:leather", chance = 1, min = 0, max = 2 }, + } + end + end, water_damage = 0, lava_damage = 5, light_damage = 0, @@ -59,7 +108,7 @@ mobs:register_mob("animalworld:wildboar", { stand1_end = 200, walk_start = 200, walk_end = 300, - jump_start = 300, + jump_start = 300, jump_end = 400, punch_start = 400, punch_end = 500, @@ -70,71 +119,100 @@ mobs:register_mob("animalworld:wildboar", { die_rotate = true, }, on_rightclick = function(self, clicker) - - if mobs:feed_tame(self, clicker, 8, true, true) then return end - if mobs:protect(self, clicker) then return end - if mobs:capture_mob(self, clicker, 0, 15, 25, false, nil) then return end + if mobs:feed_tame(self, clicker, 8, true, true) then + return + end + if mobs:protect(self, clicker) then + return + end + if mobs:capture_mob(self, clicker, 0, 15, 25, false, nil) then + return + end end, }) -local spawn_on = {"mcl_core:dirt_with_grass", "default:dirt_with_coniferous_litter"} +local spawn_on = { "mcl_core:dirt_with_grass", "default:dirt_with_coniferous_litter" } if minetest.get_mapgen_setting("mg_name") ~= "v6" then - spawn_on = {"mcl_core:dirt_with_grass", "default:dirt_with_dry_grass", "default:dirt_with_coniferous_litter"} + spawn_on = { "mcl_core:dirt_with_grass", "default:dirt_with_dry_grass", "default:dirt_with_coniferous_litter" } end if minetest.get_modpath("ethereal") then - spawn_on = {"ethereal:mushroom_dirt", "ethereal:bamboo_dirt", "ethereal:green_dirt", "ethereal:mushroom_dirt", "default:dirt_with_coniferous_litter", "default:dirt_gray"} + spawn_on = { + "ethereal:mushroom_dirt", + "ethereal:bamboo_dirt", + "ethereal:green_dirt", + "ethereal:mushroom_dirt", + "default:dirt_with_coniferous_litter", + "default:dirt_gray", + } end if not mobs.custom_spawn_animalworld then -mobs:spawn({ - name = "animalworld:wildboar", - nodes = {"mcl_core:podzol", "default:dirt_with_conifrous_litter", "default:dirt_gray", "naturalbiomes:mediterran_litter", "mcl_core:dirt_with_grass", "mcl_core:podzol"}, - neighbors = {"default:fern_1", "mcl_flowers:double:fern", "mcl_flowers:fern", "mcl_flowers:tallgrass", "mcl_farming:sweet_berry_bush_3", "mcl_core:sprucetree", "mcl_trees:tree_spruce", "mcl_trees:leaves_spruce", "default:fern_2", "naturalbiomes:med_flower2", "naturalbiomes:med_grass1", "naturalbiomes:med_grass2", "naturalbiomes:med_flower3"}, - min_light = 0, - interval = 60, - chance = 2000, -- 15000 - active_object_count = 3, - min_height = 1, - max_height = 80, - day_toggle = true, + mobs:spawn({ + name = "animalworld:wildboar", + nodes = { + "mcl_core:podzol", + "default:dirt_with_conifrous_litter", + "default:dirt_gray", + "naturalbiomes:mediterran_litter", + "mcl_core:dirt_with_grass", + "mcl_core:podzol", + }, + neighbors = { + "default:fern_1", + "mcl_flowers:double:fern", + "mcl_flowers:fern", + "mcl_flowers:tallgrass", + "mcl_farming:sweet_berry_bush_3", + "mcl_core:sprucetree", + "mcl_trees:tree_spruce", + "mcl_trees:leaves_spruce", + "default:fern_2", + "naturalbiomes:med_flower2", + "naturalbiomes:med_grass1", + "naturalbiomes:med_grass2", + "naturalbiomes:med_flower3", + }, + min_light = 0, + interval = 60, + chance = 2000, -- 15000 + active_object_count = 3, + min_height = 1, + max_height = 80, + day_toggle = true, on_spawn = function(self, pos) - local nods = minetest.find_nodes_in_area_under_air( - {x = pos.x - 4, y = pos.y - 3, z = pos.z - 4}, - {x = pos.x + 4, y = pos.y + 3, z = pos.z + 4}, - {"default:dirt_with_coniferous_litter", "default:dirt_gray", "naturalbiomes:mediterran_litter"}) + { x = pos.x - 4, y = pos.y - 3, z = pos.z - 4 }, + { x = pos.x + 4, y = pos.y + 3, z = pos.z + 4 }, + { "default:dirt_with_coniferous_litter", "default:dirt_gray", "naturalbiomes:mediterran_litter" } + ) if nods and #nods > 0 then - -- min herd of 3 local iter = math.min(#nods, 3) --- print("--- wildboar at", minetest.pos_to_string(pos), iter) + -- print("--- wildboar at", minetest.pos_to_string(pos), iter) for n = 1, iter do - local pos2 = nods[random(#nods)] local kid = random(4) == 1 and true or nil pos2.y = pos2.y + 2 if minetest.get_node(pos2).name == "air" then - mobs:add_mob(pos2, { - name = "animalworld:wildboar", child = kid}) + name = "animalworld:wildboar", + child = kid, + }) end end end - end + end, }) end mobs:register_egg("animalworld:wildboar", S("Wild Boar"), "awildboar.png") - mobs:alias_mob("animalworld:wildboar", "animalworld:wildboar") -- compatibility - - diff --git a/mods/animalworld/wolf.lua b/mods/animalworld/wolf.lua index e5830d34..aca03b8b 100644 --- a/mods/animalworld/wolf.lua +++ b/mods/animalworld/wolf.lua @@ -65,7 +65,10 @@ stepheight = 2, follow = { "ethereal:fish_raw", "animalworld:rawfish", "mobs_fish:tropical", - "mobs:meat_raw", "mcl_mobitems:chicken", "mcl_fishing:pufferfish_raw", "mcl_mobitems:rotten_flesh", "mcl_mobitems:mutton", "mcl_mobitems:beef", "mcl_mobitems:porkchop", "mcl_mobitems:rabbit", "animalworld:rabbit_raw", "animalworld:pork_raw", "water_life:meat_raw", "xocean:fish_edible", "animalworld:chicken_raw", "mobs:meatblock_raw", "animalworld:chicken_raw", "livingfloatlands:ornithischiaraw", "livingfloatlands:largemammalraw", "livingfloatlands:theropodraw", "livingfloatlands:sauropodraw", "animalworld:raw_athropod", "animalworld:whalemeat_raw", "animalworld:rabbit_raw", "nativevillages:chicken_raw", "mobs:meat_raw", "animalworld:pork_raw", "people:mutton:raw" + "mobs:meat_raw", "mcl_mobitems:chicken", "mcl_fishing:pufferfish_raw", "mcl_mobitems:rotten_flesh", "mcl_mobitems:mutton", "mcl_mobitems:beef", "mcl_mobitems:porkchop", "mcl_mobitems:rabbit", "animalworld:rabbit_raw", "animalworld:pork_raw", "water_life:meat_raw", "xocean:fish_edible", "animalworld:chicken_raw", "mobs:meatblock_raw", "animalworld:chicken_raw", "livingfloatlands:ornithischiaraw", "livingfloatlands:largemammalraw", "livingfloatlands:theropodraw", "livingfloatlands:sauropodraw", "animalworld:raw_athropod", "animalworld:whalemeat_raw", "animalworld:rabbit_raw", "nativevillages:chicken_raw", "mobs:meat_raw", "animalworld:pork_raw", "people:mutton:raw","animalia:mutton_raw", + "animalia:beef_raw", + "animalia:porkchop_raw", + "animalia:poultry_raw" }, view_range = 10,