From f7d9aea529c658799f65105eb2c984c2615df0a8 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 8 Mar 2019 03:40:46 +0100 Subject: [PATCH] Make blazes glow in the dark --- mods/ENTITIES/mcl_mobs/api.lua | 1 + mods/ENTITIES/mcl_mobs/api.txt | 1 + mods/ENTITIES/mobs_mc/blaze.lua | 1 + mods/ITEMS/mcl_tnt/init.lua | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 3c2d61bd82..dfc4c77339 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -3087,6 +3087,7 @@ minetest.register_entity(name, { -- MCL2 extensions ignores_nametag = def.ignores_nametag or false, rain_damage = def.rain_damage or 0, + glow = def.glow, can_despawn = can_despawn, on_spawn = def.on_spawn, diff --git a/mods/ENTITIES/mcl_mobs/api.txt b/mods/ENTITIES/mcl_mobs/api.txt index 157370d0ff..5baab263e1 100644 --- a/mods/ENTITIES/mcl_mobs/api.txt +++ b/mods/ENTITIES/mcl_mobs/api.txt @@ -215,6 +215,7 @@ functions needed for the mob to work properly which contains the following: are in direct sunlight 'spawn_small_alternative': name of a smaller mob to use as replacement if spawning fails due to space requirements + 'glow' same as in entity definition Node Replacement ---------------- diff --git a/mods/ENTITIES/mobs_mc/blaze.lua b/mods/ENTITIES/mobs_mc/blaze.lua index 34ee630fcb..21e752a356 100644 --- a/mods/ENTITIES/mobs_mc/blaze.lua +++ b/mods/ENTITIES/mobs_mc/blaze.lua @@ -67,6 +67,7 @@ mobs:register_mob("mobs_mc:blaze", { jump_chance = 98, fear_height = 120, blood_amount = 0, + glow = 14, }) 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) diff --git a/mods/ITEMS/mcl_tnt/init.lua b/mods/ITEMS/mcl_tnt/init.lua index c3bc2d9350..f18f64b5dd 100644 --- a/mods/ITEMS/mcl_tnt/init.lua +++ b/mods/ITEMS/mcl_tnt/init.lua @@ -32,7 +32,7 @@ local function do_tnt_physics(tnt_np,tntr) local damage = (4 / dist) * tntr if obj:is_player() == true then if mod_death_messages then - mcl_death_messages.player_damage(obj, string.format("%s was caught in an explosion.", obj:get_player_name())) + mcl_death_messages.player_damage(obj, S("@1 was caught in an explosion.", obj:get_player_name())) end end obj:set_hp(obj:get_hp() - damage)