forked from VoxeLibre/VoxeLibre
Made Requested changes from Pull Request.
This commit is contained in:
parent
618313f0af
commit
50effaa807
|
@ -1,6 +1,6 @@
|
|||
--local deepslate_mod = minetest.get_modpath("mcl_deepslate")
|
||||
|
||||
-- a basic on_place()
|
||||
--[[ a basic on_place()
|
||||
function mcl_copper.on_place (itemstack, placer, pointed_thing)
|
||||
if pointed_thing.type ~= "node" then
|
||||
return itemstack
|
||||
|
@ -27,6 +27,7 @@ function mcl_copper.on_place (itemstack, placer, pointed_thing)
|
|||
|
||||
return itemstack
|
||||
end
|
||||
--]]
|
||||
|
||||
local function register_oxidation_abm(abm_name, node_name, oxidized_variant)
|
||||
minetest.register_abm({
|
||||
|
@ -41,7 +42,6 @@ local function register_oxidation_abm(abm_name, node_name, oxidized_variant)
|
|||
end
|
||||
|
||||
function mcl_copper.waxing_copper_block(pos, node, player, itemstack)
|
||||
if itemstack:get_name() == "mcl_honey:honeycomb" then
|
||||
-- prevent modification of protected nodes.
|
||||
if mcl_util.check_position_protection(pos, player) then
|
||||
return
|
||||
|
@ -59,9 +59,6 @@ function mcl_copper.waxing_copper_block(pos, node, player, itemstack)
|
|||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
else
|
||||
return -- changed to work with mcl_util.call_on_rightclick()
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
|
|
|
@ -35,7 +35,7 @@ minetest.register_node("mcl_copper:block", {
|
|||
_mcl_blast_resistance = 6,
|
||||
_mcl_hardness = 3,
|
||||
_mcl_copper_waxed_variant = "mcl_copper:waxed_block",
|
||||
on_place = mcl_copper.on_place,
|
||||
--on_place = mcl_copper.on_place,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_copper:waxed_block", {
|
||||
|
@ -48,7 +48,7 @@ minetest.register_node("mcl_copper:waxed_block", {
|
|||
_mcl_blast_resistance = 6,
|
||||
_mcl_hardness = 3,
|
||||
_mcl_stripped_variant = "mcl_copper:block",
|
||||
on_place = mcl_copper.on_place,
|
||||
--on_place = mcl_copper.on_place,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_copper:block_exposed", {
|
||||
|
@ -62,7 +62,7 @@ minetest.register_node("mcl_copper:block_exposed", {
|
|||
_mcl_hardness = 5,
|
||||
_mcl_copper_waxed_variant = "mcl_copper:waxed_block_exposed",
|
||||
_mcl_stripped_variant = "mcl_copper:block",
|
||||
on_place = mcl_copper.on_place,
|
||||
--on_place = mcl_copper.on_place,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_copper:waxed_block_exposed", {
|
||||
|
@ -75,7 +75,7 @@ minetest.register_node("mcl_copper:waxed_block_exposed", {
|
|||
_mcl_blast_resistance = 6,
|
||||
_mcl_hardness = 5,
|
||||
_mcl_stripped_variant = "mcl_copper:block",
|
||||
on_place = mcl_copper.on_place,
|
||||
--on_place = mcl_copper.on_place,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_copper:block_weathered", {
|
||||
|
@ -89,7 +89,7 @@ minetest.register_node("mcl_copper:block_weathered", {
|
|||
_mcl_hardness = 5,
|
||||
_mcl_copper_waxed_variant = "mcl_copper:waxed_block_weathered",
|
||||
_mcl_stripped_variant = "mcl_copper:block_exposed",
|
||||
on_place = mcl_copper.on_place,
|
||||
--on_place = mcl_copper.on_place,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_copper:waxed_block_weathered", {
|
||||
|
@ -102,7 +102,7 @@ minetest.register_node("mcl_copper:waxed_block_weathered", {
|
|||
_mcl_blast_resistance = 6,
|
||||
_mcl_hardness = 5,
|
||||
_mcl_stripped_variant = "mcl_copper:block_exposed",
|
||||
on_place = mcl_copper.on_place,
|
||||
--on_place = mcl_copper.on_place,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_copper:block_oxidized", {
|
||||
|
@ -116,7 +116,7 @@ minetest.register_node("mcl_copper:block_oxidized", {
|
|||
_mcl_hardness = 5,
|
||||
_mcl_copper_waxed_variant = "mcl_copper:waxed_block_oxidized",
|
||||
_mcl_stripped_variant = "mcl_copper:block_weathered",
|
||||
on_place = mcl_copper.on_place,
|
||||
--on_place = mcl_copper.on_place,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_copper:waxed_block_oxidized", {
|
||||
|
@ -129,7 +129,7 @@ minetest.register_node("mcl_copper:waxed_block_oxidized", {
|
|||
_mcl_blast_resistance = 6,
|
||||
_mcl_hardness = 5,
|
||||
_mcl_stripped_variant = "mcl_copper:block_weathered",
|
||||
on_place = mcl_copper.on_place,
|
||||
--on_place = mcl_copper.on_place,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_copper:block_cut", {
|
||||
|
@ -142,7 +142,7 @@ minetest.register_node("mcl_copper:block_cut", {
|
|||
_mcl_blast_resistance = 6,
|
||||
_mcl_hardness = 5,
|
||||
_mcl_copper_waxed_variant = "mcl_copper:waxed_block_cut",
|
||||
on_place = mcl_copper.on_place,
|
||||
--on_place = mcl_copper.on_place,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_copper:waxed_block_cut", {
|
||||
|
@ -155,7 +155,7 @@ minetest.register_node("mcl_copper:waxed_block_cut", {
|
|||
_mcl_blast_resistance = 6,
|
||||
_mcl_hardness = 5,
|
||||
_mcl_stripped_variant = "mcl_copper:block_cut",
|
||||
on_place = mcl_copper.on_place,
|
||||
--on_place = mcl_copper.on_place,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_copper:block_exposed_cut", {
|
||||
|
@ -169,7 +169,7 @@ minetest.register_node("mcl_copper:block_exposed_cut", {
|
|||
_mcl_hardness = 5,
|
||||
_mcl_copper_waxed_variant = "mcl_copper:waxed_block_exposed_cut",
|
||||
_mcl_stripped_variant = "mcl_copper:block_cut",
|
||||
on_place = mcl_copper.on_place,
|
||||
--on_place = mcl_copper.on_place,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_copper:waxed_block_exposed_cut", {
|
||||
|
@ -182,7 +182,7 @@ minetest.register_node("mcl_copper:waxed_block_exposed_cut", {
|
|||
_mcl_blast_resistance = 6,
|
||||
_mcl_hardness = 5,
|
||||
_mcl_stripped_variant = "mcl_copper:block_cut",
|
||||
on_place = mcl_copper.on_place,
|
||||
--on_place = mcl_copper.on_place,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_copper:block_weathered_cut", {
|
||||
|
@ -196,7 +196,7 @@ minetest.register_node("mcl_copper:block_weathered_cut", {
|
|||
_mcl_hardness = 5,
|
||||
_mcl_stripped_variant = "mcl_copper:block_exposed_cut",
|
||||
_mcl_copper_waxed_variant = "mcl_copper:waxed_block_weathered_cut",
|
||||
on_place = mcl_copper.on_place,
|
||||
--on_place = mcl_copper.on_place,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_copper:waxed_block_weathered_cut", {
|
||||
|
@ -209,7 +209,7 @@ minetest.register_node("mcl_copper:waxed_block_weathered_cut", {
|
|||
_mcl_blast_resistance = 6,
|
||||
_mcl_hardness = 5,
|
||||
_mcl_stripped_variant = "mcl_copper:block_exposed_cut",
|
||||
on_place = mcl_copper.on_place,
|
||||
--on_place = mcl_copper.on_place,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_copper:block_oxidized_cut", {
|
||||
|
@ -223,7 +223,7 @@ minetest.register_node("mcl_copper:block_oxidized_cut", {
|
|||
_mcl_hardness = 5,
|
||||
_mcl_stripped_variant = "mcl_copper:block_weathered_cut",
|
||||
_mcl_copper_waxed_variant = "mcl_copper:waxed_block_oxidized_cut",
|
||||
on_place = mcl_copper.on_place,
|
||||
--on_place = mcl_copper.on_place,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_copper:waxed_block_oxidized_cut", {
|
||||
|
@ -236,7 +236,7 @@ minetest.register_node("mcl_copper:waxed_block_oxidized_cut", {
|
|||
_mcl_blast_resistance = 6,
|
||||
_mcl_hardness = 5,
|
||||
_mcl_stripped_variant = "mcl_copper:block_weathered_cut",
|
||||
on_place = mcl_copper.on_place,
|
||||
--on_place = mcl_copper.on_place,
|
||||
})
|
||||
|
||||
mcl_stairs.register_slab("copper_cut", "mcl_copper:block_cut",
|
||||
|
|
|
@ -22,13 +22,13 @@ minetest.register_craftitem("mcl_honey:honeycomb", {
|
|||
local node_name = node.name
|
||||
|
||||
if minetest.get_modpath("mcl_copper") and mcl_copper then
|
||||
if string.find(node_name,"mcl_copper") ~= nil then
|
||||
if string.find(node_name,"waxed") == nil then
|
||||
local def = minetest.registered_nodes[node_name]
|
||||
|
||||
if def and def._mcl_copper_waxed_variant then
|
||||
-- wax the copper block.
|
||||
return mcl_copper.waxing_copper_block(pos, node, placer, itemstack)
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue