#204 Fix fireball entities

This commit is contained in:
kay27 2022-02-16 06:13:39 +04:00
parent 4f2567bed0
commit c3e0b871dc
2 changed files with 3 additions and 3 deletions

View File

@ -68,7 +68,7 @@ mobs:register_mob("mobs_mc:blaze", {
light_damage = 0,
view_range = 16,
attack_type = "projectile",
arrow = "mobs_mc:blaze_fireball",
arrow = "mobs_mc:blaze_fireball_entity",
shoot_interval = 3.5,
shoot_offset = 1.0,
passive = false,
@ -85,7 +85,7 @@ mobs:register_mob("mobs_mc:blaze", {
shoot_arrow = function(self, pos, dir)
-- 2-4 damage per arrow
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,
do_custom = function(self)

View File

@ -47,7 +47,7 @@ minetest.register_craftitem("mcl_fire:fire_charge", {
_on_dispense = function(stack, pos, droppos, dropnode, dropdir)
-- Throw fire charge
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()
if ent then
ent._shot_from_dispenser = true