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")
13 --################### WITCH
19 mobs
:register_mob("mobs_mc:witch", {
23 collisionbox
= {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
25 mesh
= "mobs_mc_witch.b3d",
27 {"mobs_mc_witch.png"},
29 visual_size
= {x
=3, y
=3},
30 makes_footstep_sound
= true,
37 attack_type
= "dogshoot",
38 arrow
= "mobs:potion_arrow",
42 dogshoot_count_max
=1.8,
45 {name
= mobs_mc
.items
.glass_bottle
, chance
= 8, min = 0, max = 2,},
46 {name
= mobs_mc
.items
.glowstone_dust
, chance
= 8, min = 0, max = 2,},
47 {name
= mobs_mc
.items
.gunpowder
, chance
= 8, min = 0, max = 2,},
48 {name
= mobs_mc
.items
.redstone
, chance
= 8, min = 0, max = 2,},
49 {name
= mobs_mc
.items
.spider_eye
, chance
= 8, min = 0, max = 2,},
50 {name
= mobs_mc
.items
.sugar
, chance
= 8, min = 0, max = 2,},
51 {name
= mobs_mc
.items
.stick
, chance
= 4, min = 0, max = 2,},
79 mobs
:register_arrow(":mobs:potion_arrow", {
81 visual_size
= {x
= 0.5, y
= 0.5},
82 --textures = {"vessels_glass_bottle.png"}, --TODO fix to else if default
83 textures
= {"mcl_potions_dragon_breath.png"},
86 -- direct hit, no fire... just plenty of pain
87 hit_player
= function(self
, player
)
88 player
:punch(self
.object
, 1.0, {
89 full_punch_interval
= 1.0,
90 damage_groups
= {fleshy
= 2},
94 hit_mob
= function(self
, player
)
95 player
:punch(self
.object
, 1.0, {
96 full_punch_interval
= 1.0,
97 damage_groups
= {fleshy
= 2},
101 -- node hit, bursts into flame
102 hit_node
= function(self
, pos
, node
)
103 --mobs:explosion(pos, 1, 1, 0)
107 -- TODO: Spawn when witch works properly
108 --mobs:spawn_specific("mobs_mc:witch", mobs_mc.spawn.jungle, {"air"}, 0, minetest.LIGHT_MAX-6, 12, 20000, 2, mobs_mc.spawn_height.water-6, mobs_mc.spawn_height.overworld_max)
111 mobs
:register_egg("mobs_mc:witch", S("Witch"), "mobs_mc_spawn_icon_witch.png", 0)
113 if minetest
.settings
:get_bool("log_mods") then
114 minetest
.log("action", "MC mobs loaded")