netherite items (except armour) will float in lava and not burn

This commit is contained in:
Sumyjkl 2022-07-22 23:06:35 +10:00
parent eeace260fe
commit 58d80e5e9c
4 changed files with 10 additions and 10 deletions

View File

@ -635,7 +635,7 @@ minetest.register_entity(":__builtin:item", {
end end
local nn = node.name local nn = node.name
local is_in_water = (minetest.get_item_group(nn, "water") ~= 0) local is_in_water = (minetest.get_item_group(nn, "liquid") ~= 0)
local nn_above = minetest.get_node({x=p.x, y=p.y+0.1, z=p.z}).name local nn_above = minetest.get_node({x=p.x, y=p.y+0.1, z=p.z}).name
-- make sure it's more or less stationary and is at water level -- make sure it's more or less stationary and is at water level
local sleep_threshold = 0.3 local sleep_threshold = 0.3
@ -671,7 +671,7 @@ minetest.register_entity(":__builtin:item", {
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
--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 then if self.age > 2 and minetest.get_item_group(self.itemstring, "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

View File

@ -285,7 +285,7 @@ minetest.register_tool("mcl_farming:hoe_netherite", {
inventory_image = "farming_tool_netheritehoe.png", inventory_image = "farming_tool_netheritehoe.png",
wield_scale = mcl_vars.tool_wield_scale, wield_scale = mcl_vars.tool_wield_scale,
on_place = hoe_on_place_function(uses.netherite), on_place = hoe_on_place_function(uses.netherite),
groups = { tool=1, hoe=1, enchantability=10 }, groups = { tool=1, hoe=1, enchantability=10, fire_immune=1 },
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.25, full_punch_interval = 0.25,
damage_groups = { fleshy = 4, }, damage_groups = { fleshy = 4, },

View File

@ -71,7 +71,7 @@ minetest.register_node("mcl_nether:netheriteblock", {
stack_max = 64, stack_max = 64,
tiles = {"mcl_nether_netheriteblock.png"}, tiles = {"mcl_nether_netheriteblock.png"},
is_ground_content = true, is_ground_content = true,
groups = {pickaxey=4, building_block=1, material_stone=1, xp = 0}, groups = { pickaxey=4, building_block=1, material_stone=1, xp = 0, fire_immune=1 },
drop = "mcl_nether:netheriteblock", drop = "mcl_nether:netheriteblock",
sounds = mcl_sounds.node_sound_stone_defaults(), sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 1200, _mcl_blast_resistance = 1200,
@ -285,7 +285,7 @@ minetest.register_craftitem("mcl_nether:netherite_scrap", {
_doc_items_longdesc = S("Netherite scrap is a crafting ingredient for netherite ingots."), _doc_items_longdesc = S("Netherite scrap is a crafting ingredient for netherite ingots."),
inventory_image = "mcl_nether_netherite_scrap.png", inventory_image = "mcl_nether_netherite_scrap.png",
stack_max = 64, stack_max = 64,
groups = { craftitem = 1 }, groups = { craftitem = 1, fire_immune=1 },
}) })
minetest.register_craftitem("mcl_nether:netherite_ingot", { minetest.register_craftitem("mcl_nether:netherite_ingot", {
@ -293,7 +293,7 @@ minetest.register_craftitem("mcl_nether:netherite_ingot", {
_doc_items_longdesc = S("Netherite ingots can be used with a smithing table to upgrade items to netherite."), _doc_items_longdesc = S("Netherite ingots can be used with a smithing table to upgrade items to netherite."),
inventory_image = "mcl_nether_netherite_ingot.png", inventory_image = "mcl_nether_netherite_ingot.png",
stack_max = 64, stack_max = 64,
groups = { craftitem = 1 }, groups = { craftitem = 1, fire_immune=1 },
}) })
minetest.register_craftitem("mcl_nether:netherbrick", { minetest.register_craftitem("mcl_nether:netherbrick", {

View File

@ -184,7 +184,7 @@ minetest.register_tool("mcl_tools:pick_netherite", {
_doc_items_longdesc = pickaxe_longdesc, _doc_items_longdesc = pickaxe_longdesc,
inventory_image = "default_tool_netheritepick.png", inventory_image = "default_tool_netheritepick.png",
wield_scale = wield_scale, wield_scale = wield_scale,
groups = { tool=1, pickaxe=1, dig_speed_class=6, enchantability=10 }, groups = { tool=1, pickaxe=1, dig_speed_class=6, enchantability=10, fire_immune=1 },
tool_capabilities = { tool_capabilities = {
-- 1/1.2 -- 1/1.2
full_punch_interval = 0.83333333, full_punch_interval = 0.83333333,
@ -384,7 +384,7 @@ minetest.register_tool("mcl_tools:shovel_netherite", {
_doc_items_usagehelp = shovel_use, _doc_items_usagehelp = shovel_use,
inventory_image = "default_tool_netheriteshovel.png", inventory_image = "default_tool_netheriteshovel.png",
wield_scale = wield_scale, wield_scale = wield_scale,
groups = { tool=1, shovel=1, dig_speed_class=6, enchantability=10 }, groups = { tool=1, shovel=1, dig_speed_class=6, enchantability=10, fire_immune=1 },
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1, full_punch_interval = 1,
max_drop_level=5, max_drop_level=5,
@ -539,7 +539,7 @@ minetest.register_tool("mcl_tools:axe_netherite", {
_doc_items_longdesc = axe_longdesc, _doc_items_longdesc = axe_longdesc,
inventory_image = "default_tool_netheriteaxe.png", inventory_image = "default_tool_netheriteaxe.png",
wield_scale = wield_scale, wield_scale = wield_scale,
groups = { tool=1, axe=1, dig_speed_class=6, enchantability=10 }, groups = { tool=1, axe=1, dig_speed_class=6, enchantability=10, fire_immune=1 },
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1.0, full_punch_interval = 1.0,
max_drop_level=5, max_drop_level=5,
@ -664,7 +664,7 @@ minetest.register_tool("mcl_tools:sword_netherite", {
_doc_items_longdesc = sword_longdesc, _doc_items_longdesc = sword_longdesc,
inventory_image = "default_tool_netheritesword.png", inventory_image = "default_tool_netheritesword.png",
wield_scale = wield_scale, wield_scale = wield_scale,
groups = { weapon=1, sword=1, dig_speed_class=5, enchantability=10 }, groups = { weapon=1, sword=1, dig_speed_class=5, enchantability=10, fire_immune=1 },
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.625, full_punch_interval = 0.625,
max_drop_level=5, max_drop_level=5,