From 7d5e47524504de0f4ddb3a5b253609a020980174 Mon Sep 17 00:00:00 2001 From: 1F616EMO Date: Fri, 27 Dec 2024 09:16:12 +0800 Subject: [PATCH 1/2] Add Ethereal grass compactibility --- api/api.lua | 2 +- init.lua | 8 ++++++++ mobs/horse.lua | 5 +---- mobs/reindeer.lua | 11 +---------- mobs/sheep.lua | 5 +---- mod.conf | 2 +- 6 files changed, 13 insertions(+), 20 deletions(-) diff --git a/api/api.lua b/api/api.lua index daa4235..92668a4 100644 --- a/api/api.lua +++ b/api/api.lua @@ -777,7 +777,7 @@ local function assign_biome_group(name) local y_max = def.y_max for group, params in pairs(animalia.registered_biome_groups) do -- k, v in pairs if name:find(params.name_kw or "") - and turf and turf:find(params.turf_kw or "") + and turf and ((turf:find(params.turf_kw or "")) or (params.turf_in and params.turf_in[turf] or false)) and heat >= params.min_heat and heat <= params.max_heat and humidity >= params.min_humidity diff --git a/init.lua b/init.lua index 802f1de..579f54a 100644 --- a/init.lua +++ b/init.lua @@ -65,6 +65,14 @@ animalia.food_wheat = {} animalia.food_seeds = {} animalia.food_crops = {} animalia.food_bear = {} +animalia.consumable_grass = { + ["default:dirt_with_grass"] = "default:dirt", + ["ethereal:bamboo_dirt"] = "default:dirt", + ["ethereal:grove_dirt"] = "default:dirt", + ["ethereal:cold_dirt"] = "default:dirt", + ["ethereal:prairie_dirt"] = "default:dirt", + ["default:dry_dirt_with_dry_grass"] = "default:dry_dirt", +} minetest.register_on_mods_loaded(function() if minetest.get_modpath("farming") diff --git a/mobs/horse.lua b/mobs/horse.lua index 03bb45a..8ad44cd 100644 --- a/mobs/horse.lua +++ b/mobs/horse.lua @@ -227,10 +227,7 @@ creatura.register_mob("animalia:horse", { -- Animalia Props catch_with_net = true, catch_with_lasso = true, - consumable_nodes = { - ["default:dirt_with_grass"] = "default:dirt", - ["default:dry_dirt_with_dry_grass"] = "default:dry_dirt" - }, + consumable_nodes = animalia.consumable_grass, head_data = { bone = "Neck.CTRL", offset = {x = 0, y = 1.4, z = 0.0}, diff --git a/mobs/reindeer.lua b/mobs/reindeer.lua index 5790d06..7b397ca 100644 --- a/mobs/reindeer.lua +++ b/mobs/reindeer.lua @@ -59,16 +59,7 @@ creatura.register_mob("animalia:reindeer", { flee_puncher = true, catch_with_net = true, catch_with_lasso = true, - consumable_nodes = { - { - name = "default:dirt_with_grass", - replacement = "default:dirt" - }, - { - name = "default:dry_dirt_with_dry_grass", - replacement = "default:dry_dirt" - } - }, + consumable_nodes = animalia.consumable_grass, head_data = { offset = {x = 0, y = 0.55, z = 0}, pitch_correction = -45, diff --git a/mobs/sheep.lua b/mobs/sheep.lua index 859c3e7..99a2985 100644 --- a/mobs/sheep.lua +++ b/mobs/sheep.lua @@ -84,10 +84,7 @@ creatura.register_mob("animalia:sheep", { flee_puncher = true, catch_with_net = true, catch_with_lasso = true, - consumable_nodes = { - ["default:dirt_with_grass"] = "default:dirt", - ["default:dry_dirt_with_dry_grass"] = "default:dry_dirt" - }, + consumable_nodes = animalia.consumable_grass, head_data = { offset = {x = 0, y = 0.41, z = 0}, pitch_correction = -45, diff --git a/mod.conf b/mod.conf index 5224901..cd0d073 100644 --- a/mod.conf +++ b/mod.conf @@ -1,6 +1,6 @@ name = animalia depends = creatura -optional_depends = default, mcl_player, farming, 3d_armor +optional_depends = default, mcl_player, farming, 3d_armor, ethereal description = Adds unique and consistantly designed Animals title = Animalia author = ElCeejo From 92268365f65cc1b5c5c05477aba3e99aa99f04a3 Mon Sep 17 00:00:00 2001 From: 1F616EMO Date: Fri, 27 Dec 2024 09:19:57 +0800 Subject: [PATCH 2/2] Add more ethereal fish for cute cats --- mobs/cat.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mobs/cat.lua b/mobs/cat.lua index 644f8ab..e434505 100644 --- a/mobs/cat.lua +++ b/mobs/cat.lua @@ -2,15 +2,15 @@ -- Cat -- --------- -local follow = { - "animalia:poultry_raw" -} +local follow = {} -if minetest.registered_items["ethereal:fish_raw"] then - follow = { - "ethereal:fish_raw", - "animalia:poultry_raw" - } +for _, item in ipairs({ + "ethereal:fish_raw", + "ethereal:fish_cod", + "ethereal:fish_cichlid", + "animalia:poultry_raw", +}) do + table.insert(follow, item) end creatura.register_mob("animalia:cat", {