From ac87e0604ee673e8b13036fafd1c91d46fbbbcdf Mon Sep 17 00:00:00 2001 From: epCode Date: Sat, 3 Apr 2021 18:39:20 -0700 Subject: [PATCH] make ghast firing more MC-like --- mods/ENTITIES/mcl_mobs/api.lua | 4 ++++ mods/ENTITIES/mobs_mc/ghast.lua | 9 +++++++++ .../mobs_mc/textures/mobs_mc_ghast_firing.png | Bin 0 -> 1532 bytes 3 files changed, 13 insertions(+) create mode 100644 mods/ENTITIES/mobs_mc/textures/mobs_mc_ghast_firing.png diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index fac8bbeecb..0a038ba134 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -2819,6 +2819,10 @@ local do_states = function(self, dtime) local arrow, ent local v = 1 if not self.shoot_arrow then + self.firing = true + minetest.after(1, function() + self.firing = false + end) arrow = minetest.add_entity(p, self.arrow) ent = arrow:get_luaentity() if ent.velocity then diff --git a/mods/ENTITIES/mobs_mc/ghast.lua b/mods/ENTITIES/mobs_mc/ghast.lua index 39af10addd..7aed9395e1 100644 --- a/mods/ENTITIES/mobs_mc/ghast.lua +++ b/mods/ENTITIES/mobs_mc/ghast.lua @@ -63,6 +63,15 @@ mobs:register_mob("mobs_mc:ghast", { makes_footstep_sound = false, instant_death = true, fire_resistant = true, + do_custom = function(self) + if self.firing == true then + self.base_texture = {"mobs_mc_ghast_firing.png"} + self.object:set_properties({textures=self.base_texture}) + else + self.base_texture = {"mobs_mc_ghast.png"} + self.object:set_properties({textures=self.base_texture}) + end + end, }) diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_ghast_firing.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_ghast_firing.png new file mode 100644 index 0000000000000000000000000000000000000000..3e5b41c32710a811ff75aa6a349bf4944294aaf0 GIT binary patch literal 1532 zcmVGj!2SAnoeDME4ikJU}4pA#amKA0nNSU0>ruVUlH< zMG@oNK%42{*j6_^;#ihEnn`-V$hIUOonL)N7WhNg*VhIBlu`hIqoX5%2>SNzn*o5^ z+gpssVt# zlyY@-Wy-RIloDlG0szXgwC@#Z_5@H}i{Jj4AyS%2I3 zj-5wF_O*&zdoUQ-#KiCWXn%jdHI7@qsw!kz2CcPsZjvOZ>-t3!T!?mech`FWS&$17 zBYceJdEAFQWZMwfWF0{dP)ea`8b~Qyt!vG7nLi|8D96-w9h~=)Ibd&ZuipczszTE= zpq3U*_c0hCNfP9FZe5*#4|&$%;bEsQNfMhFxAlOS&>>kumkNQJZNh+*K&X!^koqQ* zNyjVxb`p%<1qOqG_r8y4oQwLn_I>fl!)seXVmzm+s@_Y!l=UAT9$G?i!Pn)Izlj5A zs}8j!A3ki11Ck{1wu%x}nx&F2i_uwEamoBmZum=WQI2 zWm#+c3MI49;y7cs@bHas`E0{~JRY|cA3A%8LV|sjo4dD@ra7(#fYZ}cOsCV%-05_R z)6-M0)%*DKQrgEq=HR6dAINnFAX;n7lrNeWGg3+{77Lu6onbf};^WsZm`=K|4mRN?NVH!Vm_Z662!NKaSP;m?gcRJ)@Quaa&0E5IEb! z?OoXvkIA~OE#xG3bGHqb(lo_#xr9;*qtOUeRoPfRIXM9UTwY#UbVov^Y3faoLWq{& zS(f4E=EkdxSTsm;eR)Um4xjsT_u-!4V{(6gkI7`xDP~SiPH=g72`MGMfB$YVL1>|z zZf7GPvOdSW8Wc$8$-T@)^*)sa&_<@@B{c){9|KxJRale>8S-x zN%5S&n|nfT9|}p1Irw~fCM+UDh>SGMt<=CVu;6hnx^>m>sO~J i+LS-9Kx4y&huCj4GoCz*uaG4G0000