Merge pull request 'Honey and Beehives' (#2911) from honey into master

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2911
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
Reviewed-by: cora <cora@noreply.git.minetest.land>
This commit is contained in:
cora 2022-11-17 02:28:11 +00:00
commit f397ff83ff
34 changed files with 766 additions and 28 deletions

View File

@ -389,6 +389,40 @@ awards.register_achievement("mcl:theEndAgain", {
group = "End",
})
-- Triggered in mcl_beehives
awards.register_achievement("mcl:bee_our_guest", {
title = S("Bee Our Guest"),
description = S("Use a campfire to collect a bottle of honey from a beehive without aggrivating the bees inside."),
icon = "mcl_honey_honey_bottle.png",
type = "Advancement",
group = "Husbandry",
})
awards.register_achievement("mcl:total_beelocation", {
title = S("Total Beelocation"),
description = S("Move a bee nest, with 3 bees inside, using a silk touch enchanted tool."),
icon = "mcl_beehives_bee_nest_front_honey.png",
type = "Advancement",
group = "Husbandry",
})
-- Triggered in mcl_copper
awards.register_achievement("mcl:wax_on", {
title = S("Wax On"),
description = S("Apply honeycomb to a copper block to protect it from the elements."),
icon = "mcl_honey_honeycomb.png",
type = "Advancement",
group = "Husbandry",
})
awards.register_achievement("mcl:wax_off", {
title = S("Wax Off"),
description = S("Scrape wax off of a copper block."),
icon = "default_tool_stoneaxe.png",
type = "Advancement",
group = "Husbandry",
})
-- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.)
if non_pc_achievements then

View File

@ -87,3 +87,11 @@ Sky's The Limit=
Find the elytra and prepare to fly above and beyond!=
Free the End=
Kill the ender dragon. Good Luck!=
Bee Our Guest=
Use a campfire to collect a bottle of honey from a beehive without aggrivating the bees inside.=
Total Beelocation=
Move a bee nest, with 3 bees inside, using a silk touch enchanted tool.=
Wax On=
Apply honeycomb to a copper block to protect it from the elements.=
Wax Off=
Scrape wax off of a copper block.=

View File

@ -364,7 +364,7 @@ function mesecon.mvps_move_objects(pos, dir, nodestack)
for _, r in ipairs(mesecon.rules.alldirs) do
local adjpos = vector.add(np, r)
local adjnode = minetest.get_node(adjpos)
if minetest.registered_nodes[adjnode.name] and minetest.registered_nodes[adjnode.name].mvps_sticky then
if minetest.registered_nodes[adjnode.name] and minetest.registered_nodes[adjnode.name].mvps_sticky and adjnode.name == "mcl_core:slimeblock" then
local np = vector.add(obj:get_pos(), dir)
-- Reset acceleration of all objects before launching.

View File

