Made Requested changes from Pull Request.
parent
2ca0e286fe
commit
e285079507
|
@ -1,6 +1,6 @@
|
||||||
--local deepslate_mod = minetest.get_modpath("mcl_deepslate")
|
--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)
|
function mcl_copper.on_place (itemstack, placer, pointed_thing)
|
||||||
if pointed_thing.type ~= "node" then
|
if pointed_thing.type ~= "node" then
|
||||||
return itemstack
|
return itemstack
|
||||||
|
@ -27,6 +27,7 @@ function mcl_copper.on_place (itemstack, placer, pointed_thing)
|
||||||
|
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
--]]
|
||||||
|
|
||||||
local function register_oxidation_abm(abm_name, node_name, oxidized_variant)
|
local function register_oxidation_abm(abm_name, node_name, oxidized_variant)
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
|
@ -41,27 +42,23 @@ local function register_oxidation_abm(abm_name, node_name, oxidized_variant)
|
||||||
end
|
end
|
||||||
|
|
||||||
function mcl_copper.waxing_copper_block(pos, node, player, itemstack)
|
function mcl_copper.waxing_copper_block(pos, node, player, itemstack)
|
||||||
if itemstack:get_name() == "mcl_honey:honeycomb" then
|
-- prevent modification of protected nodes.
|
||||||
-- prevent modification of protected nodes.
|
if mcl_util.check_position_protection(pos, player) then
|
||||||
if mcl_util.check_position_protection(pos, player) then
|
return
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local def = minetest.registered_nodes[node.name]
|
|
||||||
|
|
||||||
if def and def._mcl_copper_waxed_variant then
|
|
||||||
node.name = def._mcl_copper_waxed_variant
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.set_node(pos, node)
|
|
||||||
awards.unlock(player:get_player_name(), "mcl:wax_on")
|
|
||||||
if not minetest.is_creative_enabled(player:get_player_name()) then
|
|
||||||
itemstack:take_item()
|
|
||||||
end
|
|
||||||
return itemstack
|
|
||||||
else
|
|
||||||
return -- changed to work with mcl_util.call_on_rightclick()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local def = minetest.registered_nodes[node.name]
|
||||||
|
|
||||||
|
if def and def._mcl_copper_waxed_variant then
|
||||||
|
node.name = def._mcl_copper_waxed_variant
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.set_node(pos, node)
|
||||||
|
awards.unlock(player:get_player_name(), "mcl:wax_on")
|
||||||
|
if not minetest.is_creative_enabled(player:get_player_name()) then
|
||||||
|
itemstack:take_item()
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
|
|
|
@ -35,7 +35,7 @@ minetest.register_node("mcl_copper:block", {
|
||||||
_mcl_blast_resistance = 6,
|
_mcl_blast_resistance = 6,
|
||||||
_mcl_hardness = 3,
|
_mcl_hardness = 3,
|
||||||
_mcl_copper_waxed_variant = "mcl_copper:waxed_block",
|
_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", {
|
minetest.register_node("mcl_copper:waxed_block", {
|
||||||
|
@ -48,7 +48,7 @@ minetest.register_node("mcl_copper:waxed_block", {
|
||||||
_mcl_blast_resistance = 6,
|
_mcl_blast_resistance = 6,
|
||||||
_mcl_hardness = 3,
|
_mcl_hardness = 3,
|
||||||
_mcl_stripped_variant = "mcl_copper:block",
|
_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", {
|
minetest.register_node("mcl_copper:block_exposed", {
|
||||||
|
@ -62,7 +62,7 @@ minetest.register_node("mcl_copper:block_exposed", {
|
||||||
_mcl_hardness = 5,
|
_mcl_hardness = 5,
|
||||||
_mcl_copper_waxed_variant = "mcl_copper:waxed_block_exposed",
|
_mcl_copper_waxed_variant = "mcl_copper:waxed_block_exposed",
|
||||||
_mcl_stripped_variant = "mcl_copper:block",
|
_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", {
|
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_blast_resistance = 6,
|
||||||
_mcl_hardness = 5,
|
_mcl_hardness = 5,
|
||||||
_mcl_stripped_variant = "mcl_copper:block",
|
_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", {
|
minetest.register_node("mcl_copper:block_weathered", {
|
||||||
|
@ -89,7 +89,7 @@ minetest.register_node("mcl_copper:block_weathered", {
|
||||||
_mcl_hardness = 5,
|
_mcl_hardness = 5,
|
||||||
_mcl_copper_waxed_variant = "mcl_copper:waxed_block_weathered",
|
_mcl_copper_waxed_variant = "mcl_copper:waxed_block_weathered",
|
||||||
_mcl_stripped_variant = "mcl_copper:block_exposed",
|
_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", {
|
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_blast_resistance = 6,
|
||||||
_mcl_hardness = 5,
|
_mcl_hardness = 5,
|
||||||
_mcl_stripped_variant = "mcl_copper:block_exposed",
|
_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", {
|
minetest.register_node("mcl_copper:block_oxidized", {
|
||||||
|
@ -116,7 +116,7 @@ minetest.register_node("mcl_copper:block_oxidized", {
|
||||||
_mcl_hardness = 5,
|
_mcl_hardness = 5,
|
||||||
_mcl_copper_waxed_variant = "mcl_copper:waxed_block_oxidized",
|
_mcl_copper_waxed_variant = "mcl_copper:waxed_block_oxidized",
|
||||||
_mcl_stripped_variant = "mcl_copper:block_weathered",
|
_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", {
|
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_blast_resistance = 6,
|
||||||
_mcl_hardness = 5,
|
_mcl_hardness = 5,
|
||||||
_mcl_stripped_variant = "mcl_copper:block_weathered",
|
_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", {
|
minetest.register_node("mcl_copper:block_cut", {
|
||||||
|
@ -142,7 +142,7 @@ minetest.register_node("mcl_copper:block_cut", {
|
||||||
_mcl_blast_resistance = 6,
|
_mcl_blast_resistance = 6,
|
||||||
_mcl_hardness = 5,
|
_mcl_hardness = 5,
|
||||||
_mcl_copper_waxed_variant = "mcl_copper:waxed_block_cut",
|
_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", {
|
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_blast_resistance = 6,
|
||||||
_mcl_hardness = 5,
|
_mcl_hardness = 5,
|
||||||
_mcl_stripped_variant = "mcl_copper:block_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:block_exposed_cut", {
|
minetest.register_node("mcl_copper:block_exposed_cut", {
|
||||||
|
@ -169,7 +169,7 @@ minetest.register_node("mcl_copper:block_exposed_cut", {
|
||||||
_mcl_hardness = 5,
|
_mcl_hardness = 5,
|
||||||
_mcl_copper_waxed_variant = "mcl_copper:waxed_block_exposed_cut",
|
_mcl_copper_waxed_variant = "mcl_copper:waxed_block_exposed_cut",
|
||||||
_mcl_stripped_variant = "mcl_copper:block_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", {
|
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_blast_resistance = 6,
|
||||||
_mcl_hardness = 5,
|
_mcl_hardness = 5,
|
||||||
_mcl_stripped_variant = "mcl_copper:block_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:block_weathered_cut", {
|
minetest.register_node("mcl_copper:block_weathered_cut", {
|
||||||
|
@ -196,7 +196,7 @@ minetest.register_node("mcl_copper:block_weathered_cut", {
|
||||||
_mcl_hardness = 5,
|
_mcl_hardness = 5,
|
||||||
_mcl_stripped_variant = "mcl_copper:block_exposed_cut",
|
_mcl_stripped_variant = "mcl_copper:block_exposed_cut",
|
||||||
_mcl_copper_waxed_variant = "mcl_copper:waxed_block_weathered_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", {
|
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_blast_resistance = 6,
|
||||||
_mcl_hardness = 5,
|
_mcl_hardness = 5,
|
||||||
_mcl_stripped_variant = "mcl_copper:block_exposed_cut",
|
_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", {
|
minetest.register_node("mcl_copper:block_oxidized_cut", {
|
||||||
|
@ -223,7 +223,7 @@ minetest.register_node("mcl_copper:block_oxidized_cut", {
|
||||||
_mcl_hardness = 5,
|
_mcl_hardness = 5,
|
||||||
_mcl_stripped_variant = "mcl_copper:block_weathered_cut",
|
_mcl_stripped_variant = "mcl_copper:block_weathered_cut",
|
||||||
_mcl_copper_waxed_variant = "mcl_copper:waxed_block_oxidized_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", {
|
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_blast_resistance = 6,
|
||||||
_mcl_hardness = 5,
|
_mcl_hardness = 5,
|
||||||
_mcl_stripped_variant = "mcl_copper:block_weathered_cut",
|
_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",
|
mcl_stairs.register_slab("copper_cut", "mcl_copper:block_cut",
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
-- Variables
|
-- Variables
|
||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
local alldirs = {{x=0,y=0,z=1}, {x=1,y=0,z=0}, {x=0,y=0,z=-1}, {x=-1,y=0,z=0}, {x=0,y=-1,z=0}, {x=0,y=1,z=0}}
|
local alldirs = { { x = 0, y = 0, z = 1 }, { x = 1, y = 0, z = 0 }, { x = 0, y = 0, z = -1 }, { x = -1, y = 0, z = 0 }, { x = 0, y = -1, z = 0 }, { x = 0, y = 1, z = 0 } }
|
||||||
|
|
||||||
-- Honeycomb
|
-- Honeycomb
|
||||||
minetest.register_craftitem("mcl_honey:honeycomb", {
|
minetest.register_craftitem("mcl_honey:honeycomb", {
|
||||||
|
@ -22,11 +22,11 @@ minetest.register_craftitem("mcl_honey:honeycomb", {
|
||||||
local node_name = node.name
|
local node_name = node.name
|
||||||
|
|
||||||
if minetest.get_modpath("mcl_copper") and mcl_copper then
|
if minetest.get_modpath("mcl_copper") and mcl_copper then
|
||||||
if string.find(node_name,"mcl_copper") ~= nil then
|
local def = minetest.registered_nodes[node_name]
|
||||||
if string.find(node_name,"waxed") == nil then
|
|
||||||
-- wax the copper block.
|
if def and def._mcl_copper_waxed_variant then
|
||||||
return mcl_copper.waxing_copper_block(pos, node, placer, itemstack)
|
-- wax the copper block.
|
||||||
end
|
return mcl_copper.waxing_copper_block(pos, node, placer, itemstack)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
@ -40,10 +40,10 @@ minetest.register_node("mcl_honey:honeycomb_block", {
|
||||||
},
|
},
|
||||||
groups = { handy = 1, deco_block = 1 },
|
groups = { handy = 1, deco_block = 1 },
|
||||||
sounds = {
|
sounds = {
|
||||||
dig = {name="slimenodes_dug", gain=0.6, pitch=1.2},
|
dig = { name = "slimenodes_dug", gain = 0.6, pitch = 1.2 },
|
||||||
dug = {name="slimenodes_dug", gain=0.6},
|
dug = { name = "slimenodes_dug", gain = 0.6 },
|
||||||
place = {name="slimenodes_place", gain=0.6},
|
place = { name = "slimenodes_place", gain = 0.6 },
|
||||||
footstep = {name="slimenodes_step", gain=0.3},
|
footstep = { name = "slimenodes_step", gain = 0.3 },
|
||||||
},
|
},
|
||||||
_mcl_blast_resistance = 0.6,
|
_mcl_blast_resistance = 0.6,
|
||||||
_mcl_hardness = 0.6,
|
_mcl_hardness = 0.6,
|
||||||
|
@ -55,7 +55,7 @@ minetest.register_craftitem("mcl_honey:honey_bottle", {
|
||||||
_doc_items_longdesc = S("Honey Bottle is used to craft honey blocks and to restore hunger points."),
|
_doc_items_longdesc = S("Honey Bottle is used to craft honey blocks and to restore hunger points."),
|
||||||
_doc_items_usagehelp = S("Drinking will restore 6 hunger points. Can also be used to craft honey blocks."),
|
_doc_items_usagehelp = S("Drinking will restore 6 hunger points. Can also be used to craft honey blocks."),
|
||||||
inventory_image = "mcl_honey_honey_bottle.png",
|
inventory_image = "mcl_honey_honey_bottle.png",
|
||||||
groups = { craftitem = 1, food = 3, eatable = 6, can_eat_when_full=1 },
|
groups = { craftitem = 1, food = 3, eatable = 6, can_eat_when_full = 1 },
|
||||||
on_place = minetest.item_eat(6, "mcl_potions:glass_bottle"),
|
on_place = minetest.item_eat(6, "mcl_potions:glass_bottle"),
|
||||||
on_secondary_use = minetest.item_eat(6, "mcl_potions:glass_bottle"),
|
on_secondary_use = minetest.item_eat(6, "mcl_potions:glass_bottle"),
|
||||||
_mcl_saturation = 1.2,
|
_mcl_saturation = 1.2,
|
||||||
|
@ -65,21 +65,21 @@ minetest.register_craftitem("mcl_honey:honey_bottle", {
|
||||||
minetest.register_node("mcl_honey:honey_block", {
|
minetest.register_node("mcl_honey:honey_block", {
|
||||||
description = S("Honey Block"),
|
description = S("Honey Block"),
|
||||||
_doc_items_longdesc = S("Honey Block. Used as a decoration and in redstone. Is sticky on some sides."),
|
_doc_items_longdesc = S("Honey Block. Used as a decoration and in redstone. Is sticky on some sides."),
|
||||||
tiles = {"mcl_honey_block_side.png"},
|
tiles = { "mcl_honey_block_side.png" },
|
||||||
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true,
|
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true,
|
||||||
groups = { handy = 1, deco_block = 1, fall_damage_add_percent = -80 },
|
groups = { handy = 1, deco_block = 1, fall_damage_add_percent = -80 },
|
||||||
sounds = {
|
sounds = {
|
||||||
dug = {name="slimenodes_dug", gain=0.6},
|
dug = { name = "slimenodes_dug", gain = 0.6 },
|
||||||
place = {name="slimenodes_place", gain=0.6},
|
place = { name = "slimenodes_place", gain = 0.6 },
|
||||||
footstep = {name="slimenodes_step", gain=0.3},
|
footstep = { name = "slimenodes_step", gain = 0.3 },
|
||||||
},
|
},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.4, -0.4, -0.4, 0.4, 0.4, 0.4},
|
{ -0.4, -0.4, -0.4, 0.4, 0.4, 0.4 },
|
||||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
{ -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selection_box = {
|
selection_box = {
|
||||||
|
@ -107,7 +107,7 @@ minetest.register_node("mcl_honey:honey_block", {
|
||||||
elseif name == "mesecons_pistons:piston_down_sticky_off" or name == "mesecons_pistons:piston_down_normal_off" then
|
elseif name == "mesecons_pistons:piston_down_sticky_off" or name == "mesecons_pistons:piston_down_normal_off" then
|
||||||
piston, piston_down = true, true
|
piston, piston_down = true, true
|
||||||
end
|
end
|
||||||
if not( (piston_side and (n-1==neighbor_node.param2)) or (piston_up and (n==5)) or (piston_down and (n==6)) ) then
|
if not ((piston_side and (n - 1 == neighbor_node.param2)) or (piston_up and (n == 5)) or (piston_down and (n == 6))) then
|
||||||
if piston and piston_pos then
|
if piston and piston_pos then
|
||||||
if piston_pos.x == neighbor_pos.x and piston_pos.y == neighbor_pos.y and piston_pos.z == neighbor_pos.z then
|
if piston_pos.x == neighbor_pos.x and piston_pos.y == neighbor_pos.y and piston_pos.z == neighbor_pos.z then
|
||||||
-- Loopback to the same piston! Preventing unwanted behavior:
|
-- Loopback to the same piston! Preventing unwanted behavior:
|
||||||
|
|
Loading…
Reference in New Issue