1
0
Fork 0

Rename farming mod to mcl_farming

This commit is contained in:
Wuzzy 2017-01-31 12:35:59 +01:00
parent 89b30ae108
commit 1314e31abc
64 changed files with 193 additions and 187 deletions

View File

@ -453,14 +453,14 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
output = 'default:haybale', output = 'default:haybale',
recipe = { recipe = {
{'farming:wheat_harvested', 'farming:wheat_harvested', 'farming:wheat_harvested'}, {'mcl_farming:wheat_harvested', 'mcl_farming:wheat_harvested', 'mcl_farming:wheat_harvested'},
{'farming:wheat_harvested', 'farming:wheat_harvested', 'farming:wheat_harvested'}, {'mcl_farming:wheat_harvested', 'mcl_farming:wheat_harvested', 'mcl_farming:wheat_harvested'},
{'farming:wheat_harvested', 'farming:wheat_harvested', 'farming:wheat_harvested'}, {'mcl_farming:wheat_harvested', 'mcl_farming:wheat_harvested', 'mcl_farming:wheat_harvested'},
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'farming:wheat_harvested 9', output = 'mcl_farming:wheat_harvested 9',
recipe = { recipe = {
{'default:haybale'}, {'default:haybale'},
} }

View File

@ -463,46 +463,46 @@ function default.duengen(pointed_thing)
minetest.add_node(pos, {name="air"}) minetest.add_node(pos, {name="air"})
generate_tree(pos, "default:tree", "default:leaves", 1) generate_tree(pos, "default:tree", "default:leaves", 1)
return true return true
elseif string.find(n.name, "farming:wheat_") ~= nil then elseif string.find(n.name, "mcl_farming:wheat_") ~= nil then
stage = string.sub(n.name, 15) stage = string.sub(n.name, 15)
if stage == "3" then if stage == "3" then
minetest.add_node(pos, {name="farming:wheat"}) minetest.add_node(pos, {name="mcl_farming:wheat"})
elseif math.random(1,5) < 3 then elseif math.random(1,5) < 3 then
minetest.add_node(pos, {name="farming:wheat"}) minetest.add_node(pos, {name="mcl_farming:wheat"})
else else
minetest.add_node(pos, {name="farming:wheat_"..math.random(2,3)}) minetest.add_node(pos, {name="mcl_farming:wheat_"..math.random(2,3)})
end end
return true return true
elseif string.find(n.name, "farming:potato_") ~= nil then elseif string.find(n.name, "mcl_farming:potato_") ~= nil then
stage = tonumber(string.sub(n.name, 16)) stage = tonumber(string.sub(n.name, 16))
if stage == 1 then if stage == 1 then
minetest.add_node(pos, {name="farming:potato_"..math.random(stage,2)}) minetest.add_node(pos, {name="mcl_farming:potato_"..math.random(stage,2)})
else else
minetest.add_node(pos, {name="farming:potato"}) minetest.add_node(pos, {name="mcl_farming:potato"})
end end
return true return true
elseif string.find(n.name, "farming:carrot_") ~= nil then elseif string.find(n.name, "mcl_farming:carrot_") ~= nil then
stage = tonumber(string.sub(n.name, 16)) stage = tonumber(string.sub(n.name, 16))
if stage == 1 then if stage == 1 then
minetest.add_node(pos, {name="farming:carrot_"..math.random(stage,2)}) minetest.add_node(pos, {name="mcl_farming:carrot_"..math.random(stage,2)})
else else
minetest.add_node(pos, {name="farming:carrot"}) minetest.add_node(pos, {name="mcl_farming:carrot"})
end end
return true return true
elseif string.find(n.name, "farming:pumpkin_") ~= nil then elseif string.find(n.name, "mcl_farming:pumpkin_") ~= nil then
stage = tonumber(string.sub(n.name, 17)) stage = tonumber(string.sub(n.name, 17))
if stage == 1 then if stage == 1 then
minetest.add_node(pos, {name="farming:pumpkin_"..math.random(stage,2)}) minetest.add_node(pos, {name="mcl_farming:pumpkin_"..math.random(stage,2)})
else else
minetest.add_node(pos, {name="farming:pumpkintige_unconnect"}) minetest.add_node(pos, {name="mcl_farming:pumpkintige_unconnect"})
end end
return true return true
elseif string.find(n.name, "farming:melontige_") ~= nil then elseif string.find(n.name, "mcl_farming:melontige_") ~= nil then
stage = tonumber(string.sub(n.name, 18)) stage = tonumber(string.sub(n.name, 18))
if stage == 1 then if stage == 1 then
minetest.add_node(pos, {name="farming:melontige_"..math.random(stage,2)}) minetest.add_node(pos, {name="mcl_farming:melontige_"..math.random(stage,2)})
else else
minetest.add_node(pos, {name="farming:melontige_unconnect"}) minetest.add_node(pos, {name="mcl_farming:melontige_unconnect"})
end end
return true return true
elseif n.name ~= "" and n.name == "default:junglesapling" then elseif n.name ~= "" and n.name == "default:junglesapling" then

View File

@ -867,7 +867,7 @@ minetest.register_node("default:junglegrass", {
max_items = 1, max_items = 1,
items = { items = {
{ {
items = {'farming:wheat_seed'}, items = {'mcl_farming:wheat_seed'},
rarity = 24, rarity = 24,
}, },
} }
@ -1412,7 +1412,7 @@ minetest.register_node("default:grass", {
max_items = 1, max_items = 1,
items = { items = {
{ {
items = {'farming:wheat_seed'}, items = {'mcl_farming:wheat_seed'},
rarity = 24, rarity = 24,
}, },
} }

View File

@ -1 +1,4 @@
default default
bucket
mcl_farming
mcl_mobitems

View File

@ -16,7 +16,7 @@ minetest.register_craft({
recipe = { recipe = {
{'mcl_mobitems:milk_bucket', 'mcl_mobitems:milk_bucket', 'mcl_mobitems:milk_bucket'}, {'mcl_mobitems:milk_bucket', 'mcl_mobitems:milk_bucket', 'mcl_mobitems:milk_bucket'},
{'default:sugar', 'mcl_throwing:egg', 'default:sugar'}, {'default:sugar', 'mcl_throwing:egg', 'default:sugar'},
{'farming:wheat_harvested', 'farming:wheat_harvested', 'farming:wheat_harvested'}, {'mcl_farming:wheat_harvested', 'mcl_farming:wheat_harvested', 'mcl_farming:wheat_harvested'},
}, },
replacements = { replacements = {
{"mcl_mobitems:milk_bucket", "bucket:bucket_empty"}, {"mcl_mobitems:milk_bucket", "bucket:bucket_empty"},

View File

@ -1,8 +1,8 @@
minetest.register_node("farming:carrot_1", { minetest.register_node("mcl_farming:carrot_1", {
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
drawtype = "plantlike", drawtype = "plantlike",
drop = "farming:carrot_item", drop = "mcl_farming:carrot_item",
tiles = {"farming_carrot_1.png"}, tiles = {"farming_carrot_1.png"},
selection_box = { selection_box = {
type = "fixed", type = "fixed",
@ -14,11 +14,11 @@ minetest.register_node("farming:carrot_1", {
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_node("farming:carrot_2", { minetest.register_node("mcl_farming:carrot_2", {
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
drawtype = "plantlike", drawtype = "plantlike",
drop = "farming:carrot_item", drop = "mcl_farming:carrot_item",
tiles = {"farming_carrot_2.png"}, tiles = {"farming_carrot_2.png"},
selection_box = { selection_box = {
type = "fixed", type = "fixed",
@ -30,11 +30,11 @@ minetest.register_node("farming:carrot_2", {
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_node("farming:carrot_3", { minetest.register_node("mcl_farming:carrot_3", {
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
drawtype = "plantlike", drawtype = "plantlike",
drop = "farming:carrot_item", drop = "mcl_farming:carrot_item",
tiles = {"farming_carrot_3.png"}, tiles = {"farming_carrot_3.png"},
selection_box = { selection_box = {
type = "fixed", type = "fixed",
@ -46,7 +46,7 @@ minetest.register_node("farming:carrot_3", {
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_node("farming:carrot", { minetest.register_node("mcl_farming:carrot", {
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
drawtype = "plantlike", drawtype = "plantlike",
@ -54,27 +54,27 @@ minetest.register_node("farming:carrot", {
drop = { drop = {
max_items = 1, max_items = 1,
items = { items = {
{ items = {'farming:carrot_item 4'}, rarity = 5 }, { items = {'mcl_farming:carrot_item 4'}, rarity = 5 },
{ items = {'farming:carrot_item 3'}, rarity = 2 }, { items = {'mcl_farming:carrot_item 3'}, rarity = 2 },
{ items = {'farming:carrot_item 2'}, rarity = 2 }, { items = {'mcl_farming:carrot_item 2'}, rarity = 2 },
{ items = {'farming:carrot_item 1'} }, { items = {'mcl_farming:carrot_item 1'} },
} }
}, },
groups = {snappy=3, flammable=2, not_in_creative_inventory=1,dig_by_water=1}, groups = {snappy=3, flammable=2, not_in_creative_inventory=1,dig_by_water=1},
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_craftitem("farming:carrot_item", { minetest.register_craftitem("mcl_farming:carrot_item", {
description = "Carrot", description = "Carrot",
inventory_image = "farming_carrot.png", inventory_image = "farming_carrot.png",
on_use = minetest.item_eat(3), on_use = minetest.item_eat(3),
groups = { food = 2, eatable = 3 }, groups = { food = 2, eatable = 3 },
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
return farming:place_seed(itemstack, placer, pointed_thing, "farming:carrot_1") return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:carrot_1")
end end
}) })
minetest.register_craftitem("farming:carrot_item_gold", { minetest.register_craftitem("mcl_farming:carrot_item_gold", {
description = "Golden Carrot", description = "Golden Carrot",
inventory_image = "farming_carrot_gold.png", inventory_image = "farming_carrot_gold.png",
on_use = minetest.item_eat(3), on_use = minetest.item_eat(3),
@ -82,12 +82,12 @@ minetest.register_craftitem("farming:carrot_item_gold", {
}) })
minetest.register_craft({ minetest.register_craft({
output = "farming:carrot_item_gold", output = "mcl_farming:carrot_item_gold",
recipe = { recipe = {
{'default:gold_nugget', 'default:gold_nugget', 'default:gold_nugget'}, {'default:gold_nugget', 'default:gold_nugget', 'default:gold_nugget'},
{'default:gold_nugget', 'farming:carrot_item', 'default:gold_nugget'}, {'default:gold_nugget', 'mcl_farming:carrot_item', 'default:gold_nugget'},
{'default:gold_nugget', 'default:gold_nugget', 'default:gold_nugget'}, {'default:gold_nugget', 'default:gold_nugget', 'default:gold_nugget'},
} }
}) })
farming:add_plant("farming:carrot", {"farming:carrot_1", "farming:carrot_2", "farming:carrot_3"}, 50, 20) mcl_farming:add_plant("mcl_farming:carrot", {"mcl_farming:carrot_1", "mcl_farming:carrot_2", "mcl_farming:carrot_3"}, 50, 20)

View File

@ -7,7 +7,7 @@ local function create_soil(pos, inv)
local above = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}) local above = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z})
if minetest.get_item_group(name, "cultivatable") == 2 then if minetest.get_item_group(name, "cultivatable") == 2 then
if above.name == "air" then if above.name == "air" then
node.name = "farming:soil" node.name = "mcl_farming:soil"
minetest.set_node(pos, node) minetest.set_node(pos, node)
return true return true
end end
@ -21,7 +21,7 @@ local function create_soil(pos, inv)
return false return false
end end
minetest.register_tool("farming:hoe_wood", { minetest.register_tool("mcl_farming:hoe_wood", {
description = "Wood Hoe", description = "Wood Hoe",
inventory_image = "farming_tool_woodhoe.png", inventory_image = "farming_tool_woodhoe.png",
on_place = function(itemstack, user, pointed_thing) on_place = function(itemstack, user, pointed_thing)
@ -40,7 +40,7 @@ minetest.register_tool("farming:hoe_wood", {
}) })
minetest.register_craft({ minetest.register_craft({
output = "farming:hoe_wood", output = "mcl_farming:hoe_wood",
recipe = { recipe = {
{"group:wood", "group:wood"}, {"group:wood", "group:wood"},
{"", "default:stick"}, {"", "default:stick"},
@ -48,7 +48,7 @@ minetest.register_craft({
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = "farming:hoe_wood", output = "mcl_farming:hoe_wood",
recipe = { recipe = {
{"group:wood", "group:wood"}, {"group:wood", "group:wood"},
{"default:stick", ""}, {"default:stick", ""},
@ -57,11 +57,11 @@ minetest.register_craft({
}) })
minetest.register_craft({ minetest.register_craft({
type = "fuel", type = "fuel",
recipe = "farming:hoe_wood", recipe = "mcl_farming:hoe_wood",
burntime = 10, burntime = 10,
}) })
minetest.register_tool("farming:hoe_stone", { minetest.register_tool("mcl_farming:hoe_stone", {
description = "Stone Hoe", description = "Stone Hoe",
inventory_image = "farming_tool_stonehoe.png", inventory_image = "farming_tool_stonehoe.png",
on_place = function(itemstack, user, pointed_thing) on_place = function(itemstack, user, pointed_thing)
@ -80,7 +80,7 @@ minetest.register_tool("farming:hoe_stone", {
}) })
minetest.register_craft({ minetest.register_craft({
output = "farming:hoe_stone", output = "mcl_farming:hoe_stone",
recipe = { recipe = {
{"default:cobble", "default:cobble"}, {"default:cobble", "default:cobble"},
{"", "default:stick"}, {"", "default:stick"},
@ -88,7 +88,7 @@ minetest.register_craft({
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = "farming:hoe_stone", output = "mcl_farming:hoe_stone",
recipe = { recipe = {
{"default:cobble", "default:cobble"}, {"default:cobble", "default:cobble"},
{"default:stick", ""}, {"default:stick", ""},
@ -96,7 +96,7 @@ minetest.register_craft({
} }
}) })
minetest.register_tool("farming:hoe_steel", { minetest.register_tool("mcl_farming:hoe_steel", {
description = "Iron Hoe", description = "Iron Hoe",
inventory_image = "farming_tool_steelhoe.png", inventory_image = "farming_tool_steelhoe.png",
on_place = function(itemstack, user, pointed_thing) on_place = function(itemstack, user, pointed_thing)
@ -116,7 +116,7 @@ minetest.register_tool("farming:hoe_steel", {
}) })
minetest.register_craft({ minetest.register_craft({
output = "farming:hoe_steel", output = "mcl_farming:hoe_steel",
recipe = { recipe = {
{"default:steel_ingot", "default:steel_ingot"}, {"default:steel_ingot", "default:steel_ingot"},
{"", "default:stick"}, {"", "default:stick"},
@ -124,7 +124,7 @@ minetest.register_craft({
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = "farming:hoe_steel", output = "mcl_farming:hoe_steel",
recipe = { recipe = {
{"default:steel_ingot", "default:steel_ingot"}, {"default:steel_ingot", "default:steel_ingot"},
{"default:stick", ""}, {"default:stick", ""},
@ -135,11 +135,11 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
type = "cooking", type = "cooking",
output = "default:iron_nugget", output = "default:iron_nugget",
recipe = "farming:hoe_steel", recipe = "mcl_farming:hoe_steel",
cooktime = 10, cooktime = 10,
}) })
minetest.register_tool("farming:hoe_gold", { minetest.register_tool("mcl_farming:hoe_gold", {
description = "Golden Hoe", description = "Golden Hoe",
inventory_image = "farming_tool_goldhoe.png", inventory_image = "farming_tool_goldhoe.png",
on_place = function(itemstack, user, pointed_thing) on_place = function(itemstack, user, pointed_thing)
@ -158,7 +158,7 @@ minetest.register_tool("farming:hoe_gold", {
}) })
minetest.register_craft({ minetest.register_craft({
output = "farming:hoe_gold", output = "mcl_farming:hoe_gold",
recipe = { recipe = {
{"default:gold_ingot", "default:gold_ingot"}, {"default:gold_ingot", "default:gold_ingot"},
{"", "default:stick"}, {"", "default:stick"},
@ -166,7 +166,7 @@ minetest.register_craft({
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = "farming:hoe_gold", output = "mcl_farming:hoe_gold",
recipe = { recipe = {
{"default:gold_ingot", "default:gold_ingot"}, {"default:gold_ingot", "default:gold_ingot"},
{"default:stick", ""}, {"default:stick", ""},
@ -179,11 +179,11 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
type = "cooking", type = "cooking",
output = "default:gold_nugget", output = "default:gold_nugget",
recipe = "farming:hoe_gold", recipe = "mcl_farming:hoe_gold",
cooktime = 10, cooktime = 10,
}) })
minetest.register_tool("farming:hoe_diamond", { minetest.register_tool("mcl_farming:hoe_diamond", {
description = "Diamond Hoe", description = "Diamond Hoe",
inventory_image = "farming_tool_diamondhoe.png", inventory_image = "farming_tool_diamondhoe.png",
on_place = function(itemstack, user, pointed_thing) on_place = function(itemstack, user, pointed_thing)
@ -202,7 +202,7 @@ minetest.register_tool("farming:hoe_diamond", {
}) })
minetest.register_craft({ minetest.register_craft({
output = "farming:hoe_diamond", output = "mcl_farming:hoe_diamond",
recipe = { recipe = {
{"default:diamond", "default:diamond"}, {"default:diamond", "default:diamond"},
{"", "default:stick"}, {"", "default:stick"},
@ -210,7 +210,7 @@ minetest.register_craft({
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = "farming:hoe_diamond", output = "mcl_farming:hoe_diamond",
recipe = { recipe = {
{"default:diamond", "default:diamond"}, {"default:diamond", "default:diamond"},
{"default:stick", ""}, {"default:stick", ""},

View File

@ -1,14 +1,14 @@
local init = os.clock() local init = os.clock()
farming = {} mcl_farming = {}
function farming:add_plant(full_grown, names, interval, chance) function mcl_farming:add_plant(full_grown, names, interval, chance)
minetest.register_abm({ minetest.register_abm({
nodenames = names, nodenames = names,
interval = interval, interval = interval,
chance = chance, chance = chance,
action = function(pos, node) action = function(pos, node)
pos.y = pos.y-1 pos.y = pos.y-1
if minetest.get_node(pos).name ~= "farming:soil_wet" and math.random(0, 9) > 0 then if minetest.get_node(pos).name ~= "mcl_farming:soil_wet" and math.random(0, 9) > 0 then
return return
end end
pos.y = pos.y+1 pos.y = pos.y+1
@ -38,7 +38,7 @@ function farming:add_plant(full_grown, names, interval, chance)
end end
function farming:place_seed(itemstack, placer, pointed_thing, plantname) function mcl_farming:place_seed(itemstack, placer, pointed_thing, plantname)
local pt = pointed_thing local pt = pointed_thing
if not pt then if not pt then
return return
@ -53,7 +53,7 @@ function farming:place_seed(itemstack, placer, pointed_thing, plantname)
local place_s = minetest.get_node(pos) local place_s = minetest.get_node(pos)
if string.find(farmland.name, "farming:soil") and string.find(place_s.name, "air") then if string.find(farmland.name, "mcl_farming:soil") and string.find(place_s.name, "air") then
minetest.add_node(pos, {name=plantname}) minetest.add_node(pos, {name=plantname})
else else
return return
@ -68,28 +68,28 @@ end
-- ========= SOIL ========= -- ========= SOIL =========
dofile(minetest.get_modpath("farming").."/soil.lua") dofile(minetest.get_modpath("mcl_farming").."/soil.lua")
-- ========= HOES ========= -- ========= HOES =========
dofile(minetest.get_modpath("farming").."/hoes.lua") dofile(minetest.get_modpath("mcl_farming").."/hoes.lua")
-- ========= WHEAT ========= -- ========= WHEAT =========
dofile(minetest.get_modpath("farming").."/wheat.lua") dofile(minetest.get_modpath("mcl_farming").."/wheat.lua")
-- ========= PUMPKIN ========= -- ========= PUMPKIN =========
dofile(minetest.get_modpath("farming").."/pumpkin.lua") dofile(minetest.get_modpath("mcl_farming").."/pumpkin.lua")
-- ========= MELON ========= -- ========= MELON =========
dofile(minetest.get_modpath("farming").."/melon.lua") dofile(minetest.get_modpath("mcl_farming").."/melon.lua")
-- ========= CARROT ========= -- ========= CARROT =========
dofile(minetest.get_modpath("farming").."/carrots.lua") dofile(minetest.get_modpath("mcl_farming").."/carrots.lua")
-- ========= POTATOES ========= -- ========= POTATOES =========
dofile(minetest.get_modpath("farming").."/potatoes.lua") dofile(minetest.get_modpath("mcl_farming").."/potatoes.lua")
-- ========= MUSHROOMS ========= -- ========= MUSHROOMS =========
dofile(minetest.get_modpath("farming").."/mushrooms.lua") dofile(minetest.get_modpath("mcl_farming").."/mushrooms.lua")
local time_to_load= os.clock() - init local time_to_load= os.clock() - init
print(string.format("[MOD] "..minetest.get_current_modname().." loaded in %.4f s", time_to_load)) print(string.format("[MOD] "..minetest.get_current_modname().." loaded in %.4f s", time_to_load))

View File

@ -1,4 +1,4 @@
minetest.register_node("farming:melon", { minetest.register_node("mcl_farming:melon", {
description = "Melon", description = "Melon",
paramtype2 = "facedir", paramtype2 = "facedir",
stack_max = 64, stack_max = 64,
@ -7,11 +7,11 @@ minetest.register_node("farming:melon", {
drop = { drop = {
max_items = 1, max_items = 1,
items = { items = {
{ items = {'farming:melon_item 7'}, rarity = 14 }, { items = {'mcl_farming:melon_item 7'}, rarity = 14 },
{ items = {'farming:melon_item 6'}, rarity = 10 }, { items = {'mcl_farming:melon_item 6'}, rarity = 10 },
{ items = {'farming:melon_item 5'}, rarity = 5 }, { items = {'mcl_farming:melon_item 5'}, rarity = 5 },
{ items = {'farming:melon_item 4'}, rarity = 2 }, { items = {'mcl_farming:melon_item 4'}, rarity = 2 },
{ items = {'farming:melon_item 3'} }, { items = {'mcl_farming:melon_item 3'} },
} }
}, },
after_dig_node = function(pos, oldnode, oldmetadata, user) after_dig_node = function(pos, oldnode, oldmetadata, user)
@ -21,7 +21,7 @@ minetest.register_node("farming:melon", {
local n = minetest.get_node(p) local n = minetest.get_node(p)
if string.find(n.name, "melontige_linked_") and have_change == 0 then if string.find(n.name, "melontige_linked_") and have_change == 0 then
have_change = 1 have_change = 1
minetest.add_node(p, {name="farming:melontige_unconnect"}) minetest.add_node(p, {name="mcl_farming:melontige_unconnect"})
end end
end end
if have_change == 0 then if have_change == 0 then
@ -30,14 +30,14 @@ minetest.register_node("farming:melon", {
local n = minetest.get_node(p) local n = minetest.get_node(p)
if string.find(n.name, "melontige_linked_") and have_change == 0 then if string.find(n.name, "melontige_linked_") and have_change == 0 then
have_change = 1 have_change = 1
minetest.add_node(p, {name="farming:melontige_unconnect"}) minetest.add_node(p, {name="mcl_farming:melontige_unconnect"})
end end
end end
end end
end end
}) })
minetest.register_node("farming:melontige_1", { minetest.register_node("mcl_farming:melontige_1", {
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
drawtype = "plantlike", drawtype = "plantlike",
@ -54,7 +54,7 @@ minetest.register_node("farming:melontige_1", {
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_node("farming:melontige_2", { minetest.register_node("mcl_farming:melontige_2", {
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
drawtype = "plantlike", drawtype = "plantlike",
@ -71,7 +71,7 @@ minetest.register_node("farming:melontige_2", {
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_node("farming:melontige_unconnect", { minetest.register_node("mcl_farming:melontige_unconnect", {
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
sunlight_propagates = true, sunlight_propagates = true,
@ -82,7 +82,7 @@ minetest.register_node("farming:melontige_unconnect", {
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_node("farming:melontige_linked_r", { minetest.register_node("mcl_farming:melontige_linked_r", {
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
walkable = false, walkable = false,
@ -112,7 +112,7 @@ minetest.register_node("farming:melontige_linked_r", {
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_node("farming:melontige_linked_l", { minetest.register_node("mcl_farming:melontige_linked_l", {
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
sunlight_propagates = true, sunlight_propagates = true,
@ -142,7 +142,7 @@ minetest.register_node("farming:melontige_linked_l", {
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_node("farming:melontige_linked_t", { minetest.register_node("mcl_farming:melontige_linked_t", {
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
sunlight_propagates = true, sunlight_propagates = true,
@ -172,7 +172,7 @@ minetest.register_node("farming:melontige_linked_t", {
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_node("farming:melontige_linked_b", { minetest.register_node("mcl_farming:melontige_linked_b", {
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
sunlight_propagates = true, sunlight_propagates = true,
@ -202,17 +202,17 @@ minetest.register_node("farming:melontige_linked_b", {
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_craftitem("farming:melon_seed", { minetest.register_craftitem("mcl_farming:melon_seed", {
description = "Melon Seeds", description = "Melon Seeds",
stack_max = 64, stack_max = 64,
groups = { craftitem=1 }, groups = { craftitem=1 },
inventory_image = "farming_melon_seed.png", inventory_image = "farming_melon_seed.png",
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
return farming:place_seed(itemstack, placer, pointed_thing, "farming:melontige_1") return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:melontige_1")
end, end,
}) })
minetest.register_craftitem("farming:melon_item", { minetest.register_craftitem("mcl_farming:melon_item", {
description = "Melon", description = "Melon",
stack_max = 64, stack_max = 64,
inventory_image = "farming_melon.png", inventory_image = "farming_melon.png",
@ -221,7 +221,7 @@ minetest.register_craftitem("farming:melon_item", {
}) })
minetest.register_abm({ minetest.register_abm({
nodenames = {"farming:melontige_unconnect"}, nodenames = {"mcl_farming:melontige_unconnect"},
neighbors = {"air"}, neighbors = {"air"},
interval = 25, interval = 25,
chance = 15, chance = 15,
@ -237,13 +237,13 @@ minetest.register_abm({
local nod = minetest.get_node(newpos) local nod = minetest.get_node(newpos)
if n.name=="default:dirt_with_grass" and nod.name=="air" and have_change == 0 if n.name=="default:dirt_with_grass" and nod.name=="air" and have_change == 0
or n.name=="default:dirt" and nod.name=="air" and have_change == 0 or n.name=="default:dirt" and nod.name=="air" and have_change == 0
or string.find(n.name, "farming:soil") and nod.name=="air" and have_change == 0 then or string.find(n.name, "mcl_farming:soil") and nod.name=="air" and have_change == 0 then
have_change = 1 have_change = 1
minetest.add_node(newpos, {name="farming:melon"}) minetest.add_node(newpos, {name="mcl_farming:melon"})
if x == 1 then if x == 1 then
minetest.add_node(pos, {name="farming:melontige_linked_r" }) minetest.add_node(pos, {name="mcl_farming:melontige_linked_r" })
else else
minetest.add_node(pos, {name="farming:melontige_linked_l"}) minetest.add_node(pos, {name="mcl_farming:melontige_linked_l"})
end end
end end
end end
@ -255,13 +255,13 @@ minetest.register_abm({
local nod2 = minetest.get_node(newpos) local nod2 = minetest.get_node(newpos)
if n.name=="default:dirt_with_grass" and nod2.name=="air" and have_change == 0 if n.name=="default:dirt_with_grass" and nod2.name=="air" and have_change == 0
or n.name=="default:dirt" and nod2.name=="air" and have_change == 0 or n.name=="default:dirt" and nod2.name=="air" and have_change == 0
or string.find(n.name, "farming:soil") and nod2.name=="air" and have_change == 0 then or string.find(n.name, "mcl_farming:soil") and nod2.name=="air" and have_change == 0 then
have_change = 1 have_change = 1
minetest.add_node(newpos, {name="farming:melon"}) minetest.add_node(newpos, {name="mcl_farming:melon"})
if z == 1 then if z == 1 then
minetest.add_node(pos, {name="farming:melontige_linked_t" }) minetest.add_node(pos, {name="mcl_farming:melontige_linked_t" })
else else
minetest.add_node(pos, {name="farming:melontige_linked_b" }) minetest.add_node(pos, {name="mcl_farming:melontige_linked_b" })
end end
end end
end end
@ -270,20 +270,20 @@ minetest.register_abm({
end, end,
}) })
farming:add_plant("farming:melontige_unconnect", {"farming:melontige_1", "farming:melontige_2"}, 50, 20) mcl_farming:add_plant("mcl_farming:melontige_unconnect", {"mcl_farming:melontige_1", "mcl_farming:melontige_2"}, 50, 20)
minetest.register_craft({ minetest.register_craft({
type = "shapeless", type = "shapeless",
output = "farming:melon_seed", output = "mcl_farming:melon_seed",
recipe = {"farming:melon_item"} recipe = {"mcl_farming:melon_item"}
}) })
minetest.register_craft({ minetest.register_craft({
output = 'farming:melon', output = 'mcl_farming:melon',
recipe = { recipe = {
{'farming:melon_item', 'farming:melon_item', 'farming:melon_item'}, {'mcl_farming:melon_item', 'mcl_farming:melon_item', 'mcl_farming:melon_item'},
{'farming:melon_item', 'farming:melon_item', 'farming:melon_item'}, {'mcl_farming:melon_item', 'mcl_farming:melon_item', 'mcl_farming:melon_item'},
{'farming:melon_item', 'farming:melon_item', 'farming:melon_item'}, {'mcl_farming:melon_item', 'mcl_farming:melon_item', 'mcl_farming:melon_item'},
} }
}) })

View File

@ -0,0 +1 @@
name = mcl_farming

View File

@ -1,4 +1,4 @@
minetest.register_node("farming:mushroom_brown", { minetest.register_node("mcl_farming:mushroom_brown", {
description = "Brown Mushroom", description = "Brown Mushroom",
drawtype = "plantlike", drawtype = "plantlike",
tiles = { "farming_mushroom_brown.png" }, tiles = { "farming_mushroom_brown.png" },
@ -16,7 +16,7 @@ minetest.register_node("farming:mushroom_brown", {
}, },
}) })
minetest.register_node("farming:mushroom_red", { minetest.register_node("mcl_farming:mushroom_red", {
description = "Red Mushroom", description = "Red Mushroom",
drawtype = "plantlike", drawtype = "plantlike",
tiles = { "farming_mushroom_red.png" }, tiles = { "farming_mushroom_red.png" },
@ -33,7 +33,7 @@ minetest.register_node("farming:mushroom_red", {
}, },
}) })
minetest.register_craftitem("farming:mushroom_stew", { minetest.register_craftitem("mcl_farming:mushroom_stew", {
description = "Mushroom Stew", description = "Mushroom Stew",
inventory_image = "farming_mushroom_stew.png", inventory_image = "farming_mushroom_stew.png",
on_use = minetest.item_eat(6, "default:bowl"), on_use = minetest.item_eat(6, "default:bowl"),
@ -43,6 +43,6 @@ minetest.register_craftitem("farming:mushroom_stew", {
minetest.register_craft({ minetest.register_craft({
type = "shapeless", type = "shapeless",
output = "farming:mushroom_stew", output = "mcl_farming:mushroom_stew",
recipe = {'default:bowl', 'farming:mushroom_brown', 'farming:mushroom_red'} recipe = {'default:bowl', 'mcl_farming:mushroom_brown', 'mcl_farming:mushroom_red'}
}) })

View File

@ -1,8 +1,8 @@
minetest.register_node("farming:potato_1", { minetest.register_node("mcl_farming:potato_1", {
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
drawtype = "plantlike", drawtype = "plantlike",
drop = "farming:potato_item", drop = "mcl_farming:potato_item",
tiles = {"farming_potato_1.png"}, tiles = {"farming_potato_1.png"},
selection_box = { selection_box = {
type = "fixed", type = "fixed",
@ -14,11 +14,11 @@ minetest.register_node("farming:potato_1", {
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_node("farming:potato_2", { minetest.register_node("mcl_farming:potato_2", {
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
drawtype = "plantlike", drawtype = "plantlike",
drop = "farming:potato_item", drop = "mcl_farming:potato_item",
tiles = {"farming_potato_2.png"}, tiles = {"farming_potato_2.png"},
selection_box = { selection_box = {
type = "fixed", type = "fixed",
@ -30,7 +30,7 @@ minetest.register_node("farming:potato_2", {
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_node("farming:potato", { minetest.register_node("mcl_farming:potato", {
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
drawtype = "plantlike", drawtype = "plantlike",
@ -38,27 +38,27 @@ minetest.register_node("farming:potato", {
drop = { drop = {
max_items = 1, max_items = 1,
items = { items = {
{ items = {'farming:potato_item 2'} }, { items = {'mcl_farming:potato_item 2'} },
{ items = {'farming:potato_item 3'}, rarity = 2 }, { items = {'mcl_farming:potato_item 3'}, rarity = 2 },
{ items = {'farming:potato_item 4'}, rarity = 5 } { items = {'mcl_farming:potato_item 4'}, rarity = 5 }
} }
}, },
groups = {snappy=3, flammable=2, not_in_creative_inventory=1,dig_by_water=1}, groups = {snappy=3, flammable=2, not_in_creative_inventory=1,dig_by_water=1},
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_craftitem("farming:potato_item", { minetest.register_craftitem("mcl_farming:potato_item", {
description = "Potato", description = "Potato",
inventory_image = "farming_potato.png", inventory_image = "farming_potato.png",
on_use = minetest.item_eat(1), on_use = minetest.item_eat(1),
groups = { food = 2, eatable = 1 }, groups = { food = 2, eatable = 1 },
stack_max = 64, stack_max = 64,
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
return farming:place_seed(itemstack, placer, pointed_thing, "farming:potato_1") return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:potato_1")
end, end,
}) })
minetest.register_craftitem("farming:potato_item_baked", { minetest.register_craftitem("mcl_farming:potato_item_baked", {
description = "Baked Potato", description = "Baked Potato",
stack_max = 64, stack_max = 64,
inventory_image = "farming_potato_baked.png", inventory_image = "farming_potato_baked.png",
@ -66,7 +66,7 @@ minetest.register_craftitem("farming:potato_item_baked", {
groups = { food = 2, eatable = 6 }, groups = { food = 2, eatable = 6 },
}) })
minetest.register_craftitem("farming:potato_item_poison", { minetest.register_craftitem("mcl_farming:potato_item_poison", {
description = "Poisonous Potato", description = "Poisonous Potato",
stack_max = 64, stack_max = 64,
inventory_image = "farming_potato_poison.png", inventory_image = "farming_potato_poison.png",
@ -76,8 +76,8 @@ minetest.register_craftitem("farming:potato_item_poison", {
minetest.register_craft({ minetest.register_craft({
type = "cooking", type = "cooking",
output = "farming:potato_item_baked", output = "mcl_farming:potato_item_baked",
recipe = "farming:potato_item", recipe = "mcl_farming:potato_item",
}) })
farming:add_plant("farming:potato", {"farming:potato_1", "farming:potato_2"}, 50, 20) mcl_farming:add_plant("mcl_farming:potato", {"mcl_farming:potato_1", "mcl_farming:potato_2"}, 50, 20)

View File

@ -1,4 +1,4 @@
minetest.register_craftitem("farming:pumpkin_seed", { minetest.register_craftitem("mcl_farming:pumpkin_seed", {
description = "Pumpkin Seed", description = "Pumpkin Seed",
stack_max = 64, stack_max = 64,
inventory_image = "farming_pumpkin_seed.png", inventory_image = "farming_pumpkin_seed.png",
@ -6,7 +6,7 @@ minetest.register_craftitem("farming:pumpkin_seed", {
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
local above = minetest.get_node(pointed_thing.above) local above = minetest.get_node(pointed_thing.above)
if above.name == "air" then if above.name == "air" then
above.name = "farming:pumpkin_1" above.name = "mcl_farming:pumpkin_1"
minetest.set_node(pointed_thing.above, above) minetest.set_node(pointed_thing.above, above)
itemstack:take_item(1) itemstack:take_item(1)
return itemstack return itemstack
@ -14,7 +14,7 @@ minetest.register_craftitem("farming:pumpkin_seed", {
end end
}) })
minetest.register_node("farming:pumpkin_1", { minetest.register_node("mcl_farming:pumpkin_1", {
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
drawtype = "plantlike", drawtype = "plantlike",
@ -31,7 +31,7 @@ minetest.register_node("farming:pumpkin_1", {
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_node("farming:pumpkin_2", { minetest.register_node("mcl_farming:pumpkin_2", {
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
drawtype = "plantlike", drawtype = "plantlike",
@ -49,7 +49,7 @@ minetest.register_node("farming:pumpkin_2", {
}) })
minetest.register_node("farming:pumpkin_face", { minetest.register_node("mcl_farming:pumpkin_face", {
description = "Pumpkin", description = "Pumpkin",
stack_max = 64, stack_max = 64,
paramtype2 = "facedir", paramtype2 = "facedir",
@ -62,7 +62,7 @@ minetest.register_node("farming:pumpkin_face", {
local n = minetest.get_node(p) local n = minetest.get_node(p)
if string.find(n.name, "pumpkintige_linked_") and have_change == 0 then if string.find(n.name, "pumpkintige_linked_") and have_change == 0 then
have_change = 1 have_change = 1
minetest.add_node(p, {name="farming:pumpkintige_unconnect"}) minetest.add_node(p, {name="mcl_farming:pumpkintige_unconnect"})
end end
end end
if have_change == 0 then if have_change == 0 then
@ -71,7 +71,7 @@ minetest.register_node("farming:pumpkin_face", {
local n = minetest.get_node(p) local n = minetest.get_node(p)
if string.find(n.name, "pumpkintige_linked_") and have_change == 0 then if string.find(n.name, "pumpkintige_linked_") and have_change == 0 then
have_change = 1 have_change = 1
minetest.add_node(p, {name="farming:pumpkintige_unconnect"}) minetest.add_node(p, {name="mcl_farming:pumpkintige_unconnect"})
end end
end end
end end
@ -79,7 +79,7 @@ minetest.register_node("farming:pumpkin_face", {
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
}) })
minetest.register_node("farming:pumpkintige_unconnect", { minetest.register_node("mcl_farming:pumpkintige_unconnect", {
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
sunlight_propagates = true, sunlight_propagates = true,
@ -91,7 +91,7 @@ minetest.register_node("farming:pumpkintige_unconnect", {
}) })
minetest.register_node("farming:pumpkintige_linked_r", { minetest.register_node("mcl_farming:pumpkintige_linked_r", {
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
walkable = false, walkable = false,
@ -121,7 +121,7 @@ minetest.register_node("farming:pumpkintige_linked_r", {
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_node("farming:pumpkintige_linked_l", { minetest.register_node("mcl_farming:pumpkintige_linked_l", {
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
sunlight_propagates = true, sunlight_propagates = true,
@ -151,7 +151,7 @@ minetest.register_node("farming:pumpkintige_linked_l", {
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_node("farming:pumpkintige_linked_t", { minetest.register_node("mcl_farming:pumpkintige_linked_t", {
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
sunlight_propagates = true, sunlight_propagates = true,
@ -181,7 +181,7 @@ minetest.register_node("farming:pumpkintige_linked_t", {
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_node("farming:pumpkintige_linked_b", { minetest.register_node("mcl_farming:pumpkintige_linked_b", {
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
sunlight_propagates = true, sunlight_propagates = true,
@ -211,11 +211,11 @@ minetest.register_node("farming:pumpkintige_linked_b", {
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
farming:add_plant("farming:pumpkintige_unconnect", {"farming:pumpkin_1", "farming:pumpkin_2"}, 80, 20) mcl_farming:add_plant("mcl_farming:pumpkintige_unconnect", {"mcl_farming:pumpkin_1", "mcl_farming:pumpkin_2"}, 80, 20)
minetest.register_abm({ minetest.register_abm({
nodenames = {"farming:pumpkintige_unconnect"}, nodenames = {"mcl_farming:pumpkintige_unconnect"},
neighbors = {"air"}, neighbors = {"air"},
interval = 30, interval = 30,
chance = 15, chance = 15,
@ -231,13 +231,13 @@ minetest.register_abm({
local nod = minetest.get_node(newpos) local nod = minetest.get_node(newpos)
if n.name=="default:dirt_with_grass" and nod.name=="air" and have_change == 0 if n.name=="default:dirt_with_grass" and nod.name=="air" and have_change == 0
or n.name=="default:dirt" and nod.name=="air" and have_change == 0 or n.name=="default:dirt" and nod.name=="air" and have_change == 0
or string.find(n.name, "farming:soil") and nod.name=="air" and have_change == 0 then or string.find(n.name, "mcl_farming:soil") and nod.name=="air" and have_change == 0 then
have_change = 1 have_change = 1
minetest.add_node(newpos, {name="farming:pumpkin_face"}) minetest.add_node(newpos, {name="mcl_farming:pumpkin_face"})
if x == 1 then if x == 1 then
minetest.add_node(pos, {name="farming:pumpkintige_linked_r" }) minetest.add_node(pos, {name="mcl_farming:pumpkintige_linked_r" })
else else
minetest.add_node(pos, {name="farming:pumpkintige_linked_l"}) minetest.add_node(pos, {name="mcl_farming:pumpkintige_linked_l"})
end end
end end
end end
@ -249,13 +249,13 @@ minetest.register_abm({
local nod2 = minetest.get_node(newpos) local nod2 = minetest.get_node(newpos)
if n.name=="default:dirt_with_grass" and nod2.name=="air" and have_change == 0 if n.name=="default:dirt_with_grass" and nod2.name=="air" and have_change == 0
or n.name=="default:dirt" and nod2.name=="air" and have_change == 0 or n.name=="default:dirt" and nod2.name=="air" and have_change == 0
or string.find(n.name, "farming:soil") and nod2.name=="air" and have_change == 0 then or string.find(n.name, "mcl_farming:soil") and nod2.name=="air" and have_change == 0 then
have_change = 1 have_change = 1
minetest.add_node(newpos, {name="farming:pumpkin_face"}) minetest.add_node(newpos, {name="mcl_farming:pumpkin_face"})
if z == 1 then if z == 1 then
minetest.add_node(pos, {name="farming:pumpkintige_linked_t" }) minetest.add_node(pos, {name="mcl_farming:pumpkintige_linked_t" })
else else
minetest.add_node(pos, {name="farming:pumpkintige_linked_b" }) minetest.add_node(pos, {name="mcl_farming:pumpkintige_linked_b" })
end end
end end
end end
@ -266,7 +266,7 @@ minetest.register_abm({
minetest.register_node("farming:pumpkin_face_light", { minetest.register_node("mcl_farming:pumpkin_face_light", {
description = "Jack o'Lantern", description = "Jack o'Lantern",
stack_max = 64, stack_max = 64,
paramtype2 = "facedir", paramtype2 = "facedir",
@ -277,14 +277,14 @@ minetest.register_node("farming:pumpkin_face_light", {
}) })
minetest.register_craft({ minetest.register_craft({
output = "farming:pumpkin_face_light", output = "mcl_farming:pumpkin_face_light",
recipe = {{"farming:pumpkin_face"}, recipe = {{"mcl_farming:pumpkin_face"},
{"default:torch"}} {"default:torch"}}
}) })
minetest.register_craft({ minetest.register_craft({
type = "shapeless", type = "shapeless",
output = "farming:pumpkin_seed 4", output = "mcl_farming:pumpkin_seed 4",
recipe = {"farming:pumpkin_face"} recipe = {"mcl_farming:pumpkin_face"}
}) })

View File

@ -1,4 +1,4 @@
minetest.register_node("farming:soil", { minetest.register_node("mcl_farming:soil", {
tiles = {"farming_soil.png", "default_dirt.png", "default_dirt.png", "default_dirt.png", "default_dirt.png", "default_dirt.png"}, tiles = {"farming_soil.png", "default_dirt.png", "default_dirt.png", "default_dirt.png", "default_dirt.png", "default_dirt.png"},
description = "Farmland", description = "Farmland",
drop = "default:dirt", drop = "default:dirt",
@ -15,7 +15,7 @@ minetest.register_node("farming:soil", {
sounds = default.node_sound_dirt_defaults(), sounds = default.node_sound_dirt_defaults(),
}) })
minetest.register_node("farming:soil_wet", { minetest.register_node("mcl_farming:soil_wet", {
tiles = {"farming_soil_wet.png", "default_dirt.png", "default_dirt.png", "default_dirt.png", "default_dirt.png", "default_dirt.png"}, tiles = {"farming_soil_wet.png", "default_dirt.png", "default_dirt.png", "default_dirt.png", "default_dirt.png", "default_dirt.png"},
description = "Hydrated Farmland", description = "Hydrated Farmland",
drop = "default:dirt", drop = "default:dirt",
@ -32,12 +32,12 @@ minetest.register_node("farming:soil_wet", {
}) })
minetest.register_abm({ minetest.register_abm({
nodenames = {"farming:soil"}, nodenames = {"mcl_farming:soil"},
interval = 15, interval = 15,
chance = 3, chance = 3,
action = function(pos, node) action = function(pos, node)
if minetest.find_node_near(pos, 3, {"default:water_source", "default:water_flowing"}) then if minetest.find_node_near(pos, 3, {"default:water_source", "default:water_flowing"}) then
node.name = "farming:soil_wet" node.name = "mcl_farming:soil_wet"
minetest.set_node(pos, node) minetest.set_node(pos, node)
end end
end, end,

View File

Before

Width:  |  Height:  |  Size: 289 B

After

Width:  |  Height:  |  Size: 289 B

View File

Before

Width:  |  Height:  |  Size: 307 B

After

Width:  |  Height:  |  Size: 307 B

View File

Before

Width:  |  Height:  |  Size: 153 B

After

Width:  |  Height:  |  Size: 153 B

View File

Before

Width:  |  Height:  |  Size: 200 B

After

Width:  |  Height:  |  Size: 200 B

View File

Before

Width:  |  Height:  |  Size: 270 B

After

Width:  |  Height:  |  Size: 270 B

View File

Before

Width:  |  Height:  |  Size: 462 B

After

Width:  |  Height:  |  Size: 462 B

View File

Before

Width:  |  Height:  |  Size: 266 B

After

Width:  |  Height:  |  Size: 266 B

View File

Before

Width:  |  Height:  |  Size: 314 B

After

Width:  |  Height:  |  Size: 314 B

View File

Before

Width:  |  Height:  |  Size: 360 B

After

Width:  |  Height:  |  Size: 360 B

View File

Before

Width:  |  Height:  |  Size: 190 B

After

Width:  |  Height:  |  Size: 190 B

View File

Before

Width:  |  Height:  |  Size: 622 B

After

Width:  |  Height:  |  Size: 622 B

View File

Before

Width:  |  Height:  |  Size: 490 B

After

Width:  |  Height:  |  Size: 490 B

View File

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 169 B

View File

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 205 B

View File

Before

Width:  |  Height:  |  Size: 273 B

After

Width:  |  Height:  |  Size: 273 B

View File

Before

Width:  |  Height:  |  Size: 338 B

After

Width:  |  Height:  |  Size: 338 B

View File

Before

Width:  |  Height:  |  Size: 200 B

After

Width:  |  Height:  |  Size: 200 B

View File

Before

Width:  |  Height:  |  Size: 270 B

After

Width:  |  Height:  |  Size: 270 B

View File

Before

Width:  |  Height:  |  Size: 374 B

After

Width:  |  Height:  |  Size: 374 B

View File

Before

Width:  |  Height:  |  Size: 330 B

After

Width:  |  Height:  |  Size: 330 B

View File

Before

Width:  |  Height:  |  Size: 422 B

After

Width:  |  Height:  |  Size: 422 B

View File

Before

Width:  |  Height:  |  Size: 337 B

After

Width:  |  Height:  |  Size: 337 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 195 B

After

Width:  |  Height:  |  Size: 195 B

View File

Before

Width:  |  Height:  |  Size: 267 B

After

Width:  |  Height:  |  Size: 267 B

View File

Before

Width:  |  Height:  |  Size: 395 B

After

Width:  |  Height:  |  Size: 395 B

View File

Before

Width:  |  Height:  |  Size: 374 B

After

Width:  |  Height:  |  Size: 374 B

View File

Before

Width:  |  Height:  |  Size: 374 B

After

Width:  |  Height:  |  Size: 374 B

View File

Before

Width:  |  Height:  |  Size: 156 B

After

Width:  |  Height:  |  Size: 156 B

View File

Before

Width:  |  Height:  |  Size: 307 B

After

Width:  |  Height:  |  Size: 307 B

View File

Before

Width:  |  Height:  |  Size: 294 B

After

Width:  |  Height:  |  Size: 294 B

View File

Before

Width:  |  Height:  |  Size: 363 B

After

Width:  |  Height:  |  Size: 363 B

View File

Before

Width:  |  Height:  |  Size: 234 B

After

Width:  |  Height:  |  Size: 234 B

View File

Before

Width:  |  Height:  |  Size: 234 B

After

Width:  |  Height:  |  Size: 234 B

View File

Before

Width:  |  Height:  |  Size: 234 B

After

Width:  |  Height:  |  Size: 234 B

View File

Before

Width:  |  Height:  |  Size: 234 B

After

Width:  |  Height:  |  Size: 234 B

View File

Before

Width:  |  Height:  |  Size: 234 B

After

Width:  |  Height:  |  Size: 234 B

View File

Before

Width:  |  Height:  |  Size: 842 B

After

Width:  |  Height:  |  Size: 842 B

View File

Before

Width:  |  Height:  |  Size: 229 B

After

Width:  |  Height:  |  Size: 229 B

View File

Before

Width:  |  Height:  |  Size: 625 B

After

Width:  |  Height:  |  Size: 625 B

View File

Before

Width:  |  Height:  |  Size: 748 B

After

Width:  |  Height:  |  Size: 748 B

View File

Before

Width:  |  Height:  |  Size: 390 B

After

Width:  |  Height:  |  Size: 390 B

View File

Before

Width:  |  Height:  |  Size: 209 B

After

Width:  |  Height:  |  Size: 209 B

View File

@ -1,19 +1,19 @@
minetest.register_craftitem("farming:wheat_seed", { minetest.register_craftitem("mcl_farming:wheat_seed", {
description = "Wheat Seeds", description = "Wheat Seeds",
groups = { craftitem=1 }, groups = { craftitem=1 },
inventory_image = "farming_wheat_seed.png", inventory_image = "farming_wheat_seed.png",
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
return farming:place_seed(itemstack, placer, pointed_thing, "farming:wheat_1") return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:wheat_1")
end end
}) })
minetest.register_node("farming:wheat_1", { minetest.register_node("mcl_farming:wheat_1", {
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
walkable = false, walkable = false,
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
drop = "farming:wheat_seed", drop = "mcl_farming:wheat_seed",
tiles = {"farming_wheat_1.png"}, tiles = {"farming_wheat_1.png"},
selection_box = { selection_box = {
type = "fixed", type = "fixed",
@ -34,13 +34,13 @@ minetest.register_node("farming:wheat_1", {
}, },
}) })
minetest.register_node("farming:wheat_2", { minetest.register_node("mcl_farming:wheat_2", {
sunlight_propagates = true, sunlight_propagates = true,
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
drop = "farming:wheat_seed", drop = "mcl_farming:wheat_seed",
tiles = {"farming_wheat_2.png"}, tiles = {"farming_wheat_2.png"},
selection_box = { selection_box = {
type = "fixed", type = "fixed",
@ -61,13 +61,13 @@ minetest.register_node("farming:wheat_2", {
}, },
}) })
minetest.register_node("farming:wheat_3", { minetest.register_node("mcl_farming:wheat_3", {
sunlight_propagates = true, sunlight_propagates = true,
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
drop = "farming:wheat_seed", drop = "mcl_farming:wheat_seed",
tiles = {"farming_wheat_3.png"}, tiles = {"farming_wheat_3.png"},
selection_box = { selection_box = {
type = "fixed", type = "fixed",
@ -88,7 +88,7 @@ minetest.register_node("farming:wheat_3", {
}, },
}) })
minetest.register_node("farming:wheat", { minetest.register_node("mcl_farming:wheat", {
sunlight_propagates = true, sunlight_propagates = true,
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
@ -98,10 +98,10 @@ minetest.register_node("farming:wheat", {
drop = { drop = {
max_items = 4, max_items = 4,
items = { items = {
{ items = {'farming:wheat_seed'} }, { items = {'mcl_farming:wheat_seed'} },
{ items = {'farming:wheat_seed'}, rarity = 2}, { items = {'mcl_farming:wheat_seed'}, rarity = 2},
{ items = {'farming:wheat_seed'}, rarity = 5}, { items = {'mcl_farming:wheat_seed'}, rarity = 5},
{ items = {'farming:wheat_harvested'} } { items = {'mcl_farming:wheat_harvested'} }
} }
}, },
selection_box = { selection_box = {
@ -123,29 +123,29 @@ minetest.register_node("farming:wheat", {
}, },
}) })
farming:add_plant("farming:wheat", {"farming:wheat_1", "farming:wheat_2", "farming:wheat_3"}, 50, 20) mcl_farming:add_plant("mcl_farming:wheat", {"mcl_farming:wheat_1", "mcl_farming:wheat_2", "mcl_farming:wheat_3"}, 50, 20)
minetest.register_craftitem("farming:wheat_harvested", { minetest.register_craftitem("mcl_farming:wheat_harvested", {
description = "Wheat", description = "Wheat",
inventory_image = "farming_wheat_harvested.png", inventory_image = "farming_wheat_harvested.png",
groups = { craftitem = 1 }, groups = { craftitem = 1 },
}) })
minetest.register_craft({ minetest.register_craft({
output = "farming:bread", output = "mcl_farming:bread",
recipe = { recipe = {
{'farming:wheat_harvested', 'farming:wheat_harvested', 'farming:wheat_harvested'}, {'mcl_farming:wheat_harvested', 'mcl_farming:wheat_harvested', 'mcl_farming:wheat_harvested'},
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = "farming:cookie 8", output = "mcl_farming:cookie 8",
recipe = { recipe = {
{'farming:wheat_harvested', 'mcl_dye:brown', 'farming:wheat_harvested'}, {'mcl_farming:wheat_harvested', 'mcl_dye:brown', 'mcl_farming:wheat_harvested'},
} }
}) })
minetest.register_craftitem("farming:cookie", { minetest.register_craftitem("mcl_farming:cookie", {
description = "Cookie", description = "Cookie",
inventory_image = "farming_cookie.png", inventory_image = "farming_cookie.png",
groups = {food=2, eatable=2}, groups = {food=2, eatable=2},
@ -153,7 +153,7 @@ minetest.register_craftitem("farming:cookie", {
}) })
minetest.register_craftitem("farming:bread", { minetest.register_craftitem("mcl_farming:bread", {
description = "Bread", description = "Bread",
inventory_image = "farming_bread.png", inventory_image = "farming_bread.png",
groups = {food=2, eatable=5}, groups = {food=2, eatable=5},

View File

@ -208,7 +208,7 @@ minetest.register_node("mcl_flowers:fern", {
max_items = 1, max_items = 1,
items = { items = {
{ {
items = {'farming:wheat_seed'}, items = {'mcl_farming:wheat_seed'},
rarity = 24, rarity = 24,
}, },
} }

View File

@ -1,3 +1,3 @@
default default
farming mcl_farming
mcl_mobitems mcl_mobitems

View File

@ -9,7 +9,7 @@ minetest.register_craftitem("mcl_potions:fermented_spider_eye", {
minetest.register_craft({ minetest.register_craft({
type = "shapeless", type = "shapeless",
output = "mcl_potions:fermented_spider_eye", output = "mcl_potions:fermented_spider_eye",
recipe = { "farming:mushroom_brown", "default:sugar", "mcl_mobitems:spider_eye" }, recipe = { "mcl_farming:mushroom_brown", "default:sugar", "mcl_mobitems:spider_eye" },
}) })
minetest.register_craftitem("mcl_potions:glass_bottle", { minetest.register_craftitem("mcl_potions:glass_bottle", {
@ -38,7 +38,7 @@ minetest.register_craft({
output = "mcl_potions:speckled_melon", output = "mcl_potions:speckled_melon",
recipe = { recipe = {
{'default:gold_nugget', 'default:gold_nugget', 'default:gold_nugget'}, {'default:gold_nugget', 'default:gold_nugget', 'default:gold_nugget'},
{'default:gold_nugget', 'farming:melon_item', 'default:gold_nugget'}, {'default:gold_nugget', 'mcl_farming:melon_item', 'default:gold_nugget'},
{'default:gold_nugget', 'default:gold_nugget', 'default:gold_nugget'}, {'default:gold_nugget', 'default:gold_nugget', 'default:gold_nugget'},
} }
}) })

View File

@ -14,17 +14,19 @@ For further information or help see:
http://wiki.minetest.com/wiki/Installing_Mods http://wiki.minetest.com/wiki/Installing_Mods
How to use the mod: How to use the mod:
Craft a bow with the strings from the farming mod: Craft a bow with strings:
wood string stick string
wood string stick string
wood string stick string
Craft arrows with: Craft arrows with:
flint flint
stick stick
paper paper
Select the bow and shoot with left mouse click. Every shoot will take 1 Select the bow and shoot with left mouse click. Every shoot will take 1
arrow from your inventory and wears out the bow (you have around 385 arrow from your inventory and wears out the bow (you have around 385
shoots). shots).
License: License:
This mod was originally published by Jeija. This mod was originally published by Jeija.