@ -0,0 +1,230 @@
------------------
---- Beehives ----
------------------
-- Variables
local S = minetest.get_translator(minetest.get_current_modname())
-- Function to allow harvesting honey and honeycomb from the beehive and bee nest.
local honey_harvest = function(pos, node, player, itemstack, pointed_thing)
local inv = player:get_inventory()
local shears = player:get_wielded_item():get_name() == "mcl_tools:shears"
local bottle = player:get_wielded_item():get_name() == "mcl_potions:glass_bottle"
local beehive = "mcl_beehives:beehive"
local is_creative = minetest.is_creative_enabled(player:get_player_name())
if node.name == "mcl_beehives:beehive_5" then
beehive = "mcl_beehives:beehive"
elseif node.name == "mcl_beehives:bee_nest_5" then
beehive = "mcl_beehives:bee_nest"
end
local campfire_area = vector.offset(pos, 0, -5, 0)
local campfire = minetest.find_nodes_in_area(pos, campfire_area, "group:lit_campfire")
if bottle then
local honey = "mcl_honey:honey_bottle"
if inv:room_for_item("main", honey) then
node.name = beehive
minetest.set_node(pos, node)
inv:add_item("main", "mcl_honey:honey_bottle")
if not is_creative then
itemstack:take_item()
end
if not campfire[1] then mcl_util.deal_damage(player, 10) else awards.unlock(player:get_player_name(), "mcl:bee_our_guest") end
end
elseif shears then
minetest.add_item(pos, "mcl_honey:honeycomb 3")
node.name = beehive
minetest.set_node(pos, node)
if not campfire[1] then mcl_util.deal_damage(player, 10) end
end
end
-- Dig Function for Beehives
local dig_hive = function(pos, node, oldmetadata, digger)
local wield_item = digger:get_wielded_item()
local beehive = string.find(node.name, "mcl_beehives:beehive")
local beenest = string.find(node.name, "mcl_beehives:bee_nest")
local silk_touch = mcl_enchanting.has_enchantment(wield_item, "silk_touch")
local is_creative = minetest.is_creative_enabled(digger:get_player_name())
if beehive then
minetest.add_item(pos, "mcl_beehives:beehive")
if not silk_touch and not is_creative then mcl_util.deal_damage(digger, 10) end
elseif beenest then
if silk_touch or is_creative then
minetest.add_item(pos, "mcl_beehives:bee_nest")
awards.unlock(digger:get_player_name(), "mcl:total_beelocation")
else
mcl_util.deal_damage(digger, 10)
end
end
end
-- Beehive
minetest.register_node("mcl_beehives:beehive", {
description = S("Beehive"),
_doc_items_longdesc = S("Artificial bee nest."),
tiles = {
"mcl_beehives_beehive_end.png", "mcl_beehives_beehive_end.png",
"mcl_beehives_beehive_side.png", "mcl_beehives_beehive_side.png",
"mcl_beehives_beehive_side.png", "mcl_beehives_beehive_front.png",
},
paramtype2 = "facedir",
groups = { axey = 1, deco_block = 1, flammable = 0, fire_flammability = 5, material_wood = 1, beehive = 1 },
_mcl_blast_resistance = 0.6,
_mcl_hardness = 0.6,
drop = "",
after_dig_node = dig_hive,
})
for l = 1, 4 do
minetest.register_node("mcl_beehives:beehive_" .. l, {
description = S("Beehive"),
_doc_items_longdesc = S("Artificial bee nest."),
tiles = {
"mcl_beehives_beehive_end.png", "mcl_beehives_beehive_end.png",
"mcl_beehives_beehive_side.png", "mcl_beehives_beehive_side.png",
"mcl_beehives_beehive_side.png", "mcl_beehives_beehive_front.png",
},
paramtype2 = "facedir",
groups = { axey = 1, deco_block = 1, flammable = 0, fire_flammability = 5, material_wood = 1, not_in_creative_inventory = 1, beehive = 1 },
_mcl_blast_resistance = 0.6,
_mcl_hardness = 0.6,
drop = "",
after_dig_node = dig_hive,
})
end
minetest.register_node("mcl_beehives:beehive_5", {
description = S("Beehive"),
_doc_items_longdesc = S("Artificial bee nest."),
tiles = {
"mcl_beehives_beehive_end.png", "mcl_beehives_beehive_end.png",
"mcl_beehives_beehive_side.png", "mcl_beehives_beehive_side.png",
"mcl_beehives_beehive_side.png", "mcl_beehives_beehive_front_honey.png",
},
paramtype2 = "facedir",
groups = { axey = 1, deco_block = 1, flammable = 0, fire_flammability = 5, material_wood = 1, not_in_creative_inventory = 1, beehive = 1 },
_mcl_blast_resistance = 0.6,
_mcl_hardness = 0.6,
on_rightclick = honey_harvest,
drop = "",
after_dig_node = dig_hive,
})
-- Bee Nest
minetest.register_node("mcl_beehives:bee_nest", {
description = S("Bee Nest"),
_doc_items_longdesc = S("A naturally generating block that houses bees and a tasty treat...if you can get it."),
tiles = {
"mcl_beehives_bee_nest_top.png", "mcl_beehives_bee_nest_bottom.png",
"mcl_beehives_bee_nest_side.png", "mcl_beehives_bee_nest_side.png",
"mcl_beehives_bee_nest_side.png", "mcl_beehives_bee_nest_front.png",
},
paramtype2 = "facedir",
groups = { axey = 1, deco_block = 1, flammable = 0, fire_flammability = 30, bee_nest = 1 },
_mcl_blast_resistance = 0.3,
_mcl_hardness = 0.3,
drop = "",
after_dig_node = dig_hive,
})
for i = 1, 4 do
minetest.register_node("mcl_beehives:bee_nest_"..i, {
description = S("Bee Nest"),
_doc_items_longdesc = S("A naturally generating block that houses bees and a tasty treat...if you can get it."),
tiles = {
"mcl_beehives_bee_nest_top.png", "mcl_beehives_bee_nest_bottom.png",
"mcl_beehives_bee_nest_side.png", "mcl_beehives_bee_nest_side.png",
"mcl_beehives_bee_nest_side.png", "mcl_beehives_bee_nest_front.png",
},
paramtype2 = "facedir",
groups = { axey = 1, deco_block = 1, flammable = 0, fire_flammability = 30, not_in_creative_inventory = 1, bee_nest = 1 },
_mcl_blast_resistance = 0.3,
_mcl_hardness = 0.3,
drop = "",
after_dig_node = dig_hive,
})
end
minetest.register_node("mcl_beehives:bee_nest_5", {
description = S("Bee Nest"),
_doc_items_longdesc = S("A naturally generating block that houses bees and a tasty treat...if you can get it."),
tiles = {
"mcl_beehives_bee_nest_top.png", "mcl_beehives_bee_nest_bottom.png",
"mcl_beehives_bee_nest_side.png", "mcl_beehives_bee_nest_side.png",
"mcl_beehives_bee_nest_side.png", "mcl_beehives_bee_nest_front_honey.png",
},
paramtype2 = "facedir",
groups = { axey = 1, deco_block = 1, flammable = 0, fire_flammability = 30, not_in_creative_inventory = 1, bee_nest = 1 },
_mcl_blast_resistance = 0.3,
_mcl_hardness = 0.3,
on_rightclick = honey_harvest,
drop = "",
after_dig_node = dig_hive,
})
-- Crafting
minetest.register_craft({
output = "mcl_beehives:beehive",
recipe = {
{ "group:wood", "group:wood", "group:wood" },
{ "mcl_honey:honeycomb", "mcl_honey:honeycomb", "mcl_honey:honeycomb" },
{ "group:wood", "group:wood", "group:wood" },
},
})
-- Temporary ABM to update honey levels
minetest.register_abm({
label = "Update Beehive Honey Levels",
nodenames = "group:beehive",
interval = 500,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local beehive = "mcl_beehives:beehive"
if node.name == beehive then
node.name = beehive.."_1"
minetest.set_node(pos, node)
elseif node.name == beehive.."_1" then
node.name = beehive.."_2"
minetest.set_node(pos, node)
elseif node.name == beehive.."_2" then
node.name = beehive.."_3"
minetest.set_node(pos, node)
elseif node.name == beehive.."_3" then
node.name = beehive.."_4"
minetest.set_node(pos, node)
elseif node.name == beehive.."_4" then
node.name = beehive.."_5"
minetest.set_node(pos, node)
end
end,
})
minetest.register_abm({
label = "Update Bee Nest Honey Levels",
nodenames = "group:bee_nest",
interval = 500,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local beehive = "mcl_beehives:bee_nest"
if node.name == beehive then
node.name = beehive.."_1"
minetest.set_node(pos, node)
elseif node.name == beehive.."_1" then
node.name = beehive.."_2"
minetest.set_node(pos, node)
elseif node.name == beehive.."_2" then
node.name = beehive.."_3"
minetest.set_node(pos, node)
elseif node.name == beehive.."_3" then
node.name = beehive.."_4"
minetest.set_node(pos, node)
elseif node.name == beehive.."_4" then
node.name = beehive.."_5"
minetest.set_node(pos, node)
end
end,
})

