1
0
Fork 0
MineClone2/mods/ENTITIES/mobs_mc/creeper.lua

89 lines
1.8 KiB
Lua
Raw Normal View History

--MCmobs v0.2
--maikerumine
--made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes
--dofile(minetest.get_modpath("mobs").."/api.lua")
mobs:register_mob("mobs_mc:creeper", {
type = "monster",
2017-01-20 21:24:56 +01:00
hp_min = 20,
2017-01-16 20:52:09 +01:00
hp_max = 20,
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.6, 0.4},
2017-03-03 01:27:10 +01:00
pathfinding = 1,
group_attack = true,
visual = "mesh",
visual_size = {x=.75, y=.75, z=.75},
mesh = "mobs_creeper.x",
textures = {
{"mobs_creeper.png"}
},
makes_footstep_sound = false,
sounds = {
2017-02-20 02:24:46 +01:00
attack = "tnt_ignite",
death = "Creeperdeath",
damage = "Creeper4",
2017-02-20 02:24:46 +01:00
war_cry = "tnt_ignite",
explode = "tnt_explode",
},
walk_velocity = 1.5,
run_velocity = 3,
damage = 1,
explosion_radius = 3,
2017-01-16 20:52:09 +01:00
armor = 100,
maxdrops = 3,
drops = {
2017-02-16 21:33:14 +01:00
{name = "mcl_mobitems:gunpowder",
chance = 1,
min = 0,
max = 2,},
2017-02-20 07:34:47 +01:00
-- TODO: In Minecraft, record discs only drop when a creeper got killed by a skeleton's arrow
{name = "mcl_jukebox:record_6",
chance = 100,
min = 1,
max = 1,},
{name = "mcl_jukebox:record_7",
chance = 125,
min = 1,
max = 1,},
},
animation = {
speed_normal = 24,
speed_run = 48,
stand_start = 0,
stand_end = 23,
walk_start = 24,
walk_end = 49,
run_start = 24,
run_end = 49,
hurt_start = 110,
hurt_end = 139,
death_start = 140,
death_end = 189,
look_start = 50,
look_end = 108,
},
drawtype = "front",
lava_damage = minetest.registered_nodes["mcl_core:lava_source"].damage_per_second,
light_damage = 0,
view_range = 16,
attack_type = "explode",
})
2017-02-20 03:00:03 +01:00
mobs:register_spawn("mobs_mc:creeper", {"group:solid"}, 7, -1, 5000, 4, 31000)
-- compatibility
mobs:alias_mob("mobs:creeper", "mobs_mc:creeper")
-- spawn eggs
mobs:register_egg("mobs_mc:creeper", "Spawn Creeper", "spawn_egg_creeper.png")
if minetest.setting_get("log_mods") then
minetest.log("action", "MC Creeper loaded")
end