mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-26 19:27:31 +01:00
make ghast firing more MC-like
This commit is contained in:
parent
f8229def5e
commit
ac87e0604e
@ -2819,6 +2819,10 @@ local do_states = function(self, dtime)
|
|||||||
local arrow, ent
|
local arrow, ent
|
||||||
local v = 1
|
local v = 1
|
||||||
if not self.shoot_arrow then
|
if not self.shoot_arrow then
|
||||||
|
self.firing = true
|
||||||
|
minetest.after(1, function()
|
||||||
|
self.firing = false
|
||||||
|
end)
|
||||||
arrow = minetest.add_entity(p, self.arrow)
|
arrow = minetest.add_entity(p, self.arrow)
|
||||||
ent = arrow:get_luaentity()
|
ent = arrow:get_luaentity()
|
||||||
if ent.velocity then
|
if ent.velocity then
|
||||||
|
@ -63,6 +63,15 @@ mobs:register_mob("mobs_mc:ghast", {
|
|||||||
makes_footstep_sound = false,
|
makes_footstep_sound = false,
|
||||||
instant_death = true,
|
instant_death = true,
|
||||||
fire_resistant = 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,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_ghast_firing.png
Normal file
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_ghast_firing.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Loading…
Reference in New Issue
Block a user