forked from MineClone5/MineClone5
#204 Fix fireball entities
This commit is contained in:
parent
4f2567bed0
commit
c3e0b871dc
|
@ -68,7 +68,7 @@ mobs:register_mob("mobs_mc:blaze", {
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
view_range = 16,
|
view_range = 16,
|
||||||
attack_type = "projectile",
|
attack_type = "projectile",
|
||||||
arrow = "mobs_mc:blaze_fireball",
|
arrow = "mobs_mc:blaze_fireball_entity",
|
||||||
shoot_interval = 3.5,
|
shoot_interval = 3.5,
|
||||||
shoot_offset = 1.0,
|
shoot_offset = 1.0,
|
||||||
passive = false,
|
passive = false,
|
||||||
|
@ -85,7 +85,7 @@ mobs:register_mob("mobs_mc:blaze", {
|
||||||
shoot_arrow = function(self, pos, dir)
|
shoot_arrow = function(self, pos, dir)
|
||||||
-- 2-4 damage per arrow
|
-- 2-4 damage per arrow
|
||||||
local dmg = math.random(2,4)
|
local dmg = math.random(2,4)
|
||||||
mobs.shoot_projectile_handling("mobs_mc:blaze_fireball", pos, dir, self.object:get_yaw(), self.object, 7, dmg,nil,nil,nil,-0.4)
|
mobs.shoot_projectile_handling("mobs_mc:blaze_fireball_entity", pos, dir, self.object:get_yaw(), self.object, 7, dmg,nil,nil,nil,-0.4)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
do_custom = function(self)
|
do_custom = function(self)
|
||||||
|
|
|
@ -47,7 +47,7 @@ minetest.register_craftitem("mcl_fire:fire_charge", {
|
||||||
_on_dispense = function(stack, pos, droppos, dropnode, dropdir)
|
_on_dispense = function(stack, pos, droppos, dropnode, dropdir)
|
||||||
-- Throw fire charge
|
-- Throw fire charge
|
||||||
local shootpos = vector.add(pos, vector.multiply(dropdir, 0.51))
|
local shootpos = vector.add(pos, vector.multiply(dropdir, 0.51))
|
||||||
local fireball = add_entity(shootpos, "mobs_mc:blaze_fireball")
|
local fireball = add_entity(shootpos, "mobs_mc:blaze_fireball_entity")
|
||||||
local ent = fireball:get_luaentity()
|
local ent = fireball:get_luaentity()
|
||||||
if ent then
|
if ent then
|
||||||
ent._shot_from_dispenser = true
|
ent._shot_from_dispenser = true
|
||||||
|
|
Loading…
Reference in New Issue