mirror of
https://codeberg.org/tenplus1/mobs_monster.git
synced 2025-07-04 17:30:21 +02:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
67
spider.lua
67
spider.lua
@ -74,12 +74,12 @@ mobs:register_mob("mobs_monster:spider", {
|
||||
{"mobs_spider_orange.png"},
|
||||
{"mobs_spider_snowy.png"},
|
||||
{"mobs_spider_grey.png"},
|
||||
{"mobs_spider_crystal.png"},
|
||||
{"mobs_spider_crystal.png"}
|
||||
},
|
||||
makes_footstep_sound = false,
|
||||
sounds = {
|
||||
random = "mobs_spider",
|
||||
attack = "mobs_spider",
|
||||
attack = "mobs_spider"
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
@ -103,7 +103,7 @@ mobs:register_mob("mobs_monster:spider", {
|
||||
run_start = 1,
|
||||
run_end = 21,
|
||||
punch_start = 25,
|
||||
punch_end = 45,
|
||||
punch_end = 45
|
||||
},
|
||||
|
||||
-- check surrounding nodes and spawn a specific spider
|
||||
@ -225,32 +225,33 @@ mobs:register_mob("mobs_monster:spider", {
|
||||
|
||||
|
||||
if not mobs.custom_spawn_monster then
|
||||
-- above ground spawn
|
||||
mobs:spawn({
|
||||
name = "mobs_monster:spider",
|
||||
nodes = {
|
||||
"default:dirt_with_rainforest_litter", "default:snowblock",
|
||||
"default:snow", "ethereal:crystal_dirt", "ethereal:cold_dirt"
|
||||
},
|
||||
min_light = 0,
|
||||
max_light = 8,
|
||||
chance = 7000,
|
||||
active_object_count = 1,
|
||||
min_height = 25,
|
||||
max_height = 31000,
|
||||
})
|
||||
|
||||
-- below ground spawn
|
||||
mobs:spawn({
|
||||
name = "mobs_monster:spider",
|
||||
nodes = {"default:stone_with_mese", "default:mese", "default:stone"},
|
||||
min_light = 0,
|
||||
max_light = 7,
|
||||
chance = 7000,
|
||||
active_object_count = 1,
|
||||
min_height = -31000,
|
||||
max_height = -40,
|
||||
})
|
||||
-- above ground spawn
|
||||
mobs:spawn({
|
||||
name = "mobs_monster:spider",
|
||||
nodes = {
|
||||
"default:dirt_with_rainforest_litter", "default:snowblock",
|
||||
"default:snow", "ethereal:crystal_dirt", "ethereal:cold_dirt"
|
||||
},
|
||||
min_light = 0,
|
||||
max_light = 8,
|
||||
chance = 7000,
|
||||
active_object_count = 1,
|
||||
min_height = 25,
|
||||
max_height = 31000
|
||||
})
|
||||
|
||||
-- below ground spawn
|
||||
mobs:spawn({
|
||||
name = "mobs_monster:spider",
|
||||
nodes = {"default:stone_with_mese", "default:mese", "default:stone"},
|
||||
min_light = 0,
|
||||
max_light = 7,
|
||||
chance = 7000,
|
||||
active_object_count = 1,
|
||||
min_height = -31000,
|
||||
max_height = -40
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
@ -279,7 +280,7 @@ minetest.register_node(":mobs:cobweb", {
|
||||
walkable = false,
|
||||
groups = {snappy = 1, disable_jump = 1},
|
||||
drop = "farming:string",
|
||||
sounds = default.node_sound_leaves_defaults()
|
||||
sounds = default and default.node_sound_leaves_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
@ -287,12 +288,14 @@ minetest.register_craft({
|
||||
recipe = {
|
||||
{"farming:string", "", "farming:string"},
|
||||
{"", "farming:string", ""},
|
||||
{"farming:string", "", "farming:string"},
|
||||
{"farming:string", "", "farming:string"}
|
||||
}
|
||||
})
|
||||
|
||||
local web_place = function(pos)
|
||||
|
||||
if minetest.find_node_near(pos, 1, {"ignore"}) then return end
|
||||
|
||||
local pos2 = minetest.find_node_near(pos, 1, {"air", "group:leaves"}, true)
|
||||
|
||||
if pos2 then
|
||||
@ -316,7 +319,7 @@ mobs:register_arrow("mobs_monster:cobweb", {
|
||||
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval = 2.0,
|
||||
damage_groups = {fleshy = 3},
|
||||
damage_groups = {fleshy = 3}
|
||||
}, nil)
|
||||
|
||||
web_place(self.object:get_pos())
|
||||
@ -330,7 +333,7 @@ mobs:register_arrow("mobs_monster:cobweb", {
|
||||
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval = 2.0,
|
||||
damage_groups = {fleshy = 3},
|
||||
damage_groups = {fleshy = 3}
|
||||
}, nil)
|
||||
end
|
||||
})
|
||||
|
Reference in New Issue
Block a user