1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-24 17:50:37 +01:00

update mobs mod

This commit is contained in:
crabman77 2015-12-08 03:29:42 +01:00
parent 79bb21808d
commit 871f8b4c54
8 changed files with 365 additions and 142 deletions

View File

@ -28,6 +28,7 @@ This mod contains the following additions:
Changelog:
1.20- Error checking added to remove bad mobs, out of map limit mobs and stop serialize.h error
1.19- Chickens now drop egg items instead of placing the egg, also throwing eggs result in 1/8 chance of spawning chick
1.18- Added docile_by_day flag so that monsters will not attack automatically during daylight hours unless hit first
1.17- Added 'dogshoot' attack type, shoots when out of reach, melee attack when in reach, also api tweaks and self.reach added
@ -57,4 +58,4 @@ beta- Npc mob added, kills monsters, attacks player when punched, right click wi
0.4 - Dungeon Masters and Mese Monsters have much better aim due to shoot_offset, also they can both shoot through nodes that aren't walkable (flowers, grass etc) plus new sheep sound :)
0.3 - Added LOTT's Spider mob, made Cobwebs, added KPavel's Bee with Honey and Beehives (made texture), Warthogs now have sound and can be tamed, taming of shaved sheep or milked cow with 8 wheat so it will not despawn, many bug fixes :)
0.2 - Cooking bucket of milk into cheese now returns empty bucket
0.1 - Initial Release
0.1 - Initial Release

File diff suppressed because it is too large Load Diff

View File

@ -49,7 +49,7 @@ mobs:register_mob("mobs:bee", {
end,
})
-- spawn on group:flowers between 4 and 20 light, 1 in 5000 chance, 1 bee in area up to 31000 in height
mobs:spawn_specific("mobs:bee", {"group:flower"}, {"air"}, 4, 20, 30, 5000, 1, -31000, 31000, true)
mobs:spawn_specific("mobs:bee", {"group:flower"}, {"air"}, 4, 20, 30, 5000, 2, -31000, 31000, true)
-- register spawn egg
mobs:register_egg("mobs:bee", "Bee", "mobs_bee_inv.png", 1)

View File

@ -44,9 +44,9 @@ mobs:register_mob("mobs:bunny", {
},
-- follows carrot from farming redo
follow = {"farming:carrot", "farming_plus:carrot_item"},
view_range = 10,
view_range = 8,
-- eat carrots
replace_rate = 80,
replace_rate = 10,
replace_what = {"farming:carrot_7", "farming:carrot_8", "farming_plus:carrot"},
replace_with = "air",
-- right click to pick up rabbit
@ -73,5 +73,5 @@ mobs:register_mob("mobs:bunny", {
attack_type = "dogfight",
damage = 5,
})
mobs:spawn_specific("mobs:bunny", {"default:dirt_with_grass"}, {"air"}, 8, 20, 30, 10000, 1, -31000, 31000, true)
mobs:spawn_specific("mobs:bunny", {"default:dirt_with_grass"}, {"air"}, 8, 20, 30, 10000, 2, -31000, 31000, true)
mobs:register_egg("mobs:bunny", "Bunny", "mobs_bunny_inv.png", 1)

View File

@ -7,7 +7,9 @@ mobs:register_mob("mobs:chicken", {
-- is it aggressive
passive = true,
-- health & armor
hp_min = 4, hp_max = 8, armor = 200,
hp_min = 5,
hp_max = 10,
armor = 200,
-- textures and model
collisionbox = {-0.3, -0.75, -0.3, 0.3, 0.1, 0.3},
visual = "mesh",
@ -53,7 +55,7 @@ mobs:register_mob("mobs:chicken", {
},
-- follows wheat
follow = {"farming:seed_wheat", "farming:seed_cotton"},
view_range = 8,
view_range = 5,
on_rightclick = function(self, clicker)
mobs:feed_tame(self, clicker, 8, true, true)
@ -74,7 +76,7 @@ mobs:register_mob("mobs:chicken", {
end,
})
-- spawn on default or bamboo grass between 8 and 20 light, 1 in 10000 change, 1 chicken in area up to 31000 in height
mobs:spawn_specific("mobs:chicken", {"default:dirt_with_grass"}, {"air"}, 8, 20, 30, 10000, 1, -31000, 31000, true)
mobs:spawn_specific("mobs:chicken", {"default:dirt_with_grass"}, {"air"}, 8, 20, 30, 10000, 2, -31000, 31000, true)
-- register spawn egg
mobs:register_egg("mobs:chicken", "Chicken", "mobs_chicken_inv.png", 1)
-- egg entity

View File

@ -48,15 +48,20 @@ mobs:register_mob("mobs:cow", {
light_damage = 0,
-- model animation
animation = {
speed_normal = 15, speed_run = 15,
stand_start = 0, stand_end = 30,
walk_start = 35, walk_end = 65,
run_start = 105, run_end = 135,
punch_start = 70, punch_end = 100,
speed_normal = 15,
speed_run = 15,
stand_start = 0,
stand_end = 30,
walk_start = 35,
walk_end = 65,
run_start = 105,
run_end = 135,
punch_start = 70,
punch_end = 100,
},
follow = "farming:wheat",
view_range = 8,
replace_rate = 50,
view_range = 7,
replace_rate = 10,
replace_what = {"default:grass_3", "default:grass_4", "default:grass_5", "farming:wheat_8"},
replace_with = "air",
on_rightclick = function(self, clicker)
@ -87,7 +92,7 @@ mobs:register_mob("mobs:cow", {
})
-- spawn on default;green;prairie grass between 0 and 20 light, 1 in 11000 chance, 1 cow in area up to 31000 in height
mobs:spawn_specific("mobs:cow", {"default:dirt_with_grass"}, {"air"}, 8, 20, 30, 10000, 1, -31000, 31000, true)
mobs:spawn_specific("mobs:cow", {"default:dirt_with_grass"}, {"air"}, 8, 20, 30, 10000, 2, -31000, 31000, true)
-- register spawn egg
mobs:register_egg("mobs:cow", "Cow", "mobs_cow_inv.png", 1)

0
mods/mobs/ent.lua Normal file → Executable file
View File

View File

@ -54,9 +54,9 @@ for _, col in ipairs(all_colours) do
walk_start = 81, walk_end = 100,
},
follow = {"farming:wheat", "default:grass_5"},
view_range = 10,
view_range = 8,
-- replace grass/wheat with air (eat)
replace_rate = 50,
replace_rate = 10,
replace_what = {"default:grass_3", "default:grass_4", "default:grass_5", "farming:wheat_8"},
replace_with = "air",
-- right click sheep to shear sheep and get wood, feed 8 wheat for wool to grow back
@ -143,7 +143,7 @@ for _, col in ipairs(all_colours) do
end
mobs:spawn_specific("mobs:sheep_white", {"default:dirt_with_grass"}, {"air"}, 8, 20, 30, 10000, 1, -31000, 31000, true)
mobs:spawn_specific("mobs:sheep_white", {"default:dirt_with_grass"}, {"air"}, 8, 20, 30, 10000, 2, -31000, 31000, true)
-- compatibility (item and entity)
minetest.register_alias("mobs:sheep", "mobs:sheep_white")