Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- minetest.register_node("palmtree:palm_trunk", {
- description = "Tree",
- tiles = {"palm_trunk.png", "palm_leaves.png", "palm_trunk.png"},
- is_ground_content = true,
- groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
- sounds = default.node_sound_wood_defaults(),
- })
- minetest.register_node("palmtree:palm_leaves", {
- description = "Leaves",
- drawtype = "allfaces_optional",
- visual_scale = 1.3,
- tiles = {"palm_leaves.png"},
- paramtype = "light",
- groups = {snappy=3, leafdecay=3, flammable=2},
- drop = {
- max_items = 1,
- items = {
- {
- -- player will get sapling with 1/20 chance
- items = {'palmtree:palm_sapling'},
- rarity = 20,
- },
- {
- -- player will get leaves only if he get no saplings,
- -- this is because max_items is 1
- items = {'palmtree:palm_leaves'},
- }
- }
- },
- sounds = default.node_sound_leaves_defaults(),
- })
- minetest.register_node("palmtree:palm_sapling", {
- description = "Sapling",
- drawtype = "plantlike",
- visual_scale = 1.0,
- tiles = {"palmtree:palm_sapling"},
- inventory_image = "palm_sapling.png",
- wield_image = "palm_sapling.png",
- paramtype = "light",
- walkable = false,
- groups = {snappy=2,dig_immediate=3,flammable=2},
- sounds = default.node_sound_defaults(),
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement