Merge branch 'master' into cocoa_pod_fixes

This commit is contained in:
FossFanatic 2022-11-18 08:27:19 +00:00
commit dec2c2bade
57 changed files with 2710 additions and 1697 deletions

@ -30,6 +30,8 @@ local DEFAULT_WALK_CHANCE = 33 -- chance to walk in percent, if no player nearby
local PLAYER_SCAN_INTERVAL = 5 -- every X seconds, villager looks for players nearby
local PLAYER_SCAN_RADIUS = 4 -- scan radius for looking for nearby players
local RESETTLE_DISTANCE = 100 -- If a mob is transported this far from home, it gives up bed and job and resettles
local PATHFINDING = "gowp"
--[=======[ TRADING ]=======]
@ -885,11 +887,18 @@ local function has_golem(pos)
end
end
local function monsters_near(self)
for _,o in pairs(minetest.get_objects_inside_radius(self.object:get_pos(),10)) do
local l = o:get_luaentity()
if l and l.type =="monster" then return true end
end
end
local function has_summon_participants(self)
local r = 0
for _,o in pairs(minetest.get_objects_inside_radius(self.object:get_pos(),10)) do
local l = o:get_luaentity()
--TODO check for panicking or gossiping
--TODO check for gossiping
if l and l.name == "mobs_mc:villager" then r = r + 1 end
end
return r > 2
@ -913,7 +922,8 @@ local function check_summon(self,dtime)
if self._summon_timer and self._summon_timer > 30 then
local pos = self.object:get_pos()
self._summon_timer = 0
if has_golem(pos) then return false end
if has_golem(pos) then return end
if not monsters_near(self) then return end
if not has_summon_participants(self) then return end
summon_golem(self)
elseif self._summon_timer == nil then
@ -1089,25 +1099,38 @@ local function retrieve_my_jobsite (self)
return
end
local function remove_job (self)
self._jobsite = nil
if not has_traded(self) then
mcl_log("Cannot retrieve my jobsite. I am now unemployed.")
self._profession = "unemployed"
self._trades = nil
set_textures(self)
else
mcl_log("Cannot retrieve my jobsite but I've traded so only remove jobsite.")
end
end
local function validate_jobsite(self)
if self._profession == "unemployed" then return false end
if not retrieve_my_jobsite (self) then
self._jobsite = nil
local job_block = retrieve_my_jobsite (self)
if not job_block then
if self.order == WORK then
self.order = nil
end
if not has_traded(self) then
mcl_log("Cannot retrieve my jobsite. I am now unemployed.")
self._profession = "unemployed"
self._trades = nil
set_textures(self)
else
mcl_log("Cannot retrieve my jobsite but I've traded so only remove jobsite.")
end
remove_job (self)
return false
else
local resettle = vector.distance(self.object:get_pos(),self._jobsite) > RESETTLE_DISTANCE
mcl_log("Jobsite far, so resettle: " .. tostring(resettle))
if resettle then
local m = minetest.get_meta(self._jobsite)
m:set_string("villager", nil)
remove_job (self)
return false
end
return true
end
end
@ -1222,6 +1245,17 @@ local function validate_bed(self)
local bed_valid = true
local m = minetest.get_meta(self._bed)
local resettle = vector.distance(self.object:get_pos(),self._bed) > RESETTLE_DISTANCE
mcl_log("Bed far, so resettle: " .. tostring(resettle))
if resettle then
mcl_log("Resettled. Ditch bed.")
m:set_string("villager", nil)
self._bed = nil
bed_valid = false
return false
end
local owned_by_player = m:get_string("player")
mcl_log("Player owner: " .. owned_by_player)
if owned_by_player ~= "" then
@ -1229,7 +1263,7 @@ local function validate_bed(self)
m:set_string("villager", nil)
self._bed = nil
bed_valid = false
return
return false
end
if m:get_string("villager") ~= self._id then
@ -1245,6 +1279,10 @@ end
local function do_activity (self)
-- Maybe just check we're pathfinding first?
if self.following then
mcl_log("Following, so do not do activity.")
return
end
if not validate_bed(self) and self.state ~= PATHFINDING then
if self.order == SLEEP then self.order = nil end