View File

@ -0,0 +1,4 @@
Beehive=
Artificial bee nest.=
Bee Nest=
A naturally generating block that houses bees and a tasty treat...if you can get it.=

View File

@ -0,0 +1,4 @@
name = mcl_beehives
author = PrairieWind
description = Adds beehives and bee nests to MineClone 2.
depends = mcl_util, mcl_enchanting

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -47,6 +47,17 @@ minetest.register_craft({
},
})
local waxable_blocks = { "block", "block_cut", "block_exposed", "block_exposed_cut", "block_weathered", "block_weathered_cut", "block_oxidized", "block_oxidized_cut" }
for _, w in ipairs(waxable_blocks) do
minetest.register_craft({
output = "mcl_copper:waxed_"..w,
recipe = {
{ "mcl_copper:"..w, "mcl_honey:honeycomb" },
},
})
end
minetest.register_craft({
output = "mcl_copper:copper_ingot 4",
recipe = {
@ -74,3 +85,10 @@ minetest.register_craft({
recipe = "mcl_copper:stone_with_copper",
cooktime = 10,
})
minetest.register_craft({
type = "cooking",
output = "mcl_copper:block",
recipe = "mcl_copper:block_raw",
cooktime = 90,
})

View File

@ -12,6 +12,34 @@ local function register_oxidation_abm(abm_name, node_name, oxidized_variant)
})
end
function waxing_copper_block(pos, node, player, itemstack, convert_to)
if itemstack:get_name() == "mcl_honey:honeycomb" then
node.name = convert_to
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
else
return true
end
end
function scraping_copper_block(pos, node, player, itemstack, convert_to)
if itemstack:get_name():find("axe") then
node.name = convert_to
minetest.set_node(pos, node)
awards.unlock(player:get_player_name(), "mcl:wax_off")
if not minetest.is_creative_enabled(player:get_player_name()) then
local tool = itemstack:get_name()
local wear = mcl_autogroup.get_wear(tool, "axey")
itemstack:add_wear(wear)
end
else
return true
end
end
--[[
local stairs = {
{"stair", "exposed", "_inner", "cut_inner"},

View File

@ -1,6 +1,6 @@
local path = minetest.get_modpath("mcl_copper")
dofile(path .. "/functions.lua")
dofile(path .. "/nodes.lua")
dofile(path .. "/items.lua")
dofile(path .. "/crafting.lua")
dofile(path .. "/functions.lua")

View File

@ -2,36 +2,56 @@
A block of copper is mostly a decorative block.=
A block used for compact raw copper storage.=
Block of Copper=
Waxed Block of Copper=
Block of Raw Copper=
Copper Ingot=
Copper Ore=
Cut copper is a decorative block.=
Cut Copper=
Waxed Cut Copper=
Double Slab of Cut Copper=
Double Slab of Exposed Cut Copper=
Double Slab of Oxidized Cut Copper=
Double Slab of Weathered Cut Copper=
Waxed Double Slab of Cut Copper=
Waxed Double Slab of Exposed Cut Copper=
Waxed Double Slab of Oxidized Cut Copper=
Waxed Double Slab of Weathered Cut Copper=
Exposed copper is a decorative block.=
Exposed Copper=
Waxed Exposed Copper=
Exposed cut copper is a decorative block.=
Exposed Cut Copper=
Waxed Exposed Cut Copper=
Molten Raw Copper. It is used to craft blocks.=
Oxidized copper is a decorative block.=
Oxidized Copper=
Waxed Oxidized Copper=
Oxidized cut copper is a decorative block.=
Oxidized Cut Copper=
Waxed Oxidized Cut Copper=
Raw Copper. Mine a Copper Ore to get it.=
Raw Copper=
Slab of Cut Copper=
Slab of Exposed Cut Copper=
Slab of Oxidized Cut Copper=
Slab of Weathered Cut Copper=
Waxed Slab of Cut Copper=
Waxed Slab of Exposed Cut Copper=
Waxed Slab of Oxidized Cut Copper=
Waxed Slab of Weathered Cut Copper=
Some copper contained in stone, it is pretty common and can be found below sea level.=
Stairs of Cut Copper=
Stairs of Exposed Cut Copper=
Stairs of Oxidized Cut Copper=
Stairs of Weathered Cut Copper=
Waxed Stairs of Cut Copper=
Waxed Stairs of Exposed Cut Copper=
Waxed Stairs of Oxidized Cut Copper=
Waxed Stairs of Weathered Cut Copper=
Weathered copper is a decorative block.=
Weathered Copper=
Waxed Weathered Copper=
Weathered cut copper is a decorative block.=
Weathered Cut Copper=
Waxed Weathered Cut Copper=

View File

@ -35,6 +35,19 @@ minetest.register_node("mcl_copper:block", {
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 3,
on_rightclick = function(pos, node, player, itemstack) waxing_copper_block(pos, node, player, itemstack, "mcl_copper:waxed_block") end,
})
minetest.register_node("mcl_copper:waxed_block", {
description = S("Waxed Block of Copper"),
_doc_items_longdesc = S("A block of copper is mostly a decorative block."),
tiles = {"mcl_copper_block.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 3,
on_rightclick = function(pos, node, player, itemstack) scraping_copper_block(pos, node, player, itemstack, "mcl_copper:block") end,
})
minetest.register_node("mcl_copper:block_exposed", {
@ -47,18 +60,19 @@ minetest.register_node("mcl_copper:block_exposed", {
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
_mcl_anti_oxidation_varient = "mcl_copper:block",
on_rightclick = function(pos, node, player, itemstack) waxing_copper_block(pos, node, player, itemstack, "mcl_copper:waxed_block_exposed") end,
})
minetest.register_node("mcl_copper:block_oxidized", {
description = S("Oxidized Copper"),
_doc_items_longdesc = S("Oxidized copper is a decorative block."),
tiles = {"mcl_copper_oxidized.png"},
minetest.register_node("mcl_copper:waxed_block_exposed", {
description = S("Waxed Exposed Copper"),
_doc_items_longdesc = S("Exposed copper is a decorative block."),
tiles = {"mcl_copper_exposed.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
_mcl_anti_oxidation_varient = "mcl_copper:block_weathered",
on_rightclick = function(pos, node, player, itemstack) scraping_copper_block(pos, node, player, itemstack, "mcl_copper:block") end,
})
minetest.register_node("mcl_copper:block_weathered", {
@ -71,6 +85,44 @@ minetest.register_node("mcl_copper:block_weathered", {
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
_mcl_anti_oxidation_varient = "mcl_copper:block_exposed",
on_rightclick = function(pos, node, player, itemstack) waxing_copper_block(pos, node, player, itemstack, "mcl_copper:waxed_block_weathered") end,
})
minetest.register_node("mcl_copper:waxed_block_weathered", {
description = S("Waxed Weathered Copper"),
_doc_items_longdesc = S("Weathered copper is a decorative block."),
tiles = {"mcl_copper_weathered.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
on_rightclick = function(pos, node, player, itemstack) scraping_copper_block(pos, node, player, itemstack, "mcl_copper:block_exposed") end,
})
minetest.register_node("mcl_copper:block_oxidized", {
description = S("Oxidized Copper"),
_doc_items_longdesc = S("Oxidized copper is a decorative block."),
tiles = {"mcl_copper_oxidized.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
_mcl_anti_oxidation_varient = "mcl_copper:block_weathered",
on_rightclick = function(pos, node, player, itemstack) waxing_copper_block(pos, node, player, itemstack, "mcl_copper:waxed_block_oxidized") end,
})
minetest.register_node("mcl_copper:waxed_block_oxidized", {
description = S("Waxed Oxidized Copper"),
_doc_items_longdesc = S("Oxidized copper is a decorative block."),
tiles = {"mcl_copper_oxidized.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
on_rightclick = function(pos, node, player, itemstack) scraping_copper_block(pos, node, player, itemstack, "mcl_copper:block_weather") end,
})
minetest.register_node("mcl_copper:block_cut", {
@ -82,6 +134,19 @@ minetest.register_node("mcl_copper:block_cut", {
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
on_rightclick = function(pos, node, player, itemstack) waxing_copper_block(pos, node, player, itemstack, "mcl_copper:waxed_block_cut") end,
})
minetest.register_node("mcl_copper:waxed_block_cut", {
description = S("Waxed Cut Copper"),
_doc_items_longdesc = S("Cut copper is a decorative block."),
tiles = {"mcl_copper_block_cut.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
on_rightclick = function(pos, node, player, itemstack) scraping_copper_block(pos, node, player, itemstack, "mcl_copper:block_cut") end,
})
minetest.register_node("mcl_copper:block_exposed_cut", {
@ -94,18 +159,19 @@ minetest.register_node("mcl_copper:block_exposed_cut", {
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
_mcl_anti_oxidation_varient = "mcl_copper:block_cut",
on_rightclick = function(pos, node, player, itemstack) waxing_copper_block(pos, node, player, itemstack, "mcl_copper:waxed_block_exposed_cut") end,
})
minetest.register_node("mcl_copper:block_oxidized_cut", {
description = S("Oxidized Cut Copper"),
_doc_items_longdesc = S("Oxidized cut copper is a decorative block."),
tiles = {"mcl_copper_oxidized_cut.png"},
minetest.register_node("mcl_copper:waxed_block_exposed_cut", {
description = S("Waxed Exposed Cut Copper"),
_doc_items_longdesc = S("Exposed cut copper is a decorative block."),
tiles = {"mcl_copper_exposed_cut.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
_mcl_anti_oxidation_varient = "mcl_copper:block_weathered_cut",
on_rightclick = function(pos, node, player, itemstack) scraping_copper_block(pos, node, player, itemstack, "mcl_copper:block_cut") end,
})
minetest.register_node("mcl_copper:block_weathered_cut", {
@ -118,6 +184,44 @@ minetest.register_node("mcl_copper:block_weathered_cut", {
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
_mcl_anti_oxidation_varient = "mcl_copper:block_exposed_cut",
on_rightclick = function(pos, node, player, itemstack) waxing_copper_block(pos, node, player, itemstack, "mcl_copper:waxed_block_weathered_cut") end,
})
minetest.register_node("mcl_copper:waxed_block_weathered_cut", {
description = S("Waxed Weathered Cut Copper"),
_doc_items_longdesc = S("Weathered cut copper is a decorative block."),
tiles = {"mcl_copper_weathered_cut.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
on_rightclick = function(pos, node, player, itemstack) scraping_copper_block(pos, node, player, itemstack, "mcl_copper:block_exposed_cut") end,
})
minetest.register_node("mcl_copper:block_oxidized_cut", {
description = S("Oxidized Cut Copper"),
_doc_items_longdesc = S("Oxidized cut copper is a decorative block."),
tiles = {"mcl_copper_oxidized_cut.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
_mcl_anti_oxidation_varient = "mcl_copper:block_weathered_cut",
on_rightclick = function(pos, node, player, itemstack) waxing_copper_block(pos, node, player, itemstack, "mcl_copper:waxed_block_oxidized_cut") end,
})
minetest.register_node("mcl_copper:waxed_block_oxidized_cut", {
description = S("Waxed Oxidized Cut Copper"),
_doc_items_longdesc = S("Oxidized cut copper is a decorative block."),
tiles = {"mcl_copper_oxidized_cut.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
on_rightclick = function(pos, node, player, itemstack) scraping_copper_block(pos, node, player, itemstack, "mcl_copper:block_weathered_cut") end,
})
mcl_stairs.register_slab("copper_cut", "mcl_copper:block_cut",
@ -127,6 +231,13 @@ mcl_stairs.register_slab("copper_cut", "mcl_copper:block_cut",
nil, nil, nil,
S("Double Slab of Cut Copper"))
mcl_stairs.register_slab("waxed_copper_cut", "mcl_copper:waxed_block_cut",
{pickaxey = 2},
{"mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png"},
S("Waxed Slab of Cut Copper"),
nil, nil, nil,
S("Waxed Double Slab of Cut Copper"))
mcl_stairs.register_slab("copper_exposed_cut", "mcl_copper:block_exposed_cut",
{pickaxey = 2},
{"mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png"},
@ -134,12 +245,12 @@ mcl_stairs.register_slab("copper_exposed_cut", "mcl_copper:block_exposed_cut",
nil, nil, nil,
S("Double Slab of Exposed Cut Copper"))
mcl_stairs.register_slab("copper_oxidized_cut", "mcl_copper:block_oxidized_cut",
mcl_stairs.register_slab("waxed_copper_exposed_cut", "mcl_copper:waxed_block_exposed_cut",
{pickaxey = 2},
{"mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png"},
S("Slab of Oxidized Cut Copper"),
{"mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png"},
S("Waxed Slab of Exposed Cut Copper"),
nil, nil, nil,
S("Double Slab of Oxidized Cut Copper"))
S("Waxed Double Slab of Exposed Cut Copper"))
mcl_stairs.register_slab("copper_weathered_cut", "mcl_copper:block_weathered_cut",
{pickaxey = 2},
@ -148,6 +259,27 @@ mcl_stairs.register_slab("copper_weathered_cut", "mcl_copper:block_weathered_cut
nil, nil, nil,
S("Double Slab of Weathered Cut Copper"))
mcl_stairs.register_slab("waxed_copper_weathered_cut", "mcl_copper:waxed_block_weathered_cut",
{pickaxey = 2},
{"mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png"},
S("Waxed Slab of Weathered Cut Copper"),
nil, nil, nil,
S("Waxed Double Slab of Weathered Cut Copper"))
mcl_stairs.register_slab("copper_oxidized_cut", "mcl_copper:block_oxidized_cut",
{pickaxey = 2},
{"mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png"},
S("Slab of Oxidized Cut Copper"),
nil, nil, nil,
S("Double Slab of Oxidized Cut Copper"))
mcl_stairs.register_slab("waxed_copper_oxidized_cut", "mcl_copper:waxed_block_oxidized_cut",
{pickaxey = 2},
{"mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png"},
S("Waxed Slab of Oxidized Cut Copper"),
nil, nil, nil,
S("Waxed Double Slab of Oxidized Cut Copper"))
mcl_stairs.register_stair("copper_cut", "mcl_copper:block_cut",
{pickaxey = 2},
{"mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png"},
@ -155,6 +287,13 @@ mcl_stairs.register_stair("copper_cut", "mcl_copper:block_cut",
nil, 6, nil,
"woodlike")
mcl_stairs.register_stair("waxed_copper_cut", "mcl_copper:waxed_block_cut",
{pickaxey = 2},
{"mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png"},
S("Waxed Stairs of Cut Copper"),
nil, 6, nil,
"woodlike")
mcl_stairs.register_stair("copper_exposed_cut", "mcl_copper:block_exposed_cut",
{pickaxey = 2},
{"mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png"},
@ -162,10 +301,10 @@ mcl_stairs.register_stair("copper_exposed_cut", "mcl_copper:block_exposed_cut",
nil, 6, nil,
"woodlike")
mcl_stairs.register_stair("copper_oxidized_cut", "mcl_copper:block_oxidized_cut",
mcl_stairs.register_stair("waxed_copper_exposed_cut", "mcl_copper:waxed_block_exposed_cut",
{pickaxey = 2},
{"mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png"},
S("Stairs of Oxidized Cut Copper"),
{"mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png"},
S("Waxed Stairs of Exposed Cut Copper"),
nil, 6, nil,
"woodlike")
@ -175,3 +314,24 @@ mcl_stairs.register_stair("copper_weathered_cut", "mcl_copper:block_weathered_cu
S("Stairs of Weathered Cut Copper"),
nil, 6, nil,
"woodlike")
mcl_stairs.register_stair("waxed_copper_weathered_cut", "mcl_copper:waxed_block_weathered_cut",
{pickaxey = 2},
{"mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png"},
S("Waxed Stairs of Weathered Cut Copper"),
nil, 6, nil,
"woodlike")
mcl_stairs.register_stair("copper_oxidized_cut", "mcl_copper:block_oxidized_cut",
{pickaxey = 2},
{"mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png"},
S("Stairs of Oxidized Cut Copper"),
nil, 6, nil,
"woodlike")
mcl_stairs.register_stair("waxed_copper_oxidized_cut", "mcl_copper:waxed_block_oxidized_cut",
{pickaxey = 2},
{"mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png"},
S("Waxed Stairs of Oxidized Cut Copper"),
nil, 6, nil,
"woodlike")

View File

@ -0,0 +1,136 @@
---------------
---- Honey ----
---------------
-- Variables
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}}
-- Honeycomb
minetest.register_craftitem("mcl_honey:honeycomb", {
description = S("Honeycomb"),
_doc_items_longdesc = S("Used to craft beehives and protect copper blocks from further oxidation."),
_doc_items_usagehelp = S("Use on copper blocks to prevent further oxidation."),
inventory_image = "mcl_honey_honeycomb.png",
groups = { craftitem = 1 },
})
minetest.register_node("mcl_honey:honeycomb_block", {
description = S("Honeycomb Block"),
_doc_items_longdesc = S("Honeycomb Block. Used as a decoration."),
tiles = {
"mcl_honey_honeycomb_block.png"
},
groups = { handy = 1, deco_block = 1 },
_mcl_blast_resistance = 0.6,
_mcl_hardness = 0.6,
})
-- Honey
minetest.register_craftitem("mcl_honey:honey_bottle", {
description = S("Honey Bottle"),
_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."),
inventory_image = "mcl_honey_honey_bottle.png",
groups = { craftitem = 1, food = 3, eatable = 6, can_eat_when_full=1 },
on_place = minetest.item_eat(6, "mcl_potions:glass_bottle"),
on_secondary_use = minetest.item_eat(6, "mcl_potions:glass_bottle"),
_mcl_saturation = 1.2,
stack_max = 16,
})
minetest.register_node("mcl_honey:honey_block", {
description = S("Honey Block"),
_doc_items_longdesc = S("Honey Block. Used as a decoration and in redstone. Is sticky on some sides."),
tiles = {"mcl_honey_block_side.png"},
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 },
paramtype = "light",
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.4, -0.4, -0.4, 0.4, 0.4, 0.4},
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
}
},
selection_box = {
type = "regular",
},
_mcl_blast_resistance = 0,
_mcl_hardness = 0,
mvps_sticky = function(pos, node, piston_pos)
local connected = {}
for n, v in ipairs(alldirs) do
local neighbor_pos = vector.add(pos, v)
local neighbor_node = minetest.get_node(neighbor_pos)
if neighbor_node then
if neighbor_node.name == "ignore" then
minetest.get_voxel_manip():read_from_map(neighbor_pos, neighbor_pos)
neighbor_node = minetest.get_node(neighbor_pos)
end
local name = neighbor_node.name
if name ~= "air" and name ~= "ignore" and not mesecon.mvps_unsticky[name] then
local piston, piston_side, piston_up, piston_down = false, false, false, false
if name == "mesecons_pistons:piston_sticky_off" or name == "mesecons_pistons:piston_normal_off" then
piston, piston_side = true, true
elseif name == "mesecons_pistons:piston_up_sticky_off" or name == "mesecons_pistons:piston_up_normal_off" then
piston, piston_up = true, true
elseif name == "mesecons_pistons:piston_down_sticky_off" or name == "mesecons_pistons:piston_down_normal_off" then
piston, piston_down = true, true
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 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
-- Loopback to the same piston! Preventing unwanted behavior:
return {}, true
end
end
table.insert(connected, neighbor_pos)
end
end
end
end
return connected, false
end,
})
-- Crafting
minetest.register_craft({
output = "mcl_honey:honeycomb_block",
recipe = {
{ "mcl_honey:honeycomb", "mcl_honey:honeycomb" },
{ "mcl_honey:honeycomb", "mcl_honey:honeycomb" },
},
})
minetest.register_craft({
output = "mcl_honey:honey_block",
recipe = {
{ "mcl_honey:honey_bottle", "mcl_honey:honey_bottle" },
{ "mcl_honey:honey_bottle", "mcl_honey:honey_bottle" },
},
replacements = {
{ "mcl_honey:honey_bottle", "mcl_potions:glass_bottle" },
{ "mcl_honey:honey_bottle", "mcl_potions:glass_bottle" },
{ "mcl_honey:honey_bottle", "mcl_potions:glass_bottle" },
{ "mcl_honey:honey_bottle", "mcl_potions:glass_bottle" },
},
})
minetest.register_craft({
output = "mcl_honey:honey_bottle 4",
recipe = {
{ "mcl_potions:glass_bottle", "mcl_potions:glass_bottle", "mcl_honey:honey_block" },
{ "mcl_potions:glass_bottle", "mcl_potions:glass_bottle", "" },
},
})
minetest.register_craft({
type = "shapeless",
output = "mcl_core:sugar 3",
recipe = { "mcl_honey:honey_bottle" },
replacements = {
{ "mcl_honey:honey_bottle", "mcl_potions:glass_bottle" },
},
})

View File

@ -0,0 +1,10 @@
Honeycomb=
Used to craft beehives and protect copper blocks from further oxidation.=
Use on copper blocks to prevent further oxidation.=
Honeycomb Block=
Honeycomb Block. Used as a decoration.=
Honey Bottle=
Honey Bottle is used to craft honey blocks and to restore hunger points.=
Drinking will restore 6 hunger points. Can also be used to craft honey blocks.=
Honey Block=
Honey Block. Used as a decoration and in redstone. Is sticky on some sides.=

View File

@ -0,0 +1,4 @@
name = mcl_honey
author = PrairieWind
description = MineClone 2 mod that adds honey and honeycomb and the respective block versions.
depends = mesecons_mvps

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 830 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 830 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -3160,7 +3160,48 @@ local function register_decorations()
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 16,
--[[noise_params = {
offset = 0.01,
scale = 0.00001,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.33
},]]--
fill_ratio = 0.0002,
biomes = {"FlowerForest"},
y_min = 1,
y_max = mcl_vars.mg_overworld_max,
schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic_bee_nest.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
spawn_by = "group:flower",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 16,
--[[noise_params = {
offset = 0.01,
scale = 0.00001,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.33
},]]--
fill_ratio = 0.00002,
biomes = {"Forest"},
y_min = 1,
y_max = mcl_vars.mg_overworld_max,
schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic_bee_nest.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
spawn_by = "group:flower",
})
-- Rare balloon oak
minetest.register_decoration({
@ -3269,7 +3310,27 @@ local function register_decorations()
flags = "place_center_x, place_center_z, force_placement",
rotation = "random",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"mcl_mud:mud"},
sidelen = 80,
--[[noise_params = {
offset = 0.01,
scale = 0.00001,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.33
},]]--
fill_ratio = 0.0005,
biomes = {"MangroveSwamp"},
y_min = 1,
y_max = mcl_vars.mg_overworld_max,
schematic = mod_mcl_mangrove.."/schematics/mcl_mangrove_bee_nest.mts",
flags = "place_center_x, place_center_z, force_placement",
rotation = "random",
spawn_by = "group:flower",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"mcl_mud:mud"},
@ -3630,6 +3691,27 @@ local function register_decorations()
schematic = mod_mcl_core.."/schematics/mcl_core_birch.mts",
flags = "place_center_x, place_center_z",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 16,
--[[noise_params = {
offset = 0.01,
scale = 0.00001,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.33
},]]--
fill_ratio = 0.00002,
biomes = {"Forest", "BirchForest", "BirchForestM"},
y_min = 1,
y_max = mcl_vars.mg_overworld_max,
schematic = mod_mcl_core.."/schematics/mcl_core_birch_bee_nest.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
spawn_by = "group:flower",
})
-- Dark Oak
minetest.register_decoration({