3 --made for MC like Survival game
4 --License for code WTFPL and otherwise stated in readmes
7 local MP
= minetest
.get_modpath(minetest
.get_current_modname())
8 local S
, NS
= dofile(MP
.."/intllib.lua")
10 --dofile(minetest.get_modpath("mobs").."/api.lua")
14 --################### SKELETON
23 collisionbox
= {-0.3, -0.01, -0.3, 0.3, 1.98, 0.3},
27 mesh
= "mobs_mc_skeleton.b3d",
29 "mcl_bows_bow_0.png", -- bow
30 "mobs_mc_skeleton.png", -- skeleton
32 visual_size
= {x
=3, y
=3},
33 makes_footstep_sound
= true,
35 random = "mobs_mc_skeleton_random",
36 death
= "mobs_mc_skeleton_death",
37 damage
= "mobs_mc_skeleton_hurt",
38 shoot_attack
= "mcl_bows_bow_shoot",
46 {name
= mobs_mc
.items
.arrow
,
50 {name
= mobs_mc
.items
.bow
,
54 {name
= mobs_mc
.items
.bone
,
60 -- TODO: Only drop if killed by charged creeper
61 {name
= mobs_mc
.items
.head_skeleton
,
62 chance
= 200, -- 0.5% chance
86 attack_type
= "dogshoot",
87 arrow
= "mobs_mc:arrow_entity",
91 dogshoot_count_max
=1.8,
95 mobs
:register_mob("mobs_mc:skeleton", skeleton
)
99 --################### STRAY
100 --###################
102 local stray
= table.copy(skeleton
)
103 stray
.mesh
= "mobs_mc_stray.b3d"
106 "mcl_bows_bow_0.png",
108 "mobs_mc_stray_overlay.png",
111 -- TODO: different sound (w/ echo)
112 -- TODO: stray's arrow inflicts slowness status
113 table.insert(stray
.drops
, {
114 -- Chance to drop additional arrow.
115 -- TODO: Should be tipped arrow of slowness
116 name
= mobs_mc
.items
.arrow
,
122 mobs
:register_mob("mobs_mc:stray", stray
)
125 mobs
:alias_mob("mobs:skeleton", "mobs_mc:skeleton")
128 mobs
:spawn_specific("mobs_mc:skeleton", mobs_mc
.spawn
.solid
, {"air"}, 0, 7, 20, 17000, 2, mobs_mc
.spawn_height
.overworld_min
, mobs_mc
.spawn_height
.overworld_max
)
130 mobs
:spawn_specific("mobs_mc:skeleton", mobs_mc
.spawn
.nether_fortress
, {"air"}, 0, 7, 30, 10000, 3, mobs_mc
.spawn_height
.nether_min
, mobs_mc
.spawn_height
.nether_max
)
133 -- TODO: Spawn directly under the sky
134 mobs
:spawn_specific("mobs_mc:stray", mobs_mc
.spawn
.snow
, {"air"}, 0, 7, 20, 19000, 2, mobs_mc
.spawn_height
.water
, mobs_mc
.spawn_height
.overworld_max
)
138 mobs
:register_egg("mobs_mc:skeleton", S("Skeleton"), "mobs_mc_spawn_icon_skeleton.png", 0)
139 mobs
:register_egg("mobs_mc:stray", S("Stray"), "mobs_mc_spawn_icon_stray.png", 0)
141 if minetest
.settings
:get_bool("log_mods") then
142 minetest
.log("action", "MC Skeleton loaded")