diff options
Diffstat (limited to 'corn.lua')
-rw-r--r-- | corn.lua | 77 |
1 files changed, 51 insertions, 26 deletions
@@ -58,8 +58,11 @@ minetest.register_node("farming:corn_1", { walkable = false, buildable_to = true, drop = "", - selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},}, - groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1}, + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, sounds = default.node_sound_leaves_defaults(), }) @@ -71,8 +74,11 @@ minetest.register_node("farming:corn_2", { walkable = false, buildable_to = true, drop = "", - selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},}, - groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1}, + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, sounds = default.node_sound_leaves_defaults(), }) @@ -85,8 +91,11 @@ minetest.register_node("farming:corn_3", { walkable = false, buildable_to = true, drop = "", - selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},}, - groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1}, + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, sounds = default.node_sound_leaves_defaults(), }) @@ -99,8 +108,11 @@ minetest.register_node("farming:corn_4", { walkable = false, buildable_to = true, drop = "", - selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},}, - groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1}, + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, sounds = default.node_sound_leaves_defaults(), }) @@ -108,12 +120,16 @@ minetest.register_node("farming:corn_5", { drawtype = "plantlike", tiles = {"farming_corn_5.png"}, paramtype = "light", + waving = 1, sunlight_propagates = true, walkable = false, buildable_to = true, drop = "", - selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},}, - groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1}, + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, sounds = default.node_sound_leaves_defaults(), }) @@ -122,12 +138,16 @@ minetest.register_node("farming:corn_6", { tiles = {"farming_corn_6.png"}, visual_scale = 1.45, paramtype = "light", + waving = 1, sunlight_propagates = true, walkable = false, buildable_to = true, drop = "", - selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},}, - groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1}, + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, sounds = default.node_sound_leaves_defaults(), }) @@ -136,22 +156,25 @@ minetest.register_node("farming:corn_7", { tiles = {"farming_corn_7.png"}, visual_scale = 1.45, paramtype = "light", + waving = 1, walkable = false, buildable_to = true, - is_ground_content = true, drop = { items = { - {items = {'farming:corn'},rarity=1}, - {items = {'farming:corn'},rarity=2}, - {items = {'farming:corn'},rarity=3}, + {items = {'farming:corn'}, rarity = 1}, + {items = {'farming:corn'}, rarity = 2}, + {items = {'farming:corn'}, rarity = 3}, } }, - selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},}, - groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1}, + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, sounds = default.node_sound_leaves_defaults(), }) --- Last stage of Corn growth doesnnot have growing=1 so abm never has to check these +-- Last stage of growth doesn not have growing group so abm never checks these minetest.register_node("farming:corn_8", { drawtype = "plantlike", @@ -161,15 +184,17 @@ minetest.register_node("farming:corn_8", { waving = 1, walkable = false, buildable_to = true, - is_ground_content = true, drop = { items = { - {items = {'farming:corn 2'},rarity=1}, - {items = {'farming:corn 2'},rarity=2}, - {items = {'farming:corn 2'},rarity=2}, + {items = {'farming:corn 2'}, rarity = 1}, + {items = {'farming:corn 2'}, rarity = 2}, + {items = {'farming:corn 2'}, rarity = 2}, } }, - selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},}, - groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1}, + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1 + }, sounds = default.node_sound_leaves_defaults(), -}) +})
\ No newline at end of file |