diff --git a/carrot.lua b/carrot.lua index 43e7a72..19bb3ec 100644 --- a/carrot.lua +++ b/carrot.lua @@ -35,12 +35,14 @@ minetest.register_node("farming:carrot_1", { tiles = {"farming_carrot_1.png"}, paramtype = "light", sunlight_propagates = true, - waving = 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(), }) @@ -49,12 +51,14 @@ minetest.register_node("farming:carrot_2", { tiles = {"farming_carrot_2.png"}, paramtype = "light", sunlight_propagates = true, - waving = 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(), }) @@ -63,12 +67,14 @@ minetest.register_node("farming:carrot_3", { tiles = {"farming_carrot_3.png"}, paramtype = "light", sunlight_propagates = true, - waving = 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(), }) @@ -77,12 +83,14 @@ minetest.register_node("farming:carrot_4", { tiles = {"farming_carrot_4.png"}, paramtype = "light", sunlight_propagates = true, - waving = 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(), }) @@ -95,8 +103,11 @@ minetest.register_node("farming:carrot_5", { 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(), }) @@ -109,8 +120,11 @@ minetest.register_node("farming:carrot_6", { 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,19 +136,21 @@ minetest.register_node("farming:carrot_7", { waving = 1, walkable = false, buildable_to = true, - is_ground_content = true, drop = { items = { - {items = {'farming:carrot'},rarity=1}, - {items = {'farming:carrot 2'},rarity=3}, + {items = {'farming:carrot'}, rarity = 1}, + {items = {'farming:carrot 2'}, 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 Carrot growth doesnnot have growing=1 so abm never has to check these +-- Last stage of growth does not have growing group so abm never checks these minetest.register_node("farming:carrot_8", { drawtype = "plantlike", @@ -144,14 +160,16 @@ minetest.register_node("farming:carrot_8", { waving = 1, walkable = false, buildable_to = true, - is_ground_content = true, drop = { items = { - {items = {'farming:carrot 2'},rarity=1}, - {items = {'farming:carrot 3'},rarity=2}, + {items = {'farming:carrot 2'}, rarity = 1}, + {items = {'farming:carrot 3'}, 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