@ -1,7 +1,11 @@
local mods_loaded = false
local NIGHT_VISION_RATIO = 0.45
local water_color = "#0b4880"
function mcl_weather.set_sky_box_clear(player)
local pos = player:get_pos()
if minetest.get_item_group(minetest.get_node(vector.new(pos.x,pos.y+1.5,pos.z)).name, "water") ~= 0 then return end
player:set_sky({
type = "regular",
sky_color = {
@ -16,6 +20,16 @@ function mcl_weather.set_sky_box_clear(player)
})
end
function mcl_weather.set_sky_color(player, def)
local pos = player:get_pos()
if minetest.get_item_group(minetest.get_node(vector.new(pos.x,pos.y+1.5,pos.z)).name, "water") ~= 0 then return end
player:set_sky({
type = def.type,
sky_color = def.sky_color,
clouds = def.clouds,
})
end
mcl_weather.skycolor = {
-- Should be activated before do any effect.
active = true,
@ -96,6 +110,19 @@ mcl_weather.skycolor = {
local pos = player:get_pos()
local dim = mcl_worlds.pos_to_dimension(pos)
local has_weather = (mcl_worlds.has_weather(pos) and (mcl_weather.state == "snow" or mcl_weather.state =="rain" or mcl_weather.state == "thunder") and mcl_weather.has_snow(pos)) or ((mcl_weather.state =="rain" or mcl_weather.state == "thunder") and mcl_weather.has_rain(pos))
if minetest.get_item_group(minetest.get_node(vector.new(pos.x,pos.y+1.5,pos.z)).name, "water") ~= 0 then
player:set_sky({ type = "regular",
sky_color = {
day_sky = water_color,
day_horizon = water_color,
dawn_sky = water_color,
dawn_horizon = water_color,
night_sky = water_color,
night_horizon = water_color,
},
clouds = true,
})
end
if dim == "overworld" then
if (mcl_weather.state == "none") then
-- Clear weather
@ -108,7 +135,8 @@ mcl_weather.skycolor = {
local day_color = mcl_weather.skycolor.get_sky_layer_color(0.15)
local dawn_color = mcl_weather.skycolor.get_sky_layer_color(0.27)
local night_color = mcl_weather.skycolor.get_sky_layer_color(0.1)
player:set_sky({ type = "regular",
mcl_weather.set_sky_color(player, {
type = "regular",
sky_color = {
day_sky = day_color,
day_horizon = day_color,
@ -127,7 +155,8 @@ mcl_weather.skycolor = {
local day_color = mcl_weather.skycolor.get_sky_layer_color(0.5)
local dawn_color = mcl_weather.skycolor.get_sky_layer_color(0.75)
local night_color = mcl_weather.skycolor.get_sky_layer_color(0)
player:set_sky({ type = "regular",
mcl_weather.set_sky_color(player, {
type = "regular",
sky_color = {
day_sky = day_color,
day_horizon = day_color,
@ -178,7 +207,7 @@ mcl_weather.skycolor = {
}
local biometint = nether_sky[minetest.get_biome_name(minetest.get_biome_data(player:get_pos()).biome)]
player:set_sky({
mcl_weather.set_sky_color(player, {
type = "regular",
sky_color = {
day_sky = "#300808",

@ -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

@ -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.=

@ -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.

@ -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,
})

@ -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.=

@ -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

@ -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 = {
@ -73,4 +84,11 @@ minetest.register_craft({
output = "mcl_copper:copper_ingot",
recipe = "mcl_copper:stone_with_copper",
cooktime = 10,
})
})
minetest.register_craft({
type = "cooking",
output = "mcl_copper:block",
recipe = "mcl_copper:block_raw",
cooktime = 90,
})

@ -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"},

@ -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")

@ -11,5 +11,5 @@ minetest.register_craftitem("mcl_copper:raw_copper", {
description = S("Raw Copper"),
_doc_items_longdesc = S("Raw Copper. Mine a Copper Ore to get it."),
inventory_image = "mcl_copper_raw.png",
groups = { craftitem = 1 },
groups = { craftitem = 1, blast_furnace_smeltable = 1 },
})

@ -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=

@ -20,7 +20,7 @@ minetest.register_node("mcl_copper:block_raw", {
_doc_items_longdesc = S("A block used for compact raw copper storage."),
tiles = {"mcl_copper_block_raw.png"},
is_ground_content = false,
groups = {pickaxey = 2, building_block = 1},
groups = {pickaxey = 2, building_block = 1, blast_furnace_smeltable = 1 },
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
@ -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")
@ -174,4 +313,25 @@ mcl_stairs.register_stair("copper_weathered_cut", "mcl_copper:block_weathered_cu
{"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("Stairs of Weathered Cut Copper"),
nil, 6, nil,
"woodlike")
"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")

@ -50,7 +50,7 @@ minetest.register_node("mcl_core:water_flowing", {
liquid_viscosity = WATER_VISC,
liquid_range = 7,
waving = 3,
post_effect_color = {a=209, r=0x03, g=0x3C, b=0x5C},
post_effect_color = {a=20, r=0x03, g=0x3C, b=0x5C},
groups = { water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1, freezes=1, melt_around=1, dig_by_piston=1},
_mcl_blast_resistance = 100,
-- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
@ -95,7 +95,7 @@ S("• When water is directly below lava, the water turns into stone."),
liquid_alternative_source = "mcl_core:water_source",
liquid_viscosity = WATER_VISC,
liquid_range = 7,
post_effect_color = {a=209, r=0x03, g=0x3C, b=0x5C},
post_effect_color = {a=60, r=0x03, g=0x3C, b=0x5C},
stack_max = 64,
groups = { water=3, liquid=3, puts_out_fire=1, freezes=1, not_in_creative_inventory=1, dig_by_piston=1},
_mcl_blast_resistance = 100,

@ -379,6 +379,8 @@ local function apply_bone_meal(pointed_thing,user)
return false
end
mcl_dye.apply_bone_meal = apply_bone_meal
minetest.register_craftitem("mcl_dye:white", {
inventory_image = "mcl_dye_white.png",
description = S("Bone Meal"),

@ -1,16 +1,12 @@
===FARMING MOD for MINETEST-C55===
by PilzAdam
Modified heavily by MineClone 2 Dev Team.
Introduction:
This mod adds farming to Minetest.
How to install:
Unzip the archive an place it in minetest-base-directory/mods/minetest/
if you have a windows client or a linux run-in-place client. If you have
a linux system-wide instalation place it in ~/.minetest/mods/minetest/.
If you want to install this mod only in one world create the folder
worldmods/ in your worlddirectory.
For further information or help see:
How to install see:
http://wiki.minetest.com/wiki/Installing_Mods
How to use the mod:
@ -25,22 +21,8 @@ For further information or help see:
http://minetest.net/forum/viewtopic.php?id=2787
License:
Sourcecode: WTFPL (see below)
Graphics: WTFPL (see below)
Sourcecode: CC-BY-SA 4 (see below)
Graphics: CC-BY-SA 4 (see below)
See also:
http://minetest.net/
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.

@ -69,7 +69,7 @@ function mcl_farming:add_plant(identifier, full_grown, names, interval, chance)
interval = interval,
chance = chance,
action = function(pos, node)
local low_speed = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name ~= "mcl_farming:soil_wet"
local low_speed = minetest.get_node({ x = pos.x, y = pos.y - 1, z = pos.z }).name ~= "mcl_farming:soil_wet"
mcl_farming:grow_plant(identifier, pos, node, false, false, low_speed)
end,
})
@ -130,7 +130,7 @@ function mcl_farming:grow_plant(identifier, pos, node, stages, ignore_light, low
stages = 1
end
stages = stages + math.ceil(intervals_counter)
local new_node = {name = plant_info.names[step+stages]}
local new_node = { name = plant_info.names[step + stages] }
if new_node.name == nil then
new_node.name = plant_info.full_grown
end
@ -157,14 +157,14 @@ function mcl_farming:place_seed(itemstack, placer, pointed_thing, plantname)
end
end
local pos = {x=pt.above.x, y=pt.above.y-1, z=pt.above.z}
local pos = { x = pt.above.x, y = pt.above.y - 1, z = pt.above.z }
local farmland = minetest.get_node(pos)
pos= {x=pt.above.x, y=pt.above.y, z=pt.above.z}
pos = { x = pt.above.x, y = pt.above.y, z = pt.above.z }
local place_s = minetest.get_node(pos)
if string.find(farmland.name, "mcl_farming:soil") and string.find(place_s.name, "air") then
minetest.sound_play(minetest.registered_nodes[plantname].sounds.place, {pos = pos}, true)
minetest.add_node(pos, {name=plantname, param2 = minetest.registered_nodes[plantname].place_param2})
if string.find(farmland.name, "mcl_farming:soil") and string.find(place_s.name, "air") then
minetest.sound_play(minetest.registered_nodes[plantname].sounds.place, { pos = pos }, true)
minetest.add_node(pos, { name = plantname, param2 = minetest.registered_nodes[plantname].place_param2 })
--local intervals_counter = get_intervals_counter(pos, 1, 1)
else
return
@ -179,7 +179,7 @@ end
--[[ Helper function to create a gourd (e.g. melon, pumpkin), the connected stem nodes as
- full_unconnected_stem: itemstring of the full-grown but unconnceted stem node. This node must already be done
- full_unconnected_stem: itemstring of the full-grown but unconnected stem node. This node must already be done
- connected_stem_basename: prefix of the itemstrings used for the 4 connected stem nodes to create
- stem_itemstring: Desired itemstring of the fully-grown unconnected stem node
- stem_def: Partial node definition of the fully-grown unconnected stem node. Many fields are already defined. You need to add `tiles` and `description` at minimum. Don't define on_construct without good reason
@ -202,10 +202,10 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
}
local neighbors = {
{ x=-1, y=0, z=0 },
{ x=1, y=0, z=0 },
{ x=0, y=0, z=-1 },
{ x=0, y=0, z=1 },
{ x = -1, y = 0, z = 0 },
{ x = 1, y = 0, z = 0 },
{ x = 0, y = 0, z = -1 },
{ x = 0, y = 0, z = 1 },
}
-- Connect the stem at stempos to the first neighboring gourd block.
@ -215,19 +215,19 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
if stem.name ~= full_unconnected_stem then
return false
end
for n=1, #neighbors do
for n = 1, #neighbors do
local offset = neighbors[n]
local blockpos = vector.add(stempos, offset)
local block = minetest.get_node(blockpos)
if block.name == gourd_itemstring then
if offset.x == 1 then
minetest.set_node(stempos, {name=connected_stem_names[1]})
minetest.set_node(stempos, { name = connected_stem_names[1] })
elseif offset.x == -1 then
minetest.set_node(stempos, {name=connected_stem_names[2]})
minetest.set_node(stempos, { name = connected_stem_names[2] })
elseif offset.z == 1 then
minetest.set_node(stempos, {name=connected_stem_names[3]})
minetest.set_node(stempos, { name = connected_stem_names[3] })
elseif offset.z == -1 then
minetest.set_node(stempos, {name=connected_stem_names[4]})
minetest.set_node(stempos, { name = connected_stem_names[4] })
end
return true
end
@ -238,13 +238,13 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
if not gourd_def.after_destruct then
gourd_def.after_destruct = function(blockpos, oldnode)
-- Disconnect any connected stems, turning them back to normal stems
for n=1, #neighbors do
for n = 1, #neighbors do
local offset = neighbors[n]
local expected_stem = connected_stem_names[n]
local stempos = vector.add(blockpos, offset)
local stem = minetest.get_node(stempos)
if stem.name == expected_stem then
minetest.add_node(stempos, {name=full_unconnected_stem})
minetest.add_node(stempos, { name = full_unconnected_stem })
try_connect_stem(stempos)
end
end
@ -253,7 +253,7 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
if not gourd_def.on_construct then
function gourd_def.on_construct(blockpos)
-- Connect all unconnected stems at full size
for n=1, #neighbors do
for n = 1, #neighbors do
local stempos = vector.add(blockpos, neighbors[n])
try_connect_stem(stempos)
end
@ -272,7 +272,7 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
stem_def.selection_box = {
type = "fixed",
fixed = {
{-0.15, -0.5, -0.15, 0.15, 0.5, 0.15}
{ -0.15, -0.5, -0.15, 0.15, 0.5, 0.15 }
},
}
end
@ -292,7 +292,7 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
stem_def.drop = stem_drop
end
if stem_def.groups == nil then
stem_def.groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1,destroy_by_lava_flow=1,}
stem_def.groups = { dig_immediate = 3, not_in_creative_inventory = 1, plant = 1, attached_node = 1, dig_by_water = 1, destroy_by_lava_flow = 1, }
end
if stem_def.sounds == nil then
stem_def.sounds = mcl_sounds.node_sound_leaves_defaults()
@ -310,48 +310,48 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
local connected_stem_tiles = {
{ "blank.png", --top
"blank.png", -- bottom
"blank.png", -- right
"blank.png", -- left
connected_stem_texture, -- back
connected_stem_texture.."^[transformFX90" --front
"blank.png", -- bottom
"blank.png", -- right
"blank.png", -- left
connected_stem_texture, -- back
connected_stem_texture .. "^[transformFX90" --front
},
{ "blank.png", --top
"blank.png", -- bottom
"blank.png", -- right
"blank.png", -- left
connected_stem_texture.."^[transformFX90", --back
connected_stem_texture, -- front
"blank.png", -- bottom
"blank.png", -- right
"blank.png", -- left
connected_stem_texture .. "^[transformFX90", --back
connected_stem_texture, -- front
},
{ "blank.png", --top
"blank.png", -- bottom
connected_stem_texture.."^[transformFX90", -- right
connected_stem_texture, -- left
"blank.png", --back
"blank.png", -- front
"blank.png", -- bottom
connected_stem_texture .. "^[transformFX90", -- right
connected_stem_texture, -- left
"blank.png", --back
"blank.png", -- front
},
{ "blank.png", --top
"blank.png", -- bottom
connected_stem_texture, -- right
connected_stem_texture.."^[transformFX90", -- left
"blank.png", --back
"blank.png", -- front
"blank.png", -- bottom
connected_stem_texture, -- right
connected_stem_texture .. "^[transformFX90", -- left
"blank.png", --back
"blank.png", -- front
}
}
local connected_stem_nodebox = {
{-0.5, -0.5, 0, 0.5, 0.5, 0},
{-0.5, -0.5, 0, 0.5, 0.5, 0},
{0, -0.5, -0.5, 0, 0.5, 0.5},
{0, -0.5, -0.5, 0, 0.5, 0.5},
{ -0.5, -0.5, 0, 0.5, 0.5, 0 },
{ -0.5, -0.5, 0, 0.5, 0.5, 0 },
{ 0, -0.5, -0.5, 0, 0.5, 0.5 },
{ 0, -0.5, -0.5, 0, 0.5, 0.5 },
}
local connected_stem_selectionbox = {
{-0.1, -0.5, -0.1, 0.5, 0.2, 0.1},
{-0.5, -0.5, -0.1, 0.1, 0.2, 0.1},
{-0.1, -0.5, -0.1, 0.1, 0.2, 0.5},
{-0.1, -0.5, -0.5, 0.1, 0.2, 0.1},
{ -0.1, -0.5, -0.1, 0.5, 0.2, 0.1 },
{ -0.5, -0.5, -0.1, 0.1, 0.2, 0.1 },
{ -0.1, -0.5, -0.1, 0.1, 0.2, 0.5 },
{ -0.1, -0.5, -0.5, 0.1, 0.2, 0.1 },
}
for i=1, 4 do
for i = 1, 4 do
minetest.register_node(connected_stem_names[i], {
_doc_items_create_entry = false,
paramtype = "light",
@ -369,7 +369,7 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
},
tiles = connected_stem_tiles[i],
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1,destroy_by_lava_flow=1,},
groups = { dig_immediate = 3, not_in_creative_inventory = 1, plant = 1, attached_node = 1, dig_by_water = 1, destroy_by_lava_flow = 1, },
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
})
@ -380,9 +380,9 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
end
minetest.register_abm({
label = "Grow gourd stem to gourd ("..full_unconnected_stem..""..gourd_itemstring..")",
nodenames = {full_unconnected_stem},
neighbors = {"air"},
label = "Grow gourd stem to gourd (" .. full_unconnected_stem .. "" .. gourd_itemstring .. ")",
nodenames = { full_unconnected_stem },
neighbors = { "air" },
interval = grow_interval,
chance = grow_chance,
action = function(stempos)
@ -390,20 +390,20 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
if light and light > 10 then
-- Check the four neighbors and filter out neighbors where gourds can't grow
local neighbors = {
{ x=-1, y=0, z=0 },
{ x=1, y=0, z=0 },
{ x=0, y=0, z=-1 },
{ x=0, y=0, z=1 },
{ x = -1, y = 0, z = 0 },
{ x = 1, y = 0, z = 0 },
{ x = 0, y = 0, z = -1 },
{ x = 0, y = 0, z = 1 },
}
local floorpos, floor
for n=#neighbors, 1, -1 do
for n = #neighbors, 1, -1 do
local offset = neighbors[n]
local blockpos = vector.add(stempos, offset)
floorpos = { x=blockpos.x, y=blockpos.y-1, z=blockpos.z }
floorpos = vector.offset (blockpos, 0, -1,0) -- replaces { x = blockpos.x, y = blockpos.y - 1, z = blockpos.z }
floor = minetest.get_node(floorpos)
local block = minetest.get_node(blockpos)
local soilgroup = minetest.get_item_group(floor.name, "soil")
if not ((minetest.get_item_group(floor.name, "grass_block") == 1 or floor.name=="mcl_core:dirt" or soilgroup == 2 or soilgroup == 3) and block.name == "air") then
if not ((minetest.get_item_group(floor.name, "grass_block") == 1 or floor.name == "mcl_core:dirt" or soilgroup == 2 or soilgroup == 3) and block.name == "air") then
table.remove(neighbors, n)
end
end
@ -416,27 +416,35 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
local blockpos = vector.add(stempos, offset)
local p2
if offset.x == 1 then
minetest.set_node(stempos, {name=connected_stem_names[1]})
minetest.set_node(stempos, { name = connected_stem_names[1] })
p2 = 3
elseif offset.x == -1 then
minetest.set_node(stempos, {name=connected_stem_names[2]})
minetest.set_node(stempos, { name = connected_stem_names[2] })
p2 = 1
elseif offset.z == 1 then
minetest.set_node(stempos, {name=connected_stem_names[3]})
minetest.set_node(stempos, { name = connected_stem_names[3] })
p2 = 2
elseif offset.z == -1 then
minetest.set_node(stempos, {name=connected_stem_names[4]})
minetest.set_node(stempos, { name = connected_stem_names[4] })
p2 = 0
end
-- Place the gourd
if gourd_def.paramtype2 == "facedir" then
minetest.add_node(blockpos, {name=gourd_itemstring, param2=p2})
minetest.add_node(blockpos, { name = gourd_itemstring, param2 = p2 })
else
minetest.add_node(blockpos, {name=gourd_itemstring})
minetest.add_node(blockpos, { name = gourd_itemstring })
end
-- Reset farmland, etc. to dirt when the gourd grows on top
-- FIXED: The following 2 lines were missing, and wasn't being set (outside of the above loop that
-- finds the neighbors.)
-- FYI - don't factor this out thinking that the loop above is setting the positions correctly.
floorpos = vector.offset (blockpos, 0, -1,0) -- replaces { x = blockpos.x, y = blockpos.y - 1, z = blockpos.z }
floor = minetest.get_node(floorpos)
-- END OF FIX -------------------------------------
if minetest.get_item_group(floor.name, "dirtifies_below_solid") == 1 then
minetest.set_node(floorpos, {name = "mcl_core:dirt"})
minetest.set_node(floorpos, { name = "mcl_core:dirt" })
end
end
end
@ -452,7 +460,7 @@ end
function mcl_farming:stem_color(startcolor, endcolor, step, step_count)
local color = {}
local function get_component(startt, endd, step, step_count)
return math.floor(math.max(0, math.min(255, (startt + (((step-1)/step_count) * endd)))))
return math.floor(math.max(0, math.min(255, (startt + (((step - 1) / step_count) * endd)))))
end
color.r = get_component(startcolor.r, endcolor.r, step, step_count)
color.g = get_component(startcolor.g, endcolor.g, step, step_count)
@ -464,14 +472,14 @@ end
minetest.register_lbm({
label = "Add growth for unloaded farming plants",
name = "mcl_farming:growth",
nodenames = {"group:plant"},
nodenames = { "group:plant" },
run_at_every_load = true,
action = function(pos, node)
local identifier = plant_nodename_to_id_list[node.name]
if not identifier then
return
end
local low_speed = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name ~= "mcl_farming:soil_wet"
local low_speed = minetest.get_node({ x = pos.x, y = pos.y - 1, z = pos.z }).name ~= "mcl_farming:soil_wet"
mcl_farming:grow_plant(identifier, pos, node, false, false, low_speed)
end,
})

@ -35,6 +35,24 @@ for i=0, 3 do
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
_mcl_hardness = 0,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
if mcl_dye and clicker:get_wielded_item():get_name() == "mcl_dye:white" then
mcl_dye.apply_bone_meal({under=pos},clicker)
return
end
local stage
if node.name:find("_2") then
stage = 2
elseif node.name:find("_3") then
stage = 3
end
if stage then
for i=1,math.random(stage) do
minetest.add_item(pos,"mcl_farming:sweet_berry")
end
minetest.swap_node(pos,{name = "mcl_farming:sweet_berry_bush_" .. stage - 1 })
end
end,
})
minetest.register_alias("mcl_sweet_berry:sweet_berry_bush_" .. i, node_name)
end

@ -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" },
},
})

@ -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.=

@ -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

@ -338,8 +338,8 @@ minetest.register_node("mcl_hoppers:hopper_side_disabled", def_hopper_side_disab
--[[ END OF NODE DEFINITIONS ]]
local function hopper_pull_from_mc (mc_ent, dest_pos)
local inv = mcl_entity_invs.load_inv(mc_ent,5)
local function hopper_pull_from_mc (mc_ent, dest_pos, inv_size)
local inv = mcl_entity_invs.load_inv(mc_ent, inv_size)
if not inv then
mcl_log("No inv")
return false
@ -382,7 +382,7 @@ end
--[[ BEGIN OF ABM DEFINITONS ]]
minetest.register_abm({
label = "Hoppers pull from minecart hoppers",
label = "Hoppers pull from minecart",
nodenames = {"mcl_hoppers:hopper","mcl_hoppers:hopper_side"},
interval = 0.5,
chance = 1,
@ -396,9 +396,9 @@ minetest.register_abm({
if entity and entity.name then
--mcl_log("Name of object near: " .. tostring(entity.name))
if entity.name == "mcl_minecarts:hopper_minecart" then
if entity.name == "mcl_minecarts:hopper_minecart" or entity.name == "mcl_minecarts:chest_minecart"then
local hm_pos = entity.object:get_pos()
mcl_log("We have a hopper minecart close: ".. minetest.pos_to_string(hm_pos))
mcl_log("We have a minecart with inventory close: ".. minetest.pos_to_string(hm_pos))
--if hm_pos.y == pos.y + 1 then mcl_log("y is correct") end
--if (hm_pos.x >= pos.x - DIST_FROM_MC and hm_pos.x <= pos.x + DIST_FROM_MC) then mcl_log("x is within range") end
@ -409,7 +409,11 @@ minetest.register_abm({
and (hm_pos.x >= pos.x - DIST_FROM_MC and hm_pos.x <= pos.x + DIST_FROM_MC)
and (hm_pos.z >= pos.z - DIST_FROM_MC and hm_pos.z <= pos.z + DIST_FROM_MC) then
mcl_log("Minecart close enough")
hopper_pull_from_mc (entity, pos)
if entity.name == "mcl_minecarts:hopper_minecart" then
hopper_pull_from_mc(entity, pos, 5)
elseif entity.name == "mcl_minecarts:chest_minecart" then
hopper_pull_from_mc(entity, pos, 27)
end
end
end
else
@ -620,10 +624,10 @@ minetest.register_abm({
end
end
end
end
end
if compchance > 0 then
itemcomp[hslot]:take_item()
inv:set_list("main", itemcomp)
inv:set_list("main", itemcomp)
local rand = math.random(0,100)
if compchance >= rand then
local level = 0

@ -34,6 +34,8 @@ local glow_amount = 6 -- LIGHT_MAX is 15, but the items aren't supposed to be a
local frame_item_base = {}
local map_item_base = {}
local TIMER_INTERVAL = 40.0
-- Time to Fleckenstein! (it just sounds cool lol)
--- self: the object to roll.
@ -247,6 +249,7 @@ mcl_itemframes.update_item_entity = function(pos, node, param2)
local map_id_entity = {}
local map_id_lua = {}
local timer = minetest.get_node_timer(pos)
if map_id == "" then
-- handle regular items placed into custom frame.
if mcl_itemframes.DEBUG then
@ -268,13 +271,32 @@ mcl_itemframes.update_item_entity = function(pos, node, param2)
if itemname == "" or itemname == nil then
map_id_lua._texture = "blank.png"
map_id_lua._scale = 1
-- set up glow, as this is the default/initial clause on placement.
if has_glow then
map_id_lua.glow = glow_amount
end
-- if there's nothing to display, then kill the timer.
if timer:is_started() == true then
timer:stop()
end
else
map_id_lua._texture = itemname
local def = minetest.registered_items[itemname]
map_id_lua._scale = def and def.wield_scale and def.wield_scale.x or 1
-- fix for /ClearObjects
if minetest.get_item_group(itemname, "clock") == 0 then
-- Do timer related stuff - but only if there is something to display... and it's not a clock.
if timer:is_started() == false then
timer:start(TIMER_INTERVAL)
else
timer:stop()
timer:start(TIMER_INTERVAL)
end
end
end
if mcl_itemframes.DEBUG then
minetest.log("action", "[mcl_itemframes] Update_Generic_Item: item's name: " .. itemname)
@ -297,6 +319,15 @@ mcl_itemframes.update_item_entity = function(pos, node, param2)
else
minetest.log("error", "[mcl_itemframes] Update_Generic_Item: Failed to set Map Item in " .. found_name_to_use .. "'s frame.")
end
-- give maps a refresh timer.
if timer:is_started() == false then
timer:start(TIMER_INTERVAL)
else
timer:stop()
timer:start(TIMER_INTERVAL)
end
end
-- finally, set the rotation (roll) of the displayed object.
@ -364,7 +395,7 @@ function mcl_itemframes.create_base_item_entity()
textures = { "blank.png" },
_texture = "blank.png",
_scale = 1,
groups = { immortal = 1, },
on_activate = function(self, staticdata)
if staticdata and staticdata ~= "" then
local data = staticdata:split(";")
@ -395,7 +426,7 @@ function mcl_itemframes.create_base_item_entity()
end
return ""
end,
on_punch = function() return true end,
_update_texture = function(self)
if self._texture then
self.object:set_properties({
@ -561,6 +592,23 @@ function mcl_itemframes.custom_register_lbm()
end
local function register_frame_achievements()
awards.register_achievement("mcl_itemframes:glowframe", {
title = S("Glow and Behold!"),
description = S("Craft a glow item frame."),
icon = "mcl_itemframes_glow_item_frame.png",
trigger = {
type = "craft",
item = "mcl_itemframes:glow_item_frame",
target = 1
},
type = "Advancement",
group = "Overworld",
})
end
function mcl_itemframes.create_base_definitions()
if mcl_itemframes.DEBUG then
minetest.log("action", "[mcl_itemframes] create_base_definitions.")
@ -590,7 +638,7 @@ function mcl_itemframes.create_base_definitions()
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
groups = { dig_immediate = 3, deco_block = 1, dig_by_piston = 1, container = 7, attached_node_facedir = 1 },
groups = { dig_immediate = 3, deco_block = 1, dig_by_piston = 1, container = 7, }, -- attached_node_facedir = 1 }, -- allows for more placement options.
sounds = mcl_sounds.node_sound_defaults(),
node_placement_prediction = "",
@ -598,16 +646,19 @@ function mcl_itemframes.create_base_definitions()
local inv = minetest.get_meta(pos):get_inventory()
local stack = inv:get_stack("main", 1)
local itemname = stack:get_name()
local node = {}
if minetest.get_item_group(itemname, "clock") > 0 then
local new_name = "mcl_clock:clock_" .. (mcl_worlds.clock_works(pos) and mcl_clock.old_time or mcl_clock.random_frame)
if itemname ~= new_name then
stack:set_name(new_name)
inv:set_stack("main", 1, stack)
local node = minetest.get_node(pos)
node = minetest.get_node(pos)
mcl_itemframes.update_item_entity(pos, node, node.param2)
end
minetest.get_node_timer(pos):start(1.0)
else
node = minetest.get_node(pos)
mcl_itemframes.update_item_entity(pos, node, node.param2)
end
end,
@ -616,6 +667,14 @@ function mcl_itemframes.create_base_definitions()
return itemstack
end
local dir = vector.subtract(pointed_thing.under, pointed_thing.above)
local wdir = minetest.dir_to_wallmounted(dir)
-- remove bottom and top of objects.
if wdir == 0 or wdir == 1 then
return itemstack
end
-- Use pointed node's on_rightclick function first, if present
local node = minetest.get_node(pointed_thing.under)
if placer and not placer:get_player_control().sneak then
@ -784,15 +843,11 @@ function mcl_itemframes.create_base_definitions()
mcl_itemframes.glow_frame_base.inventory_image = "mcl_itemframes_glow_item_frame_item.png"
mcl_itemframes.glow_frame_base.wield_image = "mcl_itemframes_glow_item_frame.png"
mcl_itemframes.glow_frame_base.mesh = "mcl_itemframes_glow_item_frame.obj"
mcl_itemframes.glow_frame_base.glow = 1 --make the glow frames have some glow at night, but not enough to be a light source.
--[[
minetest.register_node("mcl_itemframes:glow_item_frame", mcl_itemframes.glow_frame_base)
-- set up the achievement for glow frames.
register_frame_achievements()
mcl_itemframes.update_frame_registry("false", "mcl_itemframes:item_frame", false)
mcl_itemframes.update_frame_registry("false", "mcl_itemframes:glow_item_frame", true)
create_register_lbm("mcl_itemframes:item_frame")
create_register_lbm("mcl_itemframes:glow_item_frame")
--]]
end
-- for compatibility:

@ -402,11 +402,11 @@ minetest.register_alias("mobs_mc:gold_horse_armor", "mcl_mobitems:gold_horse_arm
minetest.register_alias("mobs_mc:diamond_horse_armor", "mcl_mobitems:diamond_horse_armor")
minetest.register_craftitem("mcl_mobitems:glow_ink_sac", {
description = S("Glow Ink Sac"),
_doc_items_longdesc = S("Use it to craft the Glow Item Frame."),
_doc_items_usagehelp = S("Use the Glow Ink Sac and the normal Item Frame to craft the Glow Item Frame."),
inventory_image = "extra_mobs_glow_ink_sac.png",
groups = { craftitem = 1 },
description = S("Glow Ink Sac"),
_doc_items_longdesc = S("Use it to craft the Glow Item Frame."),
_doc_items_usagehelp = S("Use the Glow Ink Sac and the normal Item Frame to craft the Glow Item Frame."),
inventory_image = "extra_mobs_glow_ink_sac.png",
groups = { craftitem = 1 },
})

@ -741,7 +741,7 @@ minetest.register_craftitem("mcl_ocean:kelp", {
inventory_image = "mcl_ocean_kelp_item.png",
wield_image = "mcl_ocean_kelp_item.png",
on_place = kelp.kelp_on_place,
groups = {deco_block = 1, compostability = 30},
groups = {deco_block = 1, compostability = 30, smoker_cookable = 1},
})
if mod_doc then

@ -2,7 +2,7 @@
---
# Mineclone2-Signs
---
A reworking of MineClone 2's mcl_signs to be colorable and made to glow. Rquires Minetest and Mineclone2.
A reworking of MineClone 2's mcl_signs to be colorable and made to glow. Requires Minetest and Mineclone2.
---
Created by Michieal (FaerRaven) @ DateTime: 10/14/22 4:05 PM

@ -125,9 +125,11 @@ mcl_signs.register_sign_craft("mcl_core", "mcl_core:junglewood", "_junglewood")
mcl_signs.register_sign("mcl_core", "#ea7479", "_acaciawood", "Acacia Sign")
mcl_signs.register_sign_craft("mcl_core", "mcl_core:acaciawood", "_acaciawood")
-- mangrove_wood Sign "#c7545c"
mcl_signs.register_sign("mcl_core", "#b8693d", "_mangrove_wood", "Mangrove Sign")
mcl_signs.register_sign_craft("mcl_core", "mcl_core:mangrove_wood", "_mangrove_wood")
if minetest.get_modpath("mcl_mangrove") then
-- mangrove_wood Sign "#c7545c"
mcl_signs.register_sign("mcl_mangrove", "#b8693d", "_mangrove_wood", "Mangrove Sign")
mcl_signs.register_sign_craft("mcl_mangrove", "mcl_mangrove:mangrove_wood", "_mangrove_wood")
end
-- add in the nether wood signs
if minetest.get_modpath("mcl_crimson") then

File diff suppressed because it is too large Load Diff

@ -1760,6 +1760,21 @@ local function register_dimension_biomes()
_mcl_biome_type = "medium",
_mcl_palette_index = 0,
})
minetest.register_biome({
name = "EndBarrens",
node_stone = "air",
node_filler = "air",
node_water = "air",
node_river_water = "air",
node_cave_liquid = "air",
y_min = mcl_vars.mg_end_min,
y_max = mcl_vars.mg_end_max + 80,
heat_point = 1000,
humidity_point = 1000,
vertical_blend = 16,
_mcl_biome_type = "medium",
_mcl_palette_index = 0,
})
minetest.register_biome({
name = "EndMidlands",
node_stone = "air",
@ -3160,7 +3175,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 +3325,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 +3706,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({

@ -10,7 +10,7 @@ local node_def = {
drawtype = "mesh",
node_placement_prediction = "",
on_construct = function(pos)
local name = get_node(pos).name
local name = minetest.get_node(pos).name
local message = "[mcl_meshhand] Trying to construct " .. name .. " at " .. minetest.pos_to_string(pos)
minetest.log("error", message)
minetest.remove_node(pos)

@ -3,6 +3,8 @@ mcl_playerplus = {
is_pressing_jump = {},
}
local hud_water = {}
local get_connected_players = minetest.get_connected_players
local dir_to_yaw = minetest.dir_to_yaw
local get_item_group = minetest.get_item_group
@ -25,6 +27,26 @@ local mcl_playerplus_internal = {}
local time = 0
local look_pitch = 0
local function calculate_water_depth(pos)
for i=1, 50 do
if get_item_group(minetest.get_node(vector.new(pos.x,pos.y+i,pos.z)).name, "water") == 0 then
return i
end
end
return 50
end
local function remove_water_hud(player)
if hud_water[player] then
mcl_weather.skycolor.update_sky_color()
for i=1, #hud_water[player] do
player:hud_remove(hud_water[player][i])
end
hud_water[player] = nil
end
end
local function player_collision(player)
local pos = player:get_pos()
@ -349,16 +371,16 @@ minetest.register_globalstep(function(dtime)
-- set head pitch and yaw when flying
local head_rot = vector.new(pitch - degrees(dir_to_pitch(player_velocity)) + 50, player_vel_yaw - yaw, 0)
set_bone_pos(player,"Head_Control", nil, head_rot)
-- sets eye height, and nametag color accordingly
set_properties(player, player_props_elytra)
-- control body bone when flying
local body_rot = vector.new((75 - degrees(dir_to_pitch(player_velocity))), -player_vel_yaw + yaw, 0)
set_bone_pos(player, "Body_Control", nil, body_rot)
elseif parent then
set_properties(player, player_props_riding)
local parent_yaw = degrees(parent:get_yaw())
local head_rot = vector.new(pitch, -limit_vel_yaw(yaw, parent_yaw) + parent_yaw, 0)
set_bone_pos(player, "Head_Control", nil, head_rot)
@ -367,10 +389,10 @@ minetest.register_globalstep(function(dtime)
-- controls head pitch when sneaking
local head_rot = vector.new(pitch, player_vel_yaw - yaw, player_vel_yaw - yaw)
set_bone_pos(player, "Head_Control", nil, head_rot)
-- sets eye height, and nametag color accordingly
set_properties(player, player_props_sneaking)
-- sneaking body conrols
set_bone_pos(player, "Body_Control", nil, vector.new(0, -player_vel_yaw + yaw, 0))
elseif get_item_group(mcl_playerinfo[name].node_head, "water") ~= 0 and is_sprinting(name) == true then
@ -378,10 +400,10 @@ minetest.register_globalstep(function(dtime)
is_swimming = true
local head_rot = vector.new(pitch - degrees(dir_to_pitch(player_velocity)) + 20, player_vel_yaw - yaw, 0)
set_bone_pos(player, "Head_Control", nil, head_rot)
-- sets eye height, and nametag color accordingly
set_properties(player, player_props_swimming)
-- control body bone when swimming
local body_rot = vector.new((75 + degrees(dir_to_pitch(player_velocity))), player_vel_yaw - yaw, 180)
set_bone_pos(player,"Body_Control", nil, body_rot)
@ -395,6 +417,25 @@ minetest.register_globalstep(function(dtime)
set_bone_pos(player,"Body_Control", nil, vector.new(0, -player_vel_yaw + yaw, 0))
end
if get_item_group(mcl_playerinfo[name].node_head, "water") ~= 0 then
if not hud_water[player] or hud_water[player] and calculate_water_depth(player:get_pos()) ~= #hud_water[player] then
remove_water_hud(player)
hud_water[player] = {}
for i=1, calculate_water_depth(player:get_pos()) do
table.insert(hud_water[player], player:hud_add({
hud_elem_type = "image",
text = "mcl_playerplus_water.png",
position = {x = 0.5, y = 0.5},
scale = {x = 32, y = 16},
offset = {x = 0, y = 0},
z_index = -1002,
}))
end
end
else
remove_water_hud(player)
end
elytra.last_yaw = player:get_look_horizontal()
-- Update jump status immediately since we need this info in real time.
-- WARNING: This section is HACKY as hell since it is all just based on heuristics.
@ -639,7 +680,7 @@ minetest.register_on_joinplayer(function(player)
jump_cooldown = -1, -- Cooldown timer for jumping, we need this to prevent the jump exhaustion to increase rapidly
}
mcl_playerplus.elytra[player] = {active = false, rocketing = 0, speed = 0}
-- Minetest bug: get_bone_position() returns all zeros vectors.
-- Workaround: call set_bone_position() one time first.
player:set_bone_position("Head_Control", vector.new(0, 6.75, 0))

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

@ -25,21 +25,21 @@ mcl_skins = {
-- Base color is separate to keep the number of junk nodes registered in check
base_color = {0xffeeb592, 0xffb47a57, 0xff8d471d},
color = {
0xff613915, -- 1 Dark brown Steve hair, Alex bottom
0xff613915, -- 1 Dark brown
0xff97491b, -- 2 Medium brown
0xffb17050, -- 3 Light brown
0xffe2bc7b, -- 4 Beige
0xff706662, -- 5 Gray
0xff151515, -- 6 Black
0xffc21c1c, -- 7 Red
0xff178c32, -- 8 Green Alex top
0xff178c32, -- 8 Green
0xffae2ad3, -- 9 Plum
0xffebe8e4, -- 10 White
0xffe3dd26, -- 11 Yellow
0xff449acc, -- 12 Light blue Steve top
0xff124d87, -- 13 Dark blue Steve bottom
0xff449acc, -- 12 Light blue
0xff124d87, -- 13 Dark blue
0xfffc0eb3, -- 14 Pink
0xffd0672a, -- 15 Orange Alex hair
0xffd0672a, -- 15 Orange
},
footwear = {},
mouth = {},
@ -574,16 +574,16 @@ local function init()
for _, item in pairs(json) do
mcl_skins.register_item(item)
end
mcl_skins.steve.base_color = mcl_skins.base_color[1]
mcl_skins.steve.hair_color = mcl_skins.color[1]
mcl_skins.steve.top_color = mcl_skins.color[12]
mcl_skins.steve.bottom_color = mcl_skins.color[13]
mcl_skins.steve.base_color = mcl_skins.base_color[2]
mcl_skins.steve.hair_color = 0xff5d473b
mcl_skins.steve.top_color = 0xff993535
mcl_skins.steve.bottom_color = 0xff644939
mcl_skins.steve.slim_arms = false
mcl_skins.alex.base_color = mcl_skins.base_color[1]
mcl_skins.alex.hair_color = mcl_skins.color[15]
mcl_skins.alex.top_color = mcl_skins.color[8]
mcl_skins.alex.bottom_color = mcl_skins.color[1]
mcl_skins.alex.hair_color = 0xff715d57
mcl_skins.alex.top_color = 0xff346840
mcl_skins.alex.bottom_color = 0xff383532
mcl_skins.alex.slim_arms = true
end

@ -18,11 +18,13 @@
},
{
"type": "eye",
"texture": "mcl_skins_eye_1.png"
"texture": "mcl_skins_eye_1.png",
"alex": true
},
{
"type": "eye",
"texture": "mcl_skins_eye_2.png"
"texture": "mcl_skins_eye_2.png",
"steve": true
},
{
"type": "eye",
@ -34,9 +36,7 @@
},
{
"type": "eye",
"texture": "mcl_skins_eye_5.png",
"steve": true,
"alex": true
"texture": "mcl_skins_eye_5.png"
},
{
"type": "eye",
@ -73,21 +73,23 @@
},
{
"type": "mouth",
"texture": "mcl_skins_mouth_7.png",
"alex": true
"texture": "mcl_skins_mouth_7.png"
},
{
"type": "mouth"
"type": "mouth",
"alex": true
},
{
"type": "hair",
"texture": "mcl_skins_hair_1.png",
"mask": "mcl_skins_hair_1_mask.png"
"mask": "mcl_skins_hair_1_mask.png",
"alex": true
},
{
"type": "hair",
"texture": "mcl_skins_hair_2.png",
"mask": "mcl_skins_hair_2_mask.png"
"mask": "mcl_skins_hair_2_mask.png",
"steve": true
},
{
"type": "hair",
@ -127,14 +129,12 @@
{
"type": "hair",
"texture": "mcl_skins_hair_10.png",
"mask": "mcl_skins_hair_10_mask.png",
"steve": true
"mask": "mcl_skins_hair_10_mask.png"
},
{
"type": "hair",
"texture": "mcl_skins_hair_11.png",
"mask": "mcl_skins_hair_11_mask.png",
"alex": true
"mask": "mcl_skins_hair_11_mask.png"
},
{
"type": "hair"
@ -145,7 +145,8 @@
},
{
"type": "headwear",
"texture": "mcl_skins_headwear_2.png"
"texture": "mcl_skins_headwear_2.png",
"alex": true
},
{
"type": "headwear",
@ -173,13 +174,14 @@
},
{
"type": "headwear",
"steve": true,
"alex": true
"steve": true
},
{
"type": "bottom",
"texture": "mcl_skins_bottom_1.png",
"mask": "mcl_skins_bottom_1_mask.png"
"mask": "mcl_skins_bottom_1_mask.png",
"steve": true,
"alex": true
},
{
"type": "bottom",
@ -194,14 +196,14 @@
{
"type": "bottom",
"texture": "mcl_skins_bottom_4.png",
"mask": "mcl_skins_bottom_4_mask.png",
"steve": true,
"alex": true
"mask": "mcl_skins_bottom_4_mask.png"
},
{
"type": "top",
"texture": "mcl_skins_top_1.png",
"mask": "mcl_skins_top_1_mask.png"
"mask": "mcl_skins_top_1_mask.png",
"steve": true,
"alex": true
},
{
"type": "top",
@ -241,14 +243,12 @@
{
"type": "top",
"texture": "mcl_skins_top_9.png",
"mask": "mcl_skins_top_9_mask.png",
"alex": true
"mask": "mcl_skins_top_9_mask.png"
},
{
"type": "top",
"texture": "mcl_skins_top_10.png",
"mask": "mcl_skins_top_10_mask.png",
"steve": true
"mask": "mcl_skins_top_10_mask.png"
},
{
"type": "base",

@ -20,6 +20,7 @@ mcl_skins_top_6.png
mcl_skins_bottom_3.png
mcl_skins_eye_7.png
mcl_skins_mouth_7.png
mcl_skins_hair_10.png
Original work by MrRar
License: CC BY-SA 4.0
@ -99,7 +100,6 @@ Source: http://minetest.fensta.bplaced.net/#id=1258
mcl_skins_bottom_4.png
mcl_skins_top_9.png
mcl_skins_top_10.png
mcl_skins_hair_10.png
mcl_skins_hair_11.png
Name: Pixel Perfection Legacy 1.19
Author: Nova_Wostra. Adapted for mcl_skins by MrRar.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 484 B

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 B

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 143 B