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,
36 death
= "skeletondeath",
37 damage
= "skeletonhurt1",
45 {name
= mobs_mc
.items
.arrow
,
49 {name
= mobs_mc
.items
.bow
,
53 {name
= mobs_mc
.items
.bone
,
59 -- TODO: Only drop if killed by charged creeper
60 {name
= mobs_mc
.items
.head_skeleton
,
61 chance
= 200, -- 0.5% chance
85 attack_type
= "dogshoot",
86 arrow
= "mobs_mc:arrow_entity",
90 dogshoot_count_max
=1.8,
94 mobs
:register_mob("mobs_mc:skeleton", skeleton
)
98 --################### STRAY
101 local stray
= table.copy(skeleton
)
102 stray
.mesh
= "mobs_mc_stray.b3d"
105 "mcl_bows_bow_0.png",
107 "mobs_mc_stray_overlay.png",
110 -- TODO: different sound (w/ echo)
111 -- TODO: stray's arrow inflicts slowness status
112 table.insert(stray
.drops
, {
113 -- Chance to drop additional arrow.
114 -- TODO: Should be tipped arrow of slowness
115 name
= mobs_mc
.items
.arrow
,
121 mobs
:register_mob("mobs_mc:stray", stray
)
124 mobs
:alias_mob("mobs:skeleton", "mobs_mc:skeleton")
127 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
)
129 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
)
132 -- TODO: Spawn directly under the sky
133 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
)
137 mobs
:register_egg("mobs_mc:skeleton", S("Skeleton"), "mobs_mc_spawn_icon_skeleton.png", 0)
138 mobs
:register_egg("mobs_mc:stray", S("Stray"), "mobs_mc_spawn_icon_stray.png", 0)
140 if minetest
.settings
:get_bool("log_mods") then
141 minetest
.log("action", "MC Skeleton loaded")