From 1e0ea206be57dc9bfde5da010dd34a64cb278431 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 23 Feb 2017 21:39:08 +0100 Subject: [PATCH] Add baby zombie egg texture --- .../textures/spawn_egg_baby_zombie.png | Bin 0 -> 660 bytes mods/ENTITIES/mobs_mc/zombie.lua | 84 ++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 mods/ENTITIES/mobs_mc/textures/spawn_egg_baby_zombie.png diff --git a/mods/ENTITIES/mobs_mc/textures/spawn_egg_baby_zombie.png b/mods/ENTITIES/mobs_mc/textures/spawn_egg_baby_zombie.png new file mode 100644 index 0000000000000000000000000000000000000000..28db22171b978fe98455fb0dec7414bbf3282680 GIT binary patch literal 660 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyEa{HEjtmSN`?>!lvVtU&J%W50 z7^>757#dm_7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+10q9VX2#1*6`JyJT%+j7%v zlf``v4Gm|`oVj!7j>X1Vb#-<7_U*IYvv|XX4F?V!IDY(iWo6~Tg9mTkym{-^ExUs& zTn?{ZwQAMHix;0ifBx##E2%*D+S=Nhnwl$Dt}I=;R5HNr(4j+ld3m#D&04l>*}Qr4 zX3m^xG{397y!`+F{|gp#83FBPED7=pW^j0RBMrn!@^*Jo*X3WK4CJtvc>21sKV%XY zRg;vSC9)4F&Ex6f7-Dhy?8Vzj%?dmXi5Gb^Z!`zI;meAhS^eKVrfJ8*7kXt|@BE85 z-5B}peVgI5|FgIm5^~ntf7~RX@nFN{rB9YR1%|fI)$5O&v+C8JyZYixx0?#@SH3;S znNZ8K`lsM-HH8i98HE=;EB-!x4GUA~^r+dg4tHbLAJbsEq?W|i<)ExC$QUNVvSnZ8 z1(kk>1yc^L`^$CqO7aC0mU;R6+Ep3j_8nY3$K{1)#o?_2514YT%Ws$dJ+Hk+v`a7J z{n|MU-|{-nG3*IW*zfIqH>qC!(R&7m_s8_!CcnyKY}#;xx!_&$&-fl?!9RZw>pz$i zZKH7dli;G4llqkUk52gFux9D`JKt}9dotf-_s{;%tTUTLr#2eQTnP*+)e_f;l9a@f zRIB8oR3OD*WMF8nYha{nWE^5-Xk~0+Wn`*tU}$Av(9vVAiJ~DlKP5A*61Rq*7yG9I PH86O(`njxgN@xNAJjfDf literal 0 HcmV?d00001 diff --git a/mods/ENTITIES/mobs_mc/zombie.lua b/mods/ENTITIES/mobs_mc/zombie.lua index 95746daf22..d5f1047e78 100644 --- a/mods/ENTITIES/mobs_mc/zombie.lua +++ b/mods/ENTITIES/mobs_mc/zombie.lua @@ -88,14 +88,98 @@ mobs:register_mob("mobs_mc:zombie", { view_range = 40, attack_type = "dogfight", }) + + +mobs:register_mob("mobs_mc:baby_zombie", { + type = "monster", + hp_min = 20, + hp_max = 20, + -- They are a bit shorter than 1 block high to fit through gaps + collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.94, 0.25}, + visual_size = {x=0.5, y=0.5}, + textures = { + {"mobs_zombie.png"} + }, + visual = "mesh", + mesh = "mobs_zombie.x", + makes_footstep_sound = true, + sounds = { + random = "zombie1", + death = "zombiedeath", + damage = "zombiehurt1", + attack = "default_punch3", + }, + walk_velocity = 1.2, + run_velocity = 2.4, + damage = 3, + -- Half attack range because they are small + reach = 1.5, + fear_height = 8, + pathfinding = 1, + group_attack = true, + drops = { + {name = "mcl_mobitems:rotten_flesh", + chance = 1, + min = 0, + max = 2,}, + {name = "mcl_core:iron_ingot", + -- approximation to 8.5% + chance = 11, + min = 1, + max = 1,}, + {name = "mcl_core:shovel_iron", + -- approximation to 8.5% + chance = 11, + min = 1, + max = 1,}, + {name = "mcl_core:sword_iron", + -- approximation to 8.5% + chance = 11, + min = 1, + max = 1,}, + {name = "mcl_farming:carrot_item", + -- approximation to 8.5% + chance = 11, + min = 1, + max = 1,}, + {name = "mcl_farming:potato_item", + -- approximation to 8.5% + chance = 11, + min = 1, + max = 1,}, + }, + animation = { + speed_normal = 24, + speed_run = 48, + stand_start = 0, + stand_end = 23, + walk_start = 24, + walk_end = 47, + run_start = 48, + run_end = 62, + hurt_start = 64, + hurt_end = 86, + death_start = 88, + death_end = 118, + }, + drawtype = "front", + lava_damage = minetest.registered_nodes["mcl_core:lava_source"].damage_per_second, + view_range = 40, + attack_type = "dogfight", +}) + mobs:register_spawn("mobs_mc:zombie", {"group:solid"}, 7, -1, 5000, 4, 31000) +-- 20 times less likely than regular zombies +mobs:register_spawn("mobs_mc:baby_zombie", {"group:solid"}, 7, -1, 100000, 4, 31000) + -- compatibility mobs:alias_mob("mobs:zombie", "mobs_mc:zombie") -- spawn eggs mobs:register_egg("mobs_mc:zombie", "Spawn Zombie", "spawn_egg_zombie.png") +mobs:register_egg("mobs_mc:baby_zombie", "Spawn Baby Zombie", "spawn_egg_baby_zombie.png") if minetest.setting_get("log_mods") then