potatoes and carrots are their own seeds
|
@ -318,3 +318,19 @@ minetest.register_abm({
|
|||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"default:dirt_with_snow"},
|
||||
interval = 2,
|
||||
chance = 20,
|
||||
action = function(pos, node)
|
||||
local above = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
local name = minetest.get_node(above).name
|
||||
local nodedef = minetest.registered_nodes[name]
|
||||
if name ~= "default:snow" then
|
||||
minetest.set_node(pos, {name = "default:dirt_with_grass"})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
|
|
|
@ -367,6 +367,12 @@ minetest.register_node("default:snow", {
|
|||
minetest.set_node(pos, {name="default:dirt_with_snow"})
|
||||
end
|
||||
end,
|
||||
after_destruct = function(pos, node, digger)
|
||||
pos.y = pos.y - 1
|
||||
if minetest.get_node(pos).name == "default:dirt_with_snow" then
|
||||
minetest.set_node(pos, {name="default:dirt_with_grass"})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ minetest.register_abm({
|
|||
end
|
||||
-- check if there is water nearby
|
||||
local wet_lvl = minetest.get_item_group(node.name, "wet")
|
||||
if minetest.find_node_near(pos, 3, {"group:water"}) then
|
||||
if minetest.find_node_near(pos, 4, {"group:water"}) then
|
||||
-- if it is dry soil and not base node, turn it into wet soil
|
||||
if wet_lvl == 0 then
|
||||
minetest.set_node(pos, {name = wet})
|
||||
|
|
|
@ -2,14 +2,6 @@
|
|||
local S
|
||||
S = farming.S
|
||||
|
||||
minetest.register_craftitem("farming_plus:carrot_seed", {
|
||||
description = S("Carrot Seeds"),
|
||||
inventory_image = "farming_carrot_seed.png",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming_plus:carrot_1")
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("farming_plus:carrot_1", {
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
|
@ -64,14 +56,12 @@ minetest.register_node("farming_plus:carrot", {
|
|||
drawtype = "plantlike",
|
||||
tiles = {"farming_carrot_4.png"},
|
||||
drop = {
|
||||
max_items = 6,
|
||||
max_items = 4,
|
||||
items = {
|
||||
{ items = {'farming_plus:carrot_seed'} },
|
||||
{ items = {'farming_plus:carrot_seed'}, rarity = 2},
|
||||
{ items = {'farming_plus:carrot_seed'}, rarity = 5},
|
||||
{ items = {'farming_plus:carrot_item'} },
|
||||
{ items = {'farming_plus:carrot_item'}, rarity = 2 },
|
||||
{ items = {'farming_plus:carrot_item'}, rarity = 5 }
|
||||
{ items = {"farming_plus:carrot_item"} },
|
||||
{ items = {"farming_plus:carrot_item"}, rarity = 2},
|
||||
{ items = {"farming_plus:carrot_item"}, rarity = 2},
|
||||
{ items = {'farming_plus:carrot_item'}, rarity = 5},
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2, not_in_creative_inventory=1,plant=1},
|
||||
|
@ -82,6 +72,9 @@ minetest.register_craftitem("farming_plus:carrot_item", {
|
|||
description = S("Carrot"),
|
||||
inventory_image = "farming_carrot.png",
|
||||
on_use = minetest.item_eat(3),
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming_plus:carrot_1")
|
||||
end
|
||||
})
|
||||
|
||||
farming.add_plant("farming_plus:carrot", {"farming_plus:carrot_1", "farming_plus:carrot_2", "farming_plus:carrot_3"}, 50, 20)
|
||||
|
|
|
@ -2,14 +2,6 @@
|
|||
local S
|
||||
S = farming.S
|
||||
|
||||
minetest.register_craftitem("farming_plus:potato_seed", {
|
||||
description = ("Potato Seeds"),
|
||||
inventory_image = "farming_potato_seed.png",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming_plus:potato_1")
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("farming_plus:potato_1", {
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
|
@ -42,20 +34,35 @@ minetest.register_node("farming_plus:potato_2", {
|
|||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("farming_plus:potato_3", {
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
drawtype = "plantlike",
|
||||
drop = "",
|
||||
tiles = {"farming_potato_3.png"},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.5+12/16, 0.5}
|
||||
},
|
||||
},
|
||||
groups = {snappy=3, flammable=2, not_in_creative_inventory=1,plant=1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("farming_plus:potato", {
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
drawtype = "plantlike",
|
||||
tiles = {"farming_potato_3.png"},
|
||||
drop = {
|
||||
max_items = 6,
|
||||
max_items = 4,
|
||||
items = {
|
||||
{ items = {'farming_plus:potato_seed'} },
|
||||
{ items = {'farming_plus:potato_seed'}, rarity = 2},
|
||||
{ items = {'farming_plus:potato_seed'}, rarity = 5},
|
||||
{ items = {'farming_plus:potato_item'} },
|
||||
{ items = {'farming_plus:potato_item'}, rarity = 2 },
|
||||
{ items = {'farming_plus:potato_item'}, rarity = 5 }
|
||||
{ items = {'farming_plus:poisonous_potato_item'}, rarity = 50},
|
||||
{ items = {"farming_plus:potato_item"} },
|
||||
{ items = {"farming_plus:potato_item"}, rarity = 2},
|
||||
{ items = {"farming_plus:potato_item"}, rarity = 2},
|
||||
{ items = {'farming_plus:potato_item'}, rarity = 5},
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2, not_in_creative_inventory=1,plant=1},
|
||||
|
@ -65,9 +72,16 @@ minetest.register_node("farming_plus:potato", {
|
|||
minetest.register_craftitem("farming_plus:potato_item", {
|
||||
description = S("Potato"),
|
||||
inventory_image = "farming_potato.png",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming_plus:potato_1")
|
||||
end
|
||||
})
|
||||
minetest.register_craftitem("farming_plus:poisonous_potato_item", {
|
||||
description = "Poisonous Potato",
|
||||
inventory_image = "potato_poisonous.png",
|
||||
})
|
||||
|
||||
farming.add_plant("farming_plus:potato", {"farming_plus:potato_1", "farming_plus:potato_2"}, 50, 20)
|
||||
farming.add_plant("farming_plus:potato", {"farming_plus:potato_1", "farming_plus:potato_2", "farming_plus:potato_3"}, 50, 20)
|
||||
|
||||
minetest.register_alias("farming_plus:potatoe_item", "farming_plus:potato_item")
|
||||
minetest.register_alias("farming_plus:potatoe_seed", "farming_plus:potato_seed")
|
||||
|
|
Before Width: | Height: | Size: 137 B After Width: | Height: | Size: 166 B |
Before Width: | Height: | Size: 196 B After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 274 B After Width: | Height: | Size: 370 B |
Before Width: | Height: | Size: 405 B After Width: | Height: | Size: 558 B |
Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 166 B |
Before Width: | Height: | Size: 262 B After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 415 B After Width: | Height: | Size: 370 B |
After Width: | Height: | Size: 482 B |
After Width: | Height: | Size: 504 B |
|
@ -556,7 +556,7 @@ mobs:register_mob("mobs:zombie", {
|
|||
armor = 200,
|
||||
drops = {
|
||||
{name = "default:steel_ingot",
|
||||
chance = 1,
|
||||
chance = 3,
|
||||
min = 0,
|
||||
max = 2,},
|
||||
{name = "default:shovel_steel",
|
||||
|
@ -567,6 +567,14 @@ mobs:register_mob("mobs:zombie", {
|
|||
chance = 8,
|
||||
min = 1,
|
||||
max = 1,},
|
||||
{name = "farming_plus:carrot_item",
|
||||
chance = 10,
|
||||
min = 1,
|
||||
max = 1,},
|
||||
{name = "farming_plus:potato_item",
|
||||
chance = 10,
|
||||
min = 1,
|
||||
max = 1,},
|
||||
},
|
||||
animation = {
|
||||
speed_normal = 24,
|
||||
|
|