1
0
Fork 0

Merge pull request '`mobs_mc` silverfish fixes' (#2935) from mc-mobs-silverfish-fixes into master

Reviewed-on: MineClone2/MineClone2#2935
Reviewed-by: kabou <kabou@noreply.git.minetest.land>
This commit is contained in:
AFCMS 2022-12-07 17:24:09 +00:00
commit 0f99373779
1 changed files with 5 additions and 87 deletions

View File

@ -53,88 +53,6 @@ mcl_mobs.register_mob("mobs_mc:silverfish", {
view_range = 16,
attack_type = "dogfight",
damage = 1,
reach = 1,
})
mcl_mobs.register_egg("mobs_mc:silverfish", S("Silverfish"), "#6d6d6d", "#313131", 0)
-- Monster egg blocks (Minetest Game)
if minetest.get_modpath("default") and mobs_mc.create_monster_egg_nodes then
local spawn_silverfish = function(pos, oldnode, oldmetadata, digger)
if not minetest.is_creative_enabled(digger:get_player_name()) then
minetest.add_entity(pos, "mobs_mc:silverfish")
end
end
minetest.register_node("mobs_mc:monster_egg_stone", {
description = "Stone Monster Egg",
tiles = {"default_stone.png"},
groups = {oddly_breakable_by_hand = 2, spawns_silverfish = 1},
drop = '',
is_ground_content = true,
sounds = default.node_sound_stone_defaults(),
after_dig_node = spawn_silverfish,
})
minetest.register_node("mobs_mc:monster_egg_cobble", {
description = "Cobblestone Monster Egg",
tiles = {"default_cobble.png"},
is_ground_content = false,
groups = {oddly_breakable_by_hand = 2, spawns_silverfish = 1},
drop = '',
sounds = default.node_sound_stone_defaults(),
after_dig_node = spawn_silverfish,
})
minetest.register_node("mobs_mc:monster_egg_mossycobble", {
description = "Mossy Cobblestone Monster Egg",
tiles = {"default_mossycobble.png"},
is_ground_content = false,
groups = {oddly_breakable_by_hand = 2, spawns_silverfish = 1},
drop = '',
sounds = default.node_sound_stone_defaults(),
after_dig_node = spawn_silverfish,
})
minetest.register_node("mobs_mc:monster_egg_stonebrick", {
description = "Stone Brick Monster Egg",
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_stone_brick.png"},
is_ground_content = false,
groups = {oddly_breakable_by_hand = 2, spawns_silverfish = 1},
drop = '',
sounds = default.node_sound_stone_defaults(),
after_dig_node = spawn_silverfish,
})
minetest.register_node("mobs_mc:monster_egg_stone_block", {
description = "Stone Block Monster Egg",
tiles = {"default_stone_block.png"},
is_ground_content = false,
groups = {oddly_breakable_by_hand = 2, spawns_silverfish = 1},
drop = '',
sounds = default.node_sound_stone_defaults(),
after_dig_node = spawn_silverfish,
})
-- Randomly spawn stone monster eggs in the world
local mg_name = minetest.get_mapgen_setting("mg_name")
local scarcity
if mg_name == "v6" then
scarcity = 28 * 28 * 28
else
scarcity = 22 * 22 * 22
end
minetest.register_ore({
ore_type = "scatter",
ore = "mobs_mc:monster_egg_stone",
wherein = "default:stone",
clust_scarcity = scarcity,
clust_num_ores = 3,
clust_size = 2,
y_min = -31000,
y_max = 31000,
biomes = { "grassland" },
})
end