2017-02-10 18:00:29 +02:00
|
|
|
minetest.register_craftitem("mcl_farming:wheat_seeds", {
|
2015-06-29 20:55:56 +03:00
|
|
|
description = "Wheat Seeds",
|
2017-01-20 12:24:39 +02:00
|
|
|
groups = { craftitem=1 },
|
2015-06-29 20:55:56 +03:00
|
|
|
inventory_image = "farming_wheat_seed.png",
|
|
|
|
on_place = function(itemstack, placer, pointed_thing)
|
2017-01-31 13:35:59 +02:00
|
|
|
return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:wheat_1")
|
2015-06-29 20:55:56 +03:00
|
|
|
end
|
|
|
|
})
|
|
|
|
|
2017-01-31 13:35:59 +02:00
|
|
|
minetest.register_node("mcl_farming:wheat_1", {
|
2015-06-29 20:55:56 +03:00
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
walkable = false,
|
2015-07-03 07:58:01 +03:00
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
2017-02-10 18:00:29 +02:00
|
|
|
drop = "mcl_farming:wheat_seeds",
|
2015-06-29 20:55:56 +03:00
|
|
|
tiles = {"farming_wheat_1.png"},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5, -0.5, -0.5, 0.5, -0.125, 0.5}
|
|
|
|
},
|
|
|
|
},
|
2017-01-12 08:18:13 +02:00
|
|
|
groups = {dig_immediate=3, not_in_creative_inventory=1, dig_by_water=1},
|
2017-02-11 19:46:23 +02:00
|
|
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
2015-07-03 07:58:01 +03:00
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.3125, -0.5, -0.5, -0.3125, 0.375, 0.5}, -- NodeBox1
|
|
|
|
{0.3125, -0.5, -0.5, 0.3125, 0.375, 0.5}, -- NodeBox2
|
|
|
|
{-0.5, -0.5, 0.375, 0.5, 0.375, 0.375}, -- NodeBox3
|
|
|
|
{-0.5, -0.5, -0.25, 0.5, 0.375, -0.25}, -- NodeBox4
|
|
|
|
}
|
|
|
|
},
|
2015-06-29 20:55:56 +03:00
|
|
|
})
|
|
|
|
|
2017-01-31 13:35:59 +02:00
|
|
|
minetest.register_node("mcl_farming:wheat_2", {
|
2015-06-29 20:55:56 +03:00
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
2015-07-03 07:58:01 +03:00
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
2017-02-10 18:00:29 +02:00
|
|
|
drop = "mcl_farming:wheat_seeds",
|
2015-06-29 20:55:56 +03:00
|
|
|
tiles = {"farming_wheat_2.png"},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5}
|
|
|
|
},
|
|
|
|
},
|
2017-01-12 08:18:13 +02:00
|
|
|
groups = {dig_immediate=3, not_in_creative_inventory=1, dig_by_water=1},
|
2017-02-11 19:46:23 +02:00
|
|
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
2015-07-03 07:58:01 +03:00
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.3125, -0.5, -0.5, -0.3125, 0.375, 0.5}, -- NodeBox1
|
|
|
|
{0.3125, -0.5, -0.5, 0.3125, 0.375, 0.5}, -- NodeBox2
|
|
|
|
{-0.5, -0.5, 0.375, 0.5, 0.375, 0.375}, -- NodeBox3
|
|
|
|
{-0.5, -0.5, -0.25, 0.5, 0.375, -0.25}, -- NodeBox4
|
|
|
|
}
|
|
|
|
},
|
2015-06-29 20:55:56 +03:00
|
|
|
})
|
|
|
|
|
2017-01-31 13:35:59 +02:00
|
|
|
minetest.register_node("mcl_farming:wheat_3", {
|
2015-06-29 20:55:56 +03:00
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
2015-07-03 07:58:01 +03:00
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
2017-02-10 18:00:29 +02:00
|
|
|
drop = "mcl_farming:wheat_seeds",
|
2015-06-29 20:55:56 +03:00
|
|
|
tiles = {"farming_wheat_3.png"},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5, -0.5, -0.5, 0.5, 0.25, 0.5}
|
|
|
|
},
|
|
|
|
},
|
2017-01-12 08:18:13 +02:00
|
|
|
groups = {dig_immediate=3, not_in_creative_inventory=1, dig_by_water=1},
|
2017-02-11 19:46:23 +02:00
|
|
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
2015-07-03 07:58:01 +03:00
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.3125, -0.5, -0.5, -0.3125, 0.375, 0.5}, -- NodeBox1
|
|
|
|
{0.3125, -0.5, -0.5, 0.3125, 0.375, 0.5}, -- NodeBox2
|
|
|
|
{-0.5, -0.5, 0.375, 0.5, 0.375, 0.375}, -- NodeBox3
|
|
|
|
{-0.5, -0.5, -0.25, 0.5, 0.375, -0.25}, -- NodeBox4
|
|
|
|
}
|
|
|
|
},
|
2015-06-29 20:55:56 +03:00
|
|
|
})
|
|
|
|
|
2017-01-31 13:35:59 +02:00
|
|
|
minetest.register_node("mcl_farming:wheat", {
|
2015-06-29 20:55:56 +03:00
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
2015-07-03 07:58:01 +03:00
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
2015-06-29 20:55:56 +03:00
|
|
|
tiles = {"farming_wheat.png"},
|
|
|
|
drop = {
|
|
|
|
max_items = 4,
|
|
|
|
items = {
|
2017-02-10 18:00:29 +02:00
|
|
|
{ items = {'mcl_farming:wheat_seeds'} },
|
|
|
|
{ items = {'mcl_farming:wheat_seeds'}, rarity = 2},
|
|
|
|
{ items = {'mcl_farming:wheat_seeds'}, rarity = 5},
|
2017-02-11 22:38:25 +02:00
|
|
|
{ items = {'mcl_farming:wheat_item'} }
|
2015-06-29 20:55:56 +03:00
|
|
|
}
|
|
|
|
},
|
2015-07-03 07:58:01 +03:00
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5, -0.5, -0.5, 0.5, 0.35, 0.5}
|
|
|
|
},
|
|
|
|
},
|
2017-01-12 08:18:13 +02:00
|
|
|
groups = {dig_immediate=3, not_in_creative_inventory=1, dig_by_water=1},
|
2017-02-11 19:46:23 +02:00
|
|
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
2015-07-03 07:58:01 +03:00
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.3125, -0.5, -0.5, -0.3125, 0.375, 0.5}, -- NodeBox1
|
|
|
|
{0.3125, -0.5, -0.5, 0.3125, 0.375, 0.5}, -- NodeBox2
|
|
|
|
{-0.5, -0.5, 0.375, 0.5, 0.375, 0.375}, -- NodeBox3
|
|
|
|
{-0.5, -0.5, -0.25, 0.5, 0.375, -0.25}, -- NodeBox4
|
|
|
|
}
|
|
|
|
},
|
2015-06-29 20:55:56 +03:00
|
|
|
})
|
|
|
|
|
2017-01-31 13:35:59 +02:00
|
|
|
mcl_farming:add_plant("mcl_farming:wheat", {"mcl_farming:wheat_1", "mcl_farming:wheat_2", "mcl_farming:wheat_3"}, 50, 20)
|
2015-06-29 20:55:56 +03:00
|
|
|
|
2017-02-11 22:38:25 +02:00
|
|
|
minetest.register_craftitem("mcl_farming:wheat_item", {
|
2017-01-08 04:57:42 +02:00
|
|
|
description = "Wheat",
|
2015-06-29 20:55:56 +03:00
|
|
|
inventory_image = "farming_wheat_harvested.png",
|
2017-01-20 05:54:09 +02:00
|
|
|
groups = { craftitem = 1 },
|
2015-06-29 20:55:56 +03:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2017-01-31 13:35:59 +02:00
|
|
|
output = "mcl_farming:bread",
|
2015-06-29 20:55:56 +03:00
|
|
|
recipe = {
|
2017-02-11 22:38:25 +02:00
|
|
|
{'mcl_farming:wheat_item', 'mcl_farming:wheat_item', 'mcl_farming:wheat_item'},
|
2015-06-29 20:55:56 +03:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2017-01-31 13:35:59 +02:00
|
|
|
output = "mcl_farming:cookie 8",
|
2015-06-29 20:55:56 +03:00
|
|
|
recipe = {
|
2017-02-11 22:38:25 +02:00
|
|
|
{'mcl_farming:wheat_item', 'mcl_dye:brown', 'mcl_farming:wheat_item'},
|
2015-06-29 20:55:56 +03:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2017-01-31 13:35:59 +02:00
|
|
|
minetest.register_craftitem("mcl_farming:cookie", {
|
2015-06-29 20:55:56 +03:00
|
|
|
description = "Cookie",
|
|
|
|
inventory_image = "farming_cookie.png",
|
2017-01-16 15:29:41 +02:00
|
|
|
groups = {food=2, eatable=2},
|
2017-02-16 18:45:33 +02:00
|
|
|
on_place = minetest.item_eat(2),
|
|
|
|
on_secondary_use = minetest.item_eat(2),
|
2015-06-29 20:55:56 +03:00
|
|
|
})
|
|
|
|
|
|
|
|
|
2017-01-31 13:35:59 +02:00
|
|
|
minetest.register_craftitem("mcl_farming:bread", {
|
2015-06-29 20:55:56 +03:00
|
|
|
description = "Bread",
|
|
|
|
inventory_image = "farming_bread.png",
|
2017-01-16 15:29:41 +02:00
|
|
|
groups = {food=2, eatable=5},
|
2017-02-16 18:45:33 +02:00
|
|
|
on_place = minetest.item_eat(5),
|
|
|
|
on_secondary_use = minetest.item_eat(5),
|
2015-06-29 20:55:56 +03:00
|
|
|
})
|
|
|
|
|
2017-02-16 22:44:53 +02:00
|
|
|
minetest.register_node("mcl_farming:hay_block", {
|
|
|
|
description = "Hay Bale",
|
|
|
|
tiles = {"mcl_farming_hayblock_top.png", "mcl_farming_hayblock_top.png", "mcl_farming_hayblock_side.png"},
|
|
|
|
is_ground_content = false,
|
|
|
|
stack_max = 64,
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
is_ground_content = false,
|
|
|
|
on_place = mcl_util.rotate_axis,
|
|
|
|
groups = {oddly_breakable_by_hand=3,flammable=2, building_block=1},
|
|
|
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = 'mcl_farming:hay_block',
|
|
|
|
recipe = {
|
|
|
|
{'mcl_farming:wheat_item', 'mcl_farming:wheat_item', 'mcl_farming:wheat_item'},
|
|
|
|
{'mcl_farming:wheat_item', 'mcl_farming:wheat_item', 'mcl_farming:wheat_item'},
|
|
|
|
{'mcl_farming:wheat_item', 'mcl_farming:wheat_item', 'mcl_farming:wheat_item'},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = 'mcl_farming:wheat_item 9',
|
|
|
|
recipe = {
|
|
|
|
{'mcl_farming:hay_block'},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|