8 stages of wheat
Before Width: | Height: | Size: 229 B |
Before Width: | Height: | Size: 625 B |
Before Width: | Height: | Size: 748 B |
After Width: | Height: | Size: 345 B |
After Width: | Height: | Size: 424 B |
After Width: | Height: | Size: 644 B |
After Width: | Height: | Size: 833 B |
After Width: | Height: | Size: 975 B |
After Width: | Height: | Size: 941 B |
After Width: | Height: | Size: 958 B |
Before Width: | Height: | Size: 842 B After Width: | Height: | Size: 842 B |
|
@ -10,78 +10,52 @@ minetest.register_craftitem("mcl_farming:wheat_seeds", {
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("mcl_farming:wheat_1", {
|
local sel_heights = {
|
||||||
description = "Premature Wheat Plant (First Stage)",
|
-5/16,
|
||||||
_doc_items_entry_name = "Premature Wheat Plant",
|
-2/16,
|
||||||
_doc_items_longdesc = "Premature wheat plants grow on farmland under sunlight in 4 stages. On hydrated farmland, they grow faster. They can be harvested at any time but will only yield a profit when mature.",
|
0,
|
||||||
paramtype = "light",
|
3/16,
|
||||||
paramtype2 = "meshoptions",
|
5/16,
|
||||||
place_param2 = 3,
|
6/16,
|
||||||
sunlight_propagates = true,
|
7/16,
|
||||||
walkable = false,
|
}
|
||||||
drawtype = "plantlike",
|
|
||||||
drop = "mcl_farming:wheat_seeds",
|
|
||||||
tiles = {"farming_wheat_1.png"},
|
|
||||||
inventory_image = "farming_wheat_1.png",
|
|
||||||
wield_image = "farming_wheat_1.png",
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.5, 0.5, -0.125, 0.5}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
groups = {dig_immediate=3, not_in_creative_inventory=1, dig_by_water=1, dig_by_piston=1},
|
|
||||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
|
||||||
_mcl_blast_resistance = 0,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mcl_farming:wheat_2", {
|
for i=1,7 do
|
||||||
description = "Premature Wheat Plant (Second Stage)",
|
local create, name, longdesc
|
||||||
_doc_items_create_entry = false,
|
if i == 1 then
|
||||||
sunlight_propagates = true,
|
create = true
|
||||||
paramtype = "light",
|
name = "Premature Wheat Plant"
|
||||||
paramtype2 = "meshoptions",
|
longdesc = "Premature wheat plants grow on farmland under sunlight in 8 stages. On hydrated farmland, they grow faster. They can be harvested at any time but will only yield a profit when mature."
|
||||||
place_param2 = 3,
|
else
|
||||||
walkable = false,
|
create = false
|
||||||
drawtype = "plantlike",
|
end
|
||||||
drop = "mcl_farming:wheat_seeds",
|
|
||||||
tiles = {"farming_wheat_2.png"},
|
|
||||||
inventory_image = "farming_wheat_2.png",
|
|
||||||
wield_image = "farming_wheat_2.png",
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
groups = {dig_immediate=3, not_in_creative_inventory=1, dig_by_water=1, dig_by_piston=1},
|
|
||||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
|
||||||
_mcl_blast_resistance = 0,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mcl_farming:wheat_3", {
|
minetest.register_node("mcl_farming:wheat_"..i, {
|
||||||
description = "Premature Wheat Plant (Third Stage)",
|
description = string.format("Premature Wheat Plant (Stage %d)", i),
|
||||||
_doc_items_create_entry = false,
|
_doc_items_create_entry = create,
|
||||||
sunlight_propagates = true,
|
_doc_items_entry_name = name,
|
||||||
paramtype = "light",
|
_doc_items_longdesc = longdesc,
|
||||||
paramtype2 = "meshoptions",
|
paramtype = "light",
|
||||||
place_param2 = 3,
|
paramtype2 = "meshoptions",
|
||||||
walkable = false,
|
place_param2 = 3,
|
||||||
drawtype = "plantlike",
|
sunlight_propagates = true,
|
||||||
drop = "mcl_farming:wheat_seeds",
|
walkable = false,
|
||||||
tiles = {"farming_wheat_3.png"},
|
drawtype = "plantlike",
|
||||||
inventory_image = "farming_wheat_3.png",
|
drop = "mcl_farming:wheat_seeds",
|
||||||
wield_image = "farming_wheat_3.png",
|
tiles = {"mcl_farming_wheat_stage_"..(i-1)..".png"},
|
||||||
selection_box = {
|
inventory_image = "mcl_farming_wheat_stage_"..(i-1)..".png",
|
||||||
type = "fixed",
|
wield_image = "mcl_farming_wheat_stage_"..(i-1)..".png",
|
||||||
fixed = {
|
selection_box = {
|
||||||
{-0.5, -0.5, -0.5, 0.5, 0.25, 0.5}
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.5, -0.5, -0.5, 0.5, sel_heights[i], 0.5}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
groups = {dig_immediate=3, not_in_creative_inventory=1, dig_by_water=1, dig_by_piston=1},
|
||||||
groups = {dig_immediate=3, not_in_creative_inventory=1, dig_by_water=1, dig_by_piston=1},
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
_mcl_blast_resistance = 0,
|
||||||
_mcl_blast_resistance = 0,
|
})
|
||||||
})
|
end
|
||||||
|
|
||||||
minetest.register_node("mcl_farming:wheat", {
|
minetest.register_node("mcl_farming:wheat", {
|
||||||
description = "Mature Wheat Plant",
|
description = "Mature Wheat Plant",
|
||||||
|
@ -92,9 +66,9 @@ minetest.register_node("mcl_farming:wheat", {
|
||||||
place_param2 = 3,
|
place_param2 = 3,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_wheat.png"},
|
tiles = {"mcl_farming_wheat_stage_7.png"},
|
||||||
inventory_image = "farming_wheat.png",
|
inventory_image = "mcl_farming_wheat_stage_7.png",
|
||||||
wield_image = "farming_wheat.png",
|
wield_image = "mcl_farming_wheat_stage_7.png",
|
||||||
drop = {
|
drop = {
|
||||||
max_items = 4,
|
max_items = 4,
|
||||||
items = {
|
items = {
|
||||||
|
@ -104,18 +78,12 @@ minetest.register_node("mcl_farming:wheat", {
|
||||||
{ items = {'mcl_farming:wheat_item'} }
|
{ items = {'mcl_farming:wheat_item'} }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.5, 0.5, 0.35, 0.5}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
groups = {dig_immediate=3, not_in_creative_inventory=1, dig_by_water=1, dig_by_piston=1},
|
groups = {dig_immediate=3, not_in_creative_inventory=1, dig_by_water=1, dig_by_piston=1},
|
||||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||||
_mcl_blast_resistance = 0,
|
_mcl_blast_resistance = 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
mcl_farming:add_plant("plant_wheat", "mcl_farming:wheat", {"mcl_farming:wheat_1", "mcl_farming:wheat_2", "mcl_farming:wheat_3"}, 50, 20)
|
mcl_farming:add_plant("plant_wheat", "mcl_farming:wheat", {"mcl_farming:wheat_1", "mcl_farming:wheat_2", "mcl_farming:wheat_3", "mcl_farming:wheat_4", "mcl_farming:wheat_5", "mcl_farming:wheat_6", "mcl_farming:wheat_7"}, 50, 20)
|
||||||
|
|
||||||
minetest.register_craftitem("mcl_farming:wheat_item", {
|
minetest.register_craftitem("mcl_farming:wheat_item", {
|
||||||
description = "Wheat",
|
description = "Wheat",
|
||||||
|
@ -190,7 +158,7 @@ minetest.register_craft({
|
||||||
})
|
})
|
||||||
|
|
||||||
if minetest.get_modpath("doc") then
|
if minetest.get_modpath("doc") then
|
||||||
for i=2,3 do
|
for i=2,7 do
|
||||||
doc.add_entry_alias("nodes", "mcl_farming:wheat_1", "nodes", "mcl_farming:wheat_"..i)
|
doc.add_entry_alias("nodes", "mcl_farming:wheat_1", "nodes", "mcl_farming:wheat_"..i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|