1
0
mirror of https://codeberg.org/tenplus1/mobs_animal.git synced 2024-12-22 17:00:26 +01:00

fix default check

This commit is contained in:
tenplus1 2024-08-09 07:59:02 +01:00
parent a240d0c937
commit 10865e9ab4
2 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,9 @@
-- Translation support -- Translation support
local S = minetest.get_translator("mobs_animal") local S = minetest.get_translator("mobs_animal")
-- check for default mod
local mod_def = minetest.get_modpath("default")
-- Bee by KrupnoPavel (.b3d model by sirrobzeroone) -- Bee by KrupnoPavel (.b3d model by sirrobzeroone)
mobs:register_mob("mobs_animal:bee", { mobs:register_mob("mobs_animal:bee", {
@ -92,7 +95,7 @@ minetest.register_node(":mobs:beehive", {
walkable = true, walkable = true,
groups = {oddly_breakable_by_hand = 3, flammable = 1, disable_suffocation = 1}, groups = {oddly_breakable_by_hand = 3, flammable = 1, disable_suffocation = 1},
is_ground_content = false, is_ground_content = false,
sounds = default and default.node_sound_defaults(), sounds = mod_def and default.node_sound_defaults(),
on_construct = function(pos) on_construct = function(pos)
@ -166,7 +169,7 @@ minetest.register_node(":mobs:honey_block", {
tiles = {"mobs_honey_block.png"}, tiles = {"mobs_honey_block.png"},
groups = {snappy = 3, flammable = 2}, groups = {snappy = 3, flammable = 2},
is_ground_content = false, is_ground_content = false,
sounds = default and default.node_sound_dirt_defaults() sounds = mod_def and default.node_sound_dirt_defaults()
}) })
-- recipe -- recipe

View File

@ -1,6 +1,9 @@
-- Translation support -- Translation support
local S = minetest.get_translator("mobs_animal") local S = minetest.get_translator("mobs_animal")
-- check for default mod
local mod_def = minetest.get_modpath("default")
-- Cow by sirrobzeroone -- Cow by sirrobzeroone
mobs:register_mob("mobs_animal:cow", { mobs:register_mob("mobs_animal:cow", {
@ -261,7 +264,7 @@ minetest.register_node(":mobs:cheeseblock", {
tiles = {"mobs_cheeseblock.png"}, tiles = {"mobs_cheeseblock.png"},
is_ground_content = false, is_ground_content = false,
groups = {oddly_breakable_by_hand = 3}, groups = {oddly_breakable_by_hand = 3},
sounds = default and default.node_sound_dirt_defaults() sounds = mod_def and default.node_sound_dirt_defaults()
}) })
minetest.register_craft({ minetest.register_craft({