3 --made for MC like Survival game
4 --License for code WTFPL and otherwise stated in readmes
6 local S
= minetest
.get_translator("mobs_mc")
9 --################### SHULKER
12 -- animation 45-80 is transition between passive and attack stance
14 mobs
:register_mob("mobs_mc:shulker", {
16 spawn_class
= "hostile",
17 attack_type
= "shoot",
19 arrow
= "mobs_mc:shulkerbullet",
25 collisionbox
= {-0.5, -0.01, -0.5, 0.5, 0.99, 0.5},
27 mesh
= "mobs_mc_shulker.b3d",
28 textures
= { "mobs_mc_endergolem.png", },
30 -- TODO: Make shulker dye-able
31 visual_size
= {x
=3, y
=3},
35 {name
= mobs_mc
.items
.shulker_shell
,
41 stand_speed
= 25, walk_speed
= 25, run_speed
= 50, punch_speed
= 25,
42 speed_normal
= 25, speed_run
= 50,
43 stand_start
= 0, stand_end
= 45,
44 walk_start
= 0, walk_end
= 45,
45 run_start
= 0, run_end
= 45,
46 punch_start
= 80, punch_end
= 100,
52 -- bullet arrow (weapon)
53 mobs
:register_arrow("mobs_mc:shulkerbullet", {
55 visual_size
= {x
= 0.25, y
= 0.25},
56 textures
= {"mobs_mc_shulkerbullet.png"},
59 hit_player
= function(self
, player
)
60 player
:punch(self
.object
, 1.0, {
61 full_punch_interval
= 1.0,
62 damage_groups
= {fleshy
= 4},
66 hit_mob
= function(self
, mob
)
67 mob
:punch(self
.object
, 1.0, {
68 full_punch_interval
= 1.0,
69 damage_groups
= {fleshy
= 4},
73 hit_node
= function(self
, pos
, node
)
78 mobs
:register_egg("mobs_mc:shulker", S("Shulker"), "mobs_mc_spawn_icon_shulker.png", 0)
80 mobs
:spawn_specific("mobs_mc:shulker", mobs_mc
.spawn
.end_city
, {"air"}, 0, minetest
.LIGHT_MAX
+1, 30, 5000, 2, mobs_mc
.spawn_height
.end_min
, mobs_mc
.spawn_height
.end_max
)