mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-19 01:21:05 +01:00
Merge pull request 'Ensure enchanted netherite armour is fire immune to lava etc.' (#3625) from enchanted_netherite_lava_immune into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/3625 Reviewed-by: 𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 <mrrar@noreply.git.minetest.land>
This commit is contained in:
commit
b19cc8a5e6
1 changed files with 4 additions and 1 deletions
|
@ -409,8 +409,11 @@ local function nodes_destroy_items (self, moveresult, def, nn)
|
||||||
local dg = minetest.get_item_group(nn, "destroys_items")
|
local dg = minetest.get_item_group(nn, "destroys_items")
|
||||||
|
|
||||||
if (def and (lg ~= 0 or fg ~= 0 or dg == 1)) then
|
if (def and (lg ~= 0 or fg ~= 0 or dg == 1)) then
|
||||||
|
local item_string = self.itemstring
|
||||||
|
local item_name = ItemStack(item_string):get_name()
|
||||||
|
|
||||||
--Wait 2 seconds to allow mob drops to be cooked, & picked up instead of instantly destroyed.
|
--Wait 2 seconds to allow mob drops to be cooked, & picked up instead of instantly destroyed.
|
||||||
if self.age > 2 and minetest.get_item_group(self.itemstring, "fire_immune") == 0 then
|
if self.age > 2 and minetest.get_item_group(item_name, "fire_immune") == 0 then
|
||||||
if dg ~= 2 then
|
if dg ~= 2 then
|
||||||
minetest.sound_play("builtin_item_lava", { pos = self.object:get_pos(), gain = 0.5 })
|
minetest.sound_play("builtin_item_lava", { pos = self.object:get_pos(), gain = 0.5 })
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue