make ghast firing more MC-like

This commit is contained in:
epCode 2021-04-03 18:39:20 -07:00
parent f8229def5e
commit ac87e0604e
3 changed files with 13 additions and 0 deletions

View File

@ -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

View File

@ -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,
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB