From 93684baa86adcdf3db4b0a13e219428b6bf1a344 Mon Sep 17 00:00:00 2001 From: epCode Date: Sun, 4 Apr 2021 16:32:58 -0700 Subject: [PATCH] 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 20fa86a1f..30255612a 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)