mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2025-02-26 01:23:48 +01:00
Get item name correctly.
This commit is contained in:
@ -409,11 +409,8 @@ 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_name = self.itemstring
|
local item_string = self.itemstring
|
||||||
local name, _ = item_name:match"^(%S+)%s+(.+)"
|
local item_name = ItemStack(item_string):get_name()
|
||||||
if name then
|
|
||||||
item_name = name
|
|
||||||
end
|
|
||||||
|
|
||||||
--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(item_name, "fire_immune") == 0 then
|
if self.age > 2 and minetest.get_item_group(item_name, "fire_immune") == 0 then
|
||||||
|
Reference in New Issue
Block a user