From 93684baa86adcdf3db4b0a13e219428b6bf1a344 Mon Sep 17 00:00:00 2001 From: epCode Date: Sun, 4 Apr 2021 16:32:58 -0700 Subject: [PATCH 1/2] Make Blazes have more Mc-likeness ;) --- mods/ENTITIES/mobs_mc/blaze.lua | 53 +++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/mods/ENTITIES/mobs_mc/blaze.lua b/mods/ENTITIES/mobs_mc/blaze.lua index 20fa86a1f3..30255612ae 100644 --- a/mods/ENTITIES/mobs_mc/blaze.lua +++ b/mods/ENTITIES/mobs_mc/blaze.lua @@ -75,6 +75,59 @@ mobs:register_mob("mobs_mc:blaze", { fear_height = 0, glow = 14, fire_resistant = true, + do_custom = function(self) + for _,obj in pairs(minetest.get_objects_inside_radius(self.object:get_pos(), 1.2)) do + if obj:is_player() or not obj:is_player() and obj:get_luaentity()._cmi_is_mob then + mcl_burning.set_on_fire(obj, 5) + end + end + local pos = self.object:get_pos() + minetest.add_particle({ + pos = {x=pos.x+math.random(-0.7,0.7)*math.random()/2,y=pos.y+math.random(0.7,1.2),z=pos.z+math.random(-0.7,0.7)*math.random()/2}, + velocity = {x=0, y=math.random(1,1), z=0}, + expirationtime = math.random(), + size = math.random(1, 4), + collisiondetection = true, + vertical = false, + texture = "mcl_particles_smoke_anim.png^[colorize:#2c2c2c:255", + animation = { + type = "vertical_frames", + aspect_w = 8, + aspect_h = 8, + length = 2.05, + }, + }) + minetest.add_particle({ + pos = {x=pos.x+math.random(-0.7,0.7)*math.random()/2,y=pos.y+math.random(0.7,1.2),z=pos.z+math.random(-0.7,0.7)*math.random()/2}, + velocity = {x=0, y=math.random(1,1), z=0}, + expirationtime = math.random(), + size = math.random(1, 4), + collisiondetection = true, + vertical = false, + texture = "mcl_particles_smoke_anim.png^[colorize:#424242:255", + animation = { + type = "vertical_frames", + aspect_w = 8, + aspect_h = 8, + length = 2.05, + }, + }) + minetest.add_particle({ + pos = {x=pos.x+math.random(-0.7,0.7)*math.random()/2,y=pos.y+math.random(0.7,1.2),z=pos.z+math.random(-0.7,0.7)*math.random()/2}, + velocity = {x=0, y=math.random(1,1), z=0}, + expirationtime = math.random(), + size = math.random(1, 4), + collisiondetection = true, + vertical = false, + texture = "mcl_particles_smoke_anim.png^[colorize:#0f0f0f:255", + animation = { + type = "vertical_frames", + aspect_w = 8, + aspect_h = 8, + length = 2.05, + }, + }) + end, }) mobs:spawn_specific("mobs_mc:blaze", mobs_mc.spawn.nether_fortress, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 5000, 3, mobs_mc.spawn_height.nether_min, mobs_mc.spawn_height.nether_max) From a6f0ad13a0592277a86d3ce3301f57751771c63b Mon Sep 17 00:00:00 2001 From: epCode Date: Sun, 4 Apr 2021 16:46:44 -0700 Subject: [PATCH 2/2] Make blaze burning better --- mods/ENTITIES/mobs_mc/blaze.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/blaze.lua b/mods/ENTITIES/mobs_mc/blaze.lua index 30255612ae..fbffa79200 100644 --- a/mods/ENTITIES/mobs_mc/blaze.lua +++ b/mods/ENTITIES/mobs_mc/blaze.lua @@ -76,10 +76,8 @@ mobs:register_mob("mobs_mc:blaze", { glow = 14, fire_resistant = true, do_custom = function(self) - for _,obj in pairs(minetest.get_objects_inside_radius(self.object:get_pos(), 1.2)) do - if obj:is_player() or not obj:is_player() and obj:get_luaentity()._cmi_is_mob then - mcl_burning.set_on_fire(obj, 5) - end + if self.state == "attack" and vector.distance(self.object:get_pos(), self.attack:get_pos()) < 1.2 then + mcl_burning.set_on_fire(self.attack, 5) end local pos = self.object:get_pos() minetest.add_particle({