123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400 |
- -- mods/default/nodes.lua
- --[[ Node name convention:
- Although many node names are in combined-word form, the required form for new
- node names is words separated by underscores. If both forms are used in written
- language (for example pinewood and pine wood) the underscore form should be used.
- --]]
- --[[ Index:
- Stone
- -----
- (1. Material 2. Cobble variant 3. Brick variant 4. Modified forms)
- default:stone
- default:cobble
- default:stonebrick
- default:stone_block
- default:mossycobble
- default:desert_stone
- default:desert_cobble
- default:desert_stonebrick
- default:desert_stone_block
- default:sandstone
- default:sandstonebrick
- default:sandstone_block
- default:obsidian
- default:obsidianbrick
- default:obsidian_block
- Soft / Non-Stone
- ----------------
- (1. Material 2. Modified forms)
- default:dirt
- default:dirt_with_grass
- default:dirt_with_grass_footsteps
- default:dirt_with_dry_grass
- default:dirt_with_snow
- default:sand
- default:desert_sand
- default:gravel
- default:clay
- default:snow
- default:snowblock
- default:ice
- Trees
- -----
- (1. Trunk 2. Fabricated trunk 3. Leaves 4. Sapling 5. Fruits)
- default:tree
- default:wood
- default:leaves
- default:sapling
- default:apple
- default:jungletree
- default:junglewood
- default:jungleleaves
- default:junglesapling
- default:pine_tree
- default:pine_wood
- default:pine_needles
- default:pine_sapling
- default:acacia_tree
- default:acacia_wood
- default:acacia_leaves
- default:acacia_sapling
- default:aspen_tree
- default:aspen_wood
- default:aspen_leaves
- default:aspen_sapling
- Ores
- ----
- (1. In stone 2. Blocks)
- default:stone_with_coal
- default:coalblock
- default:stone_with_iron
- default:steelblock
- default:stone_with_copper
- default:copperblock
- default:bronzeblock
- default:stone_with_gold
- default:goldblock
- default:stone_with_mese
- default:mese
- default:stone_with_diamond
- default:diamondblock
- Plantlife (non-cubic)
- ---------------------
- default:cactus
- default:papyrus
- default:dry_shrub
- default:junglegrass
- default:grass_1
- default:grass_2
- default:grass_3
- default:grass_4
- default:grass_5
- default:dry_grass_1
- default:dry_grass_2
- default:dry_grass_3
- default:dry_grass_4
- default:dry_grass_5
- Liquids
- -------
- (1. Source 2. Flowing)
- default:water_source
- default:water_flowing
- default:river_water_source
- default:river_water_flowing
- default:lava_source
- default:lava_flowing
- Tools / "Advanced" crafting / Non-"natural"
- -------------------------------------------
- default:sign_wall_wood
- default:sign_wall_steel
- default:ladder_wood
- default:ladder_steel
- default:fence_wood
- default:fence_acacia_wood
- default:fence_junglewood
- default:fence_pine_wood
- default:fence_aspen_wood
- default:glass
- default:obsidian_glass
- default:rail
- default:brick
- default:meselamp
- Misc
- ----
- default:cloud
- --]]
- --
- -- Stone
- --
- -- Localize for performance.
- local math_random = math.random
- local vector_add = vector.add
- minetest.register_node("default:stone", {
- description = "Stone",
- --[[
- drawtype = "airlike",
- paramtype = "light",
- sunlight_propagates = true,
- light_source = 15,
- pointable = false,
- --]]
- tiles = {{name="stone_macro.png", align_style="world", scale=8}},
- groups = utility.dig_groups("stone", {
- stone = 1, native_stone = 1,
- melts = 1, cobble_type = 1,
- }),
- drop = 'default:cobble',
- legacy_mineral = true,
- sounds = default.node_sound_stone_defaults(),
- _melts_to = "cavestuff:cobble_with_rockmelt",
- -- Common stone does not count toward tool's dig count.
- _toolranks = {
- ignore = true,
- },
- -- Collapsed stone breaks up into cobble.
- on_finish_collapse = function(pos, node)
- minetest.swap_node(pos, {name="default:cobble"})
- end,
- on_collapse_to_entity = function(pos, node)
- minetest.add_item(pos, {name="default:cobble"})
- end,
- })
- -- Name is very similar to default:stone to make it hard to detect even with F5 debug info.
- minetest.register_node(":defauIt:stone", {
- description = "Stone (Please Report To Admin)",
- tiles = {"default_stone.png"},
- groups = utility.dig_groups("softcobble", {
- melts = 1, falling_node = 1,
- }),
- drop = 'default:cobble',
- legacy_mineral = true,
- sounds = default.node_sound_stone_defaults(),
- _melts_to = "cavestuff:cobble_with_rockmelt",
- -- Collapsed stone breaks up into cobble.
- on_finish_collapse = function(pos, node)
- minetest.swap_node(pos, {name="default:cobble"})
- end,
- on_collapse_to_entity = function(pos, node)
- minetest.add_item(pos, {name="default:cobble"})
- end,
- -- Player walking on it causes collapse.
- on_player_walk_over = function(pos, player)
- minetest.check_for_falling(pos)
- end,
- })
- minetest.register_node("default:cobble", {
- description = "Cobblestone",
- tiles = {"default_cobble.png"},
- is_ground_content = false,
- groups = utility.dig_groups("cobble", {
- stone = 1, native_stone = 1,
- melts = 1, cobble_type = 1,
- }),
- sounds = default.node_sound_stone_defaults(),
- _melts_to = "cavestuff:cobble_with_rockmelt",
- -- Common stone does not count toward tool's dig count.
- _toolranks = {
- ignore = true,
- },
- _no_auto_pop = true,
- })
- minetest.register_node("default:stonebrick", {
- description = "Stone Brick",
- paramtype2 = "facedir",
- place_param2 = 0,
- tiles = {"default_stone_brick.png"},
- is_ground_content = false,
- groups = utility.dig_groups("brick", {brick = 1}),
- sounds = default.node_sound_stone_defaults(),
- })
- minetest.register_node("default:stone_block", {
- description = "Stone Block",
- tiles = {"default_stone_block.png"},
- is_ground_content = false,
- groups = utility.dig_groups("block", {stone=1, block = 1}),
- sounds = default.node_sound_stone_defaults(),
- })
- minetest.register_node("default:mossycobble", {
- description = "Mossy Cobblestone",
- tiles = {"default_mossycobble.png"},
- is_ground_content = false,
- groups = utility.dig_groups("cobble", {
- stone = 1, native_stone = 1,
- melts = 1,
- }),
- _melts_to = "cavestuff:cobble_with_rockmelt",
- sounds = default.node_sound_stone_defaults(),
- })
- minetest.register_node("default:desert_stone", {
- description = "Redstone",
- tiles = {{name="desert_stone_macro.png", align_style="world", scale=8}},
- groups = utility.dig_groups("stone", {stone = 1, native_stone = 1}),
- drop = 'default:desert_cobble2',
- legacy_mineral = true,
- sounds = default.node_sound_stone_defaults(),
- -- Common stone does not count toward tool's dig count.
- _toolranks = {
- ignore = true,
- },
- -- Made desert stone a road material on March 16, 2018.
- movement_speed_multiplier = default.ROAD_SPEED,
- -- Collapsed stone breaks up into cobble.
- on_finish_collapse = function(pos, node)
- minetest.swap_node(pos, {name="default:desert_cobble2"})
- end,
- on_collapse_to_entity = function(pos, node)
- minetest.add_item(pos, {name="default:desert_cobble2"})
- end,
- })
- minetest.register_node("default:desert_cobble", {
- description = "Chalked Redstone Cobble",
- tiles = {"default_desert_cobble.png"}, -- Original "chalked" image (pre 5.0.0).
- is_ground_content = false,
- groups = utility.dig_groups("cobble", {stone = 1, native_stone = 1}),
- sounds = default.node_sound_stone_defaults(),
- })
- minetest.register_node("default:desert_cobble2", {
- description = "Redstone Cobble",
- tiles = {"default_desert_cobble2.png"},
- is_ground_content = false,
- groups = utility.dig_groups("cobble"),
- sounds = default.node_sound_stone_defaults(),
- -- Common stone does not count toward tool's dig count.
- _toolranks = {
- ignore = true,
- },
- })
- minetest.register_node("default:desert_stonebrick", {
- description = "Redstone Brick",
- paramtype2 = "facedir",
- place_param2 = 0,
- tiles = {"default_desert_stone_brick.png"},
- is_ground_content = false,
- groups = utility.dig_groups("brick", {stone = 1, brick=1}),
- sounds = default.node_sound_stone_defaults(),
- })
- minetest.register_node("default:desert_stone_block", {
- description = "Redstone Block",
- tiles = {"default_desert_stone_block.png"},
- is_ground_content = false,
- groups = utility.dig_groups("block", {stone = 1, block=1}),
- sounds = default.node_sound_stone_defaults(),
- })
- minetest.register_node("default:sandstone", {
- description = "Sandstone",
- tiles = {"default_sandstone.png"},
- groups = utility.dig_groups("softstone", {stone=1}),
- sounds = default.node_sound_stone_defaults(),
- -- Added on March 16, 2018.
- movement_speed_multiplier = default.ROAD_SPEED,
- })
- minetest.register_node("default:sandstonebrick", {
- description = "Sandstone Brick",
- paramtype2 = "facedir",
- place_param2 = 0,
- tiles = {"default_sandstone_brick.png"},
- is_ground_content = false,
- groups = utility.dig_groups("brick", {brick=1}),
- sounds = default.node_sound_stone_defaults(),
- })
- minetest.register_node("default:sandstone_block", {
- description = "Sandstone Block",
- tiles = {"default_sandstone_block.png"},
- is_ground_content = false,
- groups = utility.dig_groups("block", {block=1}),
- sounds = default.node_sound_stone_defaults(),
- })
- minetest.register_node("default:desert_sandstone", {
- description = "Desert Sandstone",
- tiles = {"default_desert_sandstone.png"},
- groups = utility.dig_groups("softstone", {stone=1}),
- sounds = default.node_sound_stone_defaults(),
- movement_speed_multiplier = default.ROAD_SPEED,
- })
- minetest.register_node("default:desert_sandstone_brick", {
- description = "Desert Sandstone Brick",
- paramtype2 = "facedir",
- place_param2 = 0,
- tiles = {"default_desert_sandstone_brick.png"},
- is_ground_content = false,
- groups = utility.dig_groups("brick", {brick=1}),
- sounds = default.node_sound_stone_defaults(),
- })
- minetest.register_node("default:desert_sandstone_block", {
- description = "Desert Sandstone Block",
- tiles = {"default_desert_sandstone_block.png"},
- is_ground_content = false,
- groups = utility.dig_groups("block", {block=1}),
- sounds = default.node_sound_stone_defaults(),
- })
- minetest.register_node("default:silver_sandstone", {
- description = "Silver Sandstone",
- tiles = {"default_silver_sandstone.png"},
- groups = utility.dig_groups("softstone", {stone=1}),
- sounds = default.node_sound_stone_defaults(),
- movement_speed_multiplier = default.ROAD_SPEED,
- })
- minetest.register_node("default:silver_sandstone_brick", {
- description = "Silver Sandstone Brick",
- paramtype2 = "facedir",
- place_param2 = 0,
- tiles = {"default_silver_sandstone_brick.png"},
- is_ground_content = false,
- groups = utility.dig_groups("brick", {brick=1}),
- sounds = default.node_sound_stone_defaults(),
- })
- minetest.register_node("default:silver_sandstone_block", {
- description = "Silver Sandstone Block",
- tiles = {"default_silver_sandstone_block.png"},
- is_ground_content = false,
- groups = utility.dig_groups("block", {block=1}),
- sounds = default.node_sound_stone_defaults(),
- })
- minetest.register_node("default:obsidian", {
- description = "Obsidian",
- tiles = {"default_obsidian.png"},
- sounds = default.node_sound_stone_defaults(),
- groups = utility.dig_groups("obsidian", {stone=1}),
- on_blast = function(...) end, -- Blast resistant.
- movement_speed_multiplier = default.ROAD_SPEED_CAVERN,
- -- Callbacks are overridden in flameportal mod!
- })
- minetest.register_node("default:obsidianbrick", {
- description = "Obsidian Brick",
- paramtype2 = "facedir",
- place_param2 = 0,
- tiles = {"default_obsidian_brick.png"},
- is_ground_content = false,
- sounds = default.node_sound_stone_defaults(),
- groups = utility.dig_groups("brick", {stone=1, brick=1}),
- on_blast = function(...) end, -- Blast resistant.
- })
- minetest.register_node("default:obsidian_block", {
- description = "Obsidian Block",
- tiles = {"default_obsidian_block.png"},
- is_ground_content = false,
- sounds = default.node_sound_stone_defaults(),
- groups = utility.dig_groups("block", {stone=1, block=1}),
- on_blast = function(...) end, -- Blast resistant.
- })
- --
- -- Soft / Non-Stone
- --
- minetest.register_node("default:dirt", {
- description = "Dirt",
- tiles = {"default_dirt.png"},
- groups = utility.dig_groups("dirt", {falling_node = 1, dirt_type = 1, non_sterile_dirt_type = 1, raw_dirt_type = 1, soil = 1}),
- post_effect_color = {a=255, r=0, g=0, b=0},
- sounds = default.node_sound_dirt_defaults(),
- movement_speed_multiplier = default.SLOW_SPEED,
- })
- minetest.register_node("default:dirt_with_grass", {
- description = "Dirt With Grass",
- tiles = {
- "default_grass.png",
- "default_dirt.png",
- {name = "default_dirt.png^default_grass_side.png", tileable_vertical = false},
- },
- groups = utility.dig_groups("dirt", {falling_node = 1, dirt_type = 1, non_raw_dirt_type = 1, non_sterile_dirt_type = 1, grassy_dirt_type = 1, soil = 1}),
- drop = 'default:dirt',
- post_effect_color = {a=255, r=0, g=0, b=0},
- sounds = default.node_sound_dirt_defaults({
- footstep = {name = "default_grass_footstep", gain = 0.25},
- }),
- -- Depreciated.
- --on_timer = function(...)
- -- return dirtspread.dirt_on_timer(...)
- --end,
- on_finish_collapse = function(pos, node)
- minetest.swap_node(pos, {name="default:dirt"})
- end,
- movement_speed_multiplier = default.SLOW_SPEED_GRASS,
- })
- -- Does this node even exist in the world?
- minetest.register_node("default:dirt_with_grass_footsteps", {
- description = "Dirt With Grass And Footsteps",
- tiles = {
- "default_grass.png^default_footprint.png",
- "default_dirt.png",
- {name = "default_dirt.png^default_grass_side.png", tileable_vertical = false},
- },
- groups = utility.dig_groups("dirt", {falling_node = 1, dirt_type = 1, non_raw_dirt_type = 1, non_sterile_dirt_type = 1, grassy_dirt_type = 1, soil = 1, not_in_creative_inventory = 1}),
- drop = 'default:dirt',
- post_effect_color = {a=255, r=0, g=0, b=0},
- sounds = default.node_sound_dirt_defaults({
- footstep = {name = "default_grass_footstep", gain = 0.25},
- }),
- -- Depreciated.
- --on_timer = function(...)
- -- return dirtspread.dirt_on_timer(...)
- --end,
- on_finish_collapse = function(pos, node)
- minetest.swap_node(pos, {name="default:dirt"})
- end,
- movement_speed_multiplier = default.SLOW_SPEED_GRASS,
- })
- minetest.register_node("default:dirt_with_dry_grass", {
- description = "Dirt With Dry Grass",
- tiles = {
- "default_dry_grass.png",
- "default_dirt.png",
- {name = "default_dirt.png^default_dry_grass_side.png", tileable_vertical = false},
- },
- groups = utility.dig_groups("dirt", {falling_node = 1, dirt_type = 1, non_raw_dirt_type = 1, non_sterile_dirt_type = 1, grassy_dirt_type = 1, soil = 1}),
- drop = 'default:dirt',
- post_effect_color = {a=255, r=0, g=0, b=0},
- sounds = default.node_sound_dirt_defaults({
- footstep = {name = "default_grass_footstep", gain = 0.4},
- }),
- -- Depreciated.
- --on_timer = function(...)
- -- return dirtspread.dirt_on_timer(...)
- --end,
- on_finish_collapse = function(pos, node)
- minetest.swap_node(pos, {name="default:dirt"})
- end,
- movement_speed_multiplier = default.SLOW_SPEED_GRASS,
- })
- minetest.register_node("default:dirt_with_snow", {
- description = "Dirt With Snow",
- tiles = {
- "default_snow.png",
- "default_dirt.png",
- {name = "default_dirt.png^default_snow_side.png", tileable_vertical = false},
- },
- groups = utility.dig_groups("dirt", {falling_node = 1, dirt_type = 1, non_raw_dirt_type = 1, non_sterile_dirt_type = 1, snowy_dirt_type = 1, snowy = 1, cold = 1}),
- drop = 'default:dirt',
- post_effect_color = {a=255, r=0, g=0, b=0},
- sounds = default.node_sound_dirt_defaults({
- footstep = {name = "default_snow_footstep", gain = 0.2},
- }),
- -- Depreciated.
- --on_timer = function(...)
- -- return dirtspread.dirt_on_timer(...)
- --end,
- -- Dirt with snow does not need to turn back to dirt if it falls. After all, snow does not have roots that would be broken, unlike grass.
- --[[
- on_finish_collapse = function(pos, node)
- minetest.swap_node(pos, {name="default:dirt"})
- end,
- --]]
- movement_speed_multiplier = default.SLOW_SPEED,
- })
- minetest.register_node("default:dark_dirt_with_snow", {
- description = "Sterile Dirt With Snow",
- tiles = {
- "default_snow.png",
- "darkage_darkdirt.png",
- {name = "darkage_darkdirt.png^default_snow_side.png", tileable_vertical = false},
- },
- groups = utility.dig_groups("dirt", {falling_node = 1, dirt_type = 1, non_raw_dirt_type = 1, sterile_dirt_type = 1, snowy_dirt_type = 1, snowy = 1, cold = 1}),
- drop = 'darkage:darkdirt',
- post_effect_color = {a=255, r=0, g=0, b=0},
- sounds = default.node_sound_dirt_defaults({
- footstep = {name = "default_snow_footstep", gain = 0.2},
- }),
- -- Depreciated.
- --on_timer = function(...)
- -- return dirtspread.dirt_on_timer(...)
- --end,
- -- Dirt with snow does not need to turn back to dirt if it falls. After all, snow does not have roots that would be broken, unlike grass.
- --[[
- on_finish_collapse = function(pos, node)
- minetest.swap_node(pos, {name="darkage:darkdirt"})
- end,
- --]]
- movement_speed_multiplier = default.SLOW_SPEED,
- })
- minetest.register_node("default:dry_dirt_with_snow", {
- description = "Dry Dirt With Snow",
- tiles = {
- "default_snow.png",
- "default_dry_dirt.png",
- {name = "default_dry_dirt.png^default_snow_side.png", tileable_vertical = false},
- },
- groups = utility.dig_groups("dirt", {falling_node = 1, dirt_type = 1, non_raw_dirt_type = 1, non_sterile_dirt_type = 1, dry_dirt_type = 1, snowy_dirt_type = 1, snowy = 1, cold = 1}),
- drop = 'default:dry_dirt',
- post_effect_color = {a=255, r=0, g=0, b=0},
- sounds = default.node_sound_dirt_defaults({
- footstep = {name = "default_snow_footstep", gain = 0.2},
- }),
- -- Depreciated.
- --on_timer = function(...)
- -- return dirtspread.dirt_on_timer(...)
- --end,
- -- Dirt with snow does not need to turn back to dirt if it falls. After all, snow does not have roots that would be broken, unlike grass.
- --[[
- on_finish_collapse = function(pos, node)
- minetest.swap_node(pos, {name="default:dry_dirt"})
- end,
- --]]
- movement_speed_multiplier = default.SLOW_SPEED,
- })
- minetest.register_node("default:dirt_with_rainforest_litter", {
- description = "Dirt With Leaf Litter",
- tiles = {
- "default_rainforest_litter.png",
- "default_dirt.png",
- {name = "default_dirt.png^default_rainforest_litter_side.png", tileable_vertical = false},
- },
- groups = utility.dig_groups("dirt", {falling_node = 1, dirt_type = 1, non_raw_dirt_type = 1, leafy_dirt_type = 1, non_sterile_dirt_type = 1, soil = 1}),
- drop = "default:dirt",
- post_effect_color = {a=255, r=0, g=0, b=0},
- sounds = default.node_sound_dirt_defaults({
- footstep = {name = "default_grass_footstep", gain = 0.4},
- }),
- on_finish_collapse = function(pos, node)
- minetest.swap_node(pos, {name="default:dirt"})
- end,
- movement_speed_multiplier = default.SLOW_SPEED,
- })
- minetest.register_node("default:dark_dirt_with_rainforest_litter", {
- description = "Sterile Dirt With Leaf Litter",
- tiles = {
- "default_rainforest_litter.png",
- "darkage_darkdirt.png",
- {name = "darkage_darkdirt.png^default_rainforest_litter_side.png", tileable_vertical = false},
- },
- groups = utility.dig_groups("dirt", {dirt_type = 1, leafy_dirt_type = 1, non_raw_dirt_type = 1, sterile_dirt_type = 1, falling_node = 1}),
- drop = "darkage:darkdirt",
- post_effect_color = {a=255, r=0, g=0, b=0},
- sounds = default.node_sound_dirt_defaults({
- footstep = {name = "default_grass_footstep", gain = 0.4},
- }),
- on_finish_collapse = function(pos, node)
- minetest.swap_node(pos, {name="darkage:darkdirt"})
- end,
- movement_speed_multiplier = default.SLOW_SPEED,
- })
- minetest.register_node("default:dry_dirt_with_rainforest_litter", {
- description = "Dry Dirt With Leaf Litter",
- tiles = {
- "default_rainforest_litter.png",
- "default_dry_dirt.png",
- {name = "default_dry_dirt.png^default_rainforest_litter_side.png", tileable_vertical = false},
- },
- groups = utility.dig_groups("dirt", {dirt_type = 1, non_sterile_dirt_type = 1, non_raw_dirt_type = 1, leafy_dirt_type = 1, dry_dirt_type = 1, falling_node = 1}),
- drop = "default:dry_dirt",
- post_effect_color = {a=255, r=0, g=0, b=0},
- sounds = default.node_sound_dirt_defaults(),
- on_finish_collapse = function(pos, node)
- minetest.swap_node(pos, {name="default:dry_dirt"})
- end,
- movement_speed_multiplier = default.SLOW_SPEED,
- })
- minetest.register_node("default:dirt_with_coniferous_litter", {
- description = "Dirt With Acidic Litter",
- tiles = {
- "default_coniferous_litter.png",
- "default_dirt.png",
- {name = "default_dirt.png^default_coniferous_litter_side.png", tileable_vertical = false},
- },
- groups = utility.dig_groups("dirt", {falling_node = 1, non_sterile_dirt_type = 1, non_raw_dirt_type = 1, leafy_dirt_type = 1, dirt_type = 1, soil = 1}),
- drop = "default:dirt",
- post_effect_color = {a=255, r=0, g=0, b=0},
- sounds = default.node_sound_dirt_defaults({
- footstep = {name = "default_grass_footstep", gain = 0.4},
- }),
- on_finish_collapse = function(pos, node)
- minetest.swap_node(pos, {name="default:dirt"})
- end,
- movement_speed_multiplier = default.SLOW_SPEED,
- })
- minetest.register_node("default:dark_dirt_with_coniferous_litter", {
- description = "Sterile Dirt With Acidic Litter",
- tiles = {
- "default_coniferous_litter.png",
- "darkage_darkdirt.png",
- {name = "darkage_darkdirt.png^default_coniferous_litter_side.png", tileable_vertical = false},
- },
- groups = utility.dig_groups("dirt", {dirt_type = 1, sterile_dirt_type = 1, non_raw_dirt_type = 1, leafy_dirt_type = 1, falling_node = 1}),
- drop = "darkage:darkdirt",
- post_effect_color = {a=255, r=0, g=0, b=0},
- sounds = default.node_sound_dirt_defaults({
- footstep = {name = "default_grass_footstep", gain = 0.4},
- }),
- on_finish_collapse = function(pos, node)
- minetest.swap_node(pos, {name="darkage:darkdirt"})
- end,
- movement_speed_multiplier = default.SLOW_SPEED,
- })
- minetest.register_node("default:dry_dirt_with_coniferous_litter", {
- description = "Dry Dirt With Acidic Litter",
- tiles = {
- "default_coniferous_litter.png",
- "default_dry_dirt.png",
- {name = "default_dry_dirt.png^default_coniferous_litter_side.png", tileable_vertical = false},
- },
- groups = utility.dig_groups("dirt", {dirt_type = 1, non_sterile_dirt_type = 1, non_raw_dirt_type = 1, leafy_dirt_type = 1, dry_dirt_type = 1, falling_node = 1}),
- drop = "default:dry_dirt",
- post_effect_color = {a=255, r=0, g=0, b=0},
- sounds = default.node_sound_dirt_defaults(),
- on_finish_collapse = function(pos, node)
- minetest.swap_node(pos, {name="default:dry_dirt"})
- end,
- movement_speed_multiplier = default.SLOW_SPEED,
- })
- minetest.register_node("default:dry_dirt", {
- description = "Dry Dirt",
- tiles = {"default_dry_dirt.png"},
- groups = utility.dig_groups("dirt", {dirt_type = 1, dry_dirt_type = 1, non_sterile_dirt_type = 1, raw_dirt_type = 1, falling_node = 1}),
- post_effect_color = {a=255, r=0, g=0, b=0},
- sounds = default.node_sound_dirt_defaults(),
- movement_speed_multiplier = default.SLOW_SPEED,
- })
- minetest.register_node("default:dry_dirt_with_dry_grass", {
- description = "Dry Dirt With Dry Grass",
- tiles = {
- "default_dry_grass.png",
- "default_dry_dirt.png",
- {name = "default_dry_dirt.png^default_dry_grass_side.png", tileable_vertical = false},
- },
- groups = utility.dig_groups("dirt", {dirt_type = 1, dry_dirt_type = 1, non_raw_dirt_type = 1, non_sterile_dirt_type = 1, grassy_dirt_type = 1, falling_node = 1}),
- drop = "default:dry_dirt",
- post_effect_color = {a=255, r=0, g=0, b=0},
- sounds = default.node_sound_dirt_defaults({
- footstep = {name = "default_grass_footstep", gain = 0.4},
- }),
- on_finish_collapse = function(pos, node)
- minetest.swap_node(pos, {name="default:dry_dirt"})
- end,
- movement_speed_multiplier = default.SLOW_SPEED,
- })
- minetest.register_node("default:permafrost", {
- description = "Permafrost",
- tiles = {"default_permafrost.png"},
- groups = utility.dig_groups("cobble", {permafrost_type = 1, falling_node = 1, cold = 1}),
- sounds = default.node_sound_dirt_defaults(),
- movement_speed_multiplier = default.SLOW_SPEED,
- })
- minetest.register_node("default:permafrost_with_snow", {
- description = "Permafrost With Snow",
- tiles = {
- "default_snow.png",
- "default_permafrost.png",
- {name = "default_permafrost.png^default_snow_side.png", tileable_vertical = false},
- },
- groups = utility.dig_groups("cobble", {permafrost_type = 1, falling_node = 1, cold = 1, snowy = 1}),
- sounds = default.node_sound_dirt_defaults(),
- movement_speed_multiplier = default.SLOW_SPEED,
- })
- minetest.register_node("default:permafrost_with_stones", {
- description = "Permafrost With Stones",
- tiles = {
- "default_permafrost.png^default_stones.png",
- "default_permafrost.png",
- "default_permafrost.png^default_stones_side.png",
- },
- groups = utility.dig_groups("cobble", {permafrost_type = 1, falling_node = 1, cold = 1}),
- sounds = default.node_sound_gravel_defaults(),
- movement_speed_multiplier = default.SLOW_SPEED,
- })
- minetest.register_node("default:permafrost_with_snow_and_stones", {
- description = "Permafrost With Snow And Stones",
- tiles = {
- "default_permafrost.png^default_snow.png^default_stones.png",
- "default_permafrost.png",
- "default_permafrost.png^default_snow_side.png^default_stones_side.png",
- },
- groups = utility.dig_groups("cobble", {permafrost_type = 1, falling_node = 1, cold = 1, snowy = 1}),
- sounds = default.node_sound_gravel_defaults(),
- movement_speed_multiplier = default.SLOW_SPEED,
- })
- minetest.register_node("default:permafrost_with_moss", {
- description = "Permafrost With Moss",
- tiles = {
- "default_moss.png",
- "default_permafrost.png",
- {name = "default_permafrost.png^default_moss_side.png", tileable_vertical = false},
- },
- drop = "default:permafrost",
- groups = utility.dig_groups("cobble", {permafrost_type = 1, falling_node = 1, cold = 1}),
- sounds = default.node_sound_dirt_defaults({
- footstep = {name = "default_grass_footstep", gain = 0.25},
- }),
- on_finish_collapse = function(pos, node)
- minetest.swap_node(pos, {name="default:permafrost"})
- end,
- movement_speed_multiplier = default.SLOW_SPEED,
- })
- minetest.register_node("default:permafrost_with_moss_and_stones", {
- description = "Permafrost With Moss And Stones",
- tiles = {
- "default_moss.png^default_stones.png",
- "default_permafrost.png",
- {name = "default_permafrost.png^default_moss_side.png^default_stones_side.png", tileable_vertical = false},
- },
- drop = "default:permafrost_with_stones",
- groups = utility.dig_groups("cobble", {permafrost_type = 1, falling_node = 1, cold = 1}),
- sounds = default.node_sound_dirt_defaults({
- footstep = {name = "default_grass_footstep", gain = 0.25},
- }),
- on_finish_collapse = function(pos, node)
- minetest.swap_node(pos, {name="default:permafrost_with_stones"})
- end,
- movement_speed_multiplier = default.SLOW_SPEED,
- })
- minetest.register_node("default:sand", {
- description = "Sand",
- tiles = {"default_sand.png"},
- groups = utility.dig_groups("sand", {falling_node = 1, sand = 1, fall_damage_add_percent = -20}),
- post_effect_color = {a=255, r=0, g=0, b=0},
- sounds = default.node_sound_sand_defaults(),
- movement_speed_multiplier = default.SLOW_SPEED,
- })
- minetest.register_node("default:desert_sand", {
- description = "Desert Sand",
- tiles = {"default_desert_sand.png"},
- groups = utility.dig_groups("sand", {falling_node = 1, sand = 1, fall_damage_add_percent = -20}),
- sounds = default.node_sound_sand_defaults(),
- movement_speed_multiplier = default.SLOW_SPEED,
- })
- minetest.register_node("default:gravel", {
- description = "Gravel",
- tiles = {"default_gravel.png"},
- groups = utility.dig_groups("gravel", {falling_node = 1, gravel = 1}),
- sounds = default.node_sound_gravel_defaults(),
- drop = {
- max_items = 1,
- items = {
- {items = {'default:flint'}, rarity = 16},
- {items = {'default:gravel'}}
- }
- },
- post_effect_color = {a=255, r=0, g=0, b=0},
- -- Gravel is a component of wisp nests in Jarkati.
- after_destruct = function(pos, oldnode)
- local a = vector_add(pos, {x=0, y=1, z=0})
- local n = minetest.get_node(a)
- if n.name == "pm:spawner" then
- minetest.remove_node(a)
- end
- end,
- })
- minetest.register_node("default:clay", {
- description = "Clay",
- tiles = {"default_clay.png"},
- groups = utility.dig_groups("clay"),
- drop = 'default:clay_lump 4',
- sounds = default.node_sound_dirt_defaults(),
- movement_speed_multiplier = default.SLOW_SPEED,
- })
- minetest.register_node("default:snowblock", {
- description = "Snow Block",
- tiles = {"default_snow.png"},
- groups = utility.dig_groups("sand", {
- puts_out_fire = 1,
- snow = 1,
- snowy = 1,
- cold = 1,
- falling_node = 1,
- melts = 1,
- fall_damage_add_percent = -20,
- -- Currently used to notify ice nodes.
- notify_construct = 1,
- want_notify = 1,
- }),
- movement_speed_multiplier = default.SLOW_SPEED,
- _melts_to = "default:water_flowing",
- --damage_per_second = 2,
- post_effect_color = {a=255, r=255, g=255, b=255},
-
- sounds = default.node_sound_snow_defaults(),
- -- Hack to notify self.
- on_construct = function(pos)
- minetest.get_node_timer(pos):start(math_random(ice.minmax_time()))
- end,
- on_notify = function(...)
- return ice.on_ice_notify(...)
- end,
- on_timer = function(pos, elapsed)
- if rc.ice_melts_at_pos(pos) then
- minetest.add_node(pos, {name="default:water_flowing"})
- return
- end
- return ice.on_ice_timer(pos, elapsed)
- end,
- })
- minetest.register_node("default:ice", {
- description = "Ice",
- tiles = {"default_ice.png"},
- is_ground_content = false,
- paramtype = "light",
- groups = utility.dig_groups("ice", {
- ice = 1,
- cold = 1,
- --puts_out_fire = 1,
- melts = 1,
- want_notify = 1,
- slippery = 3,
- }),
- _melts_to = "default:water_flowing",
- sounds = default.node_sound_glass_defaults(),
- movement_speed_multiplier = default.SLOW_SPEED_ICE,
- -- Common ice does not count toward tool's dig count.
- _toolranks = {
- ignore = true,
- },
- _no_auto_pop = true,
- -- Hack to notify self.
- on_construct = function(pos)
- minetest.get_node_timer(pos):start(math_random(ice.minmax_time()))
- end,
- on_notify = function(...)
- return ice.on_ice_notify(...)
- end,
- on_timer = function(pos, elapsed)
- if rc.ice_melts_at_pos(pos) then
- minetest.add_node(pos, {name="default:water_flowing"})
- return
- end
- return ice.on_ice_timer(pos, elapsed)
- end,
- })
- --
- -- Trees
- --
- --
- -- Ores
- --
- minetest.register_node("default:stone_with_coal", {
- description = "Coal Deposit",
- tiles = {"default_stone.png^default_mineral_coal.png"},
- -- Cannot be flammable (although I would like it to be)
- -- because that interferes with TNT mining (the TNT replaces
- -- all coal with flame instead of dropping it).
- groups = utility.dig_groups("mineral"),
- drop = 'default:coal_lump',
- silverpick_drop = true,
- sounds = default.node_sound_stone_defaults(),
- place_param2 = 10,
- -- Digging coal ore has a chance to release poison gas.
- after_dig_node = function(pos, oldnode, oldmetadata, digger)
- if pos.y < -1024 then
- if math_random(1, 300) == 1 then
- breath.spawn_gas(pos)
- end
- end
- end,
- })
- minetest.register_node("default:desert_stone_with_coal", {
- description = "Redstone Coal Deposit",
- tiles = {"default_desert_stone.png^default_mineral_coal2.png"},
- -- Cannot be flammable (although I would like it to be)
- -- because that interferes with TNT mining (the TNT replaces
- -- all coal with flame instead of dropping it).
- groups = utility.dig_groups("mineral"),
- drop = 'default:coal_lump',
- silverpick_drop = true,
- sounds = default.node_sound_stone_defaults(),
- place_param2 = 10,
- })
- minetest.register_node("default:coalblock", {
- description = "Coal Block",
- tiles = {"default_coal_block.png"},
- is_ground_content = false,
- groups = utility.dig_groups("cobble", {flammable = 3}),
- sounds = default.node_sound_stone_defaults(),
- })
- minetest.register_node("default:stone_with_iron", {
- description = "Iron Ore",
- tiles = {"default_stone.png^default_mineral_iron.png"},
- groups = utility.dig_groups("mineral", {ore = 1}),
- drop = 'default:iron_lump',
- silverpick_drop = true,
- sounds = default.node_sound_stone_defaults(),
- place_param2 = 10,
- })
- minetest.register_node("default:steelblock", {
- description = "Wrought Iron Block",
- tiles = {"default_steel_block.png"},
- is_ground_content = false,
- groups = utility.dig_groups("block", {conductor = 1, block = 1}),
- sounds = default.node_sound_metal_defaults(),
- })
- minetest.register_node("default:stone_with_copper", {
- description = "Copper Ore",
- tiles = {"default_stone.png^default_mineral_copper.png"},
- groups = utility.dig_groups("mineral", {ore = 1}),
- drop = 'default:copper_lump',
- silverpick_drop = true,
- sounds = default.node_sound_stone_defaults(),
- place_param2 = 10,
- })
- minetest.register_node("default:desert_stone_with_copper", {
- description = "Redstone Copper Ore",
- -- Use old copper image, the pattern looks nicer.
- tiles = {"default_desert_stone.png^default_mineral_copper2.png"},
- groups = utility.dig_groups("mineral", {ore = 1}),
- drop = 'default:copper_lump',
- silverpick_drop = true,
- sounds = default.node_sound_stone_defaults(),
- place_param2 = 10,
- })
- minetest.register_node("default:desert_stone_with_iron", {
- description = "Redstone Iron Ore",
- -- Use old iron image, the pattern looks nicer.
- tiles = {"default_desert_stone.png^default_mineral_iron2.png"},
- groups = utility.dig_groups("mineral", {ore = 1}),
- drop = 'default:iron_lump',
- silverpick_drop = true,
- sounds = default.node_sound_stone_defaults(),
- place_param2 = 10,
- })
- minetest.register_node("default:desert_stone_with_diamond", {
- description = "Redstone Diamond Deposit",
- -- Use old diamond image, the pattern looks nicer.
- tiles = {"default_desert_stone.png^default_mineral_diamond2.png"},
- groups = utility.dig_groups("hardmineral"),
- drop = 'default:diamond',
- silverpick_drop = true,
- sounds = default.node_sound_stone_defaults(),
- place_param2 = 10,
- })
- minetest.register_node("default:copperblock", {
- description = "Copper Block",
- tiles = {"default_copper_block.png"},
- is_ground_content = false,
- groups = utility.dig_groups("block", {conductor = 1, block = 1}),
- sounds = default.node_sound_metal_defaults(),
- })
- minetest.register_node("default:bronzeblock", {
- description = "Bronze Block",
- tiles = {"default_bronze_block.png"},
- is_ground_content = false,
- groups = utility.dig_groups("block", {conductor = 1, block = 1}),
- sounds = default.node_sound_metal_defaults(),
- })
- minetest.register_node("default:stone_with_mese", {
- description = "Mese Ore",
- tiles = {"default_stone.png^default_mineral_mese.png"},
- groups = utility.dig_groups("hardmineral", {melts = 1}),
- drop = "default:mese_crystal",
- silverpick_drop = true,
- sounds = default.node_sound_stone_defaults(),
-
- -- Mese in stone reacts badly to lava.
- on_melt = function(pos, other)
- minetest.after(0, function()
- tnt.boom(pos, {
- radius = 4,
- ignore_protection = false,
- ignore_on_blast = false,
- damage_radius = 6,
- disable_drops = true,
- })
- end)
- end,
- })
- minetest.register_node("default:mese", {
- description = "Mese Block",
- tiles = {"default_mese_block.png"},
- paramtype = "light",
- groups = utility.dig_groups("hardstone", {melts = 1}),
- sounds = default.node_sound_stone_defaults(),
- light_source = 3,
-
- -- Mese in stone reacts badly to lava.
- -- Meseblock makes a much larger blast.
- on_melt = function(pos, other)
- minetest.after(0, function()
- tnt.boom(pos, {
- radius = 10,
- ignore_protection = false,
- ignore_on_blast = false,
- damage_radius = 20,
- disable_drops = true,
- })
- end)
- end,
- })
- minetest.register_node("default:stone_with_gold", {
- description = "Gold Ore",
- tiles = {"default_stone.png^default_mineral_gold.png"},
- groups = utility.dig_groups("mineral", {ore = 1}),
- drop = "default:gold_lump",
- silverpick_drop = true,
- sounds = default.node_sound_stone_defaults(),
- place_param2 = 10,
- })
- minetest.register_node("default:goldblock", {
- description = "Gold Block",
- tiles = {"default_gold_block.png"},
- is_ground_content = false,
- groups = utility.dig_groups("block", {conductor = 1, block = 1}),
- sounds = default.node_sound_metal_defaults(),
- })
- minetest.register_node("default:stone_with_diamond", {
- description = "Diamond Deposit",
- tiles = {"default_stone.png^default_mineral_diamond.png"},
- -- Player has to get mese pick or similar before they can get diamond.
- groups = utility.dig_groups("hardmineral"),
- drop = "default:diamond",
- silverpick_drop = true,
- sounds = default.node_sound_stone_defaults(),
- place_param2 = 10,
- })
- minetest.register_node("default:diamondblock", {
- description = "Diamond Block",
- tiles = {"default_diamond_block.png"},
- is_ground_content = false,
- groups = utility.dig_groups("obsidian"),
- sounds = default.node_sound_stone_defaults(),
- })
- --
- -- Plantlife (non-cubic)
- --
- do
- local nodebox = {
- -- Spine strips.
- {0, 1, 1, 16, 15, 1},
- {0, 1, 15, 16, 15, 15},
- {1, 1, 0, 1, 15, 16},
- {15, 1, 0, 15, 15, 16},
- -- Meat.
- {1, 0, 1, 15, 16, 15},
- -- Side skin.
- {4, 0, 0, 12, 16, 16},
- {0, 0, 4, 16, 16, 12},
- }
- local selectionbox = {
- {1, 0, 1, 15, 16, 15},
- }
- utility.transform_nodebox(nodebox)
- utility.transform_nodebox(selectionbox)
- minetest.register_node("default:cactus", {
- description = "Cactus",
- tiles = {
- "default_cactus_top.png",
- "default_cactus_top.png",
- "default_cactus_side.png"
- },
- paramtype = "light",
- drawtype = "nodebox",
- node_box = {
- type = "fixed",
- fixed = nodebox,
- },
- selection_box = {
- type = "fixed",
- fixed = selectionbox,
- },
- paramtype2 = "facedir",
- groups = utility.dig_groups("softwood", {flammable = 1, fall_damage_add_percent = 100}),
- sounds = default.node_sound_wood_defaults(),
- on_place = minetest.rotate_node,
- damage_per_second = 1,
- on_punch = function(pos, node, puncher, pt)
- if not puncher or not puncher:is_player() then return end
- local stack = puncher:get_wielded_item()
- local name = stack:get_name() or ""
- if not string.find(name, "axe") then
- puncher:set_hp(puncher:get_hp() - 1)
- end
- end,
- on_player_walk_over = function(pos, player)
- player:set_hp(player:get_hp() - 1)
- if player:get_hp() == 0 then
- minetest.chat_send_all("# Server: <" .. rename.gpn(player:get_player_name()) .. "> stepped on cactus. Noob!")
- end
- end,
- on_construct = function(...)
- return cactus.on_construct(...)
- end,
- on_destruct = function(...)
- return cactus.on_destruct(...)
- end,
- on_timer = function(...)
- return cactus.on_timer(...)
- end,
- after_dig_node = function(...)
- return cactus.after_dig_node(...)
- end,
- })
- end
- --[[
- --= Tests of Tools Against Default Groups =--
- result_of {snappy = 1, choppy = 3} + tool=default:axe_stone : digsound=success
- result_of {snappy = 1, choppy = 3} + tool=default:axe_diamond : digsound=success
- result_of {snappy = 1, choppy = 3} + tool=default:axe_steel : digsound=success
- result_of {snappy = 1, choppy = 3} + tool=default:axe_mese : digsound=success
- result_of {snappy = 1, choppy = 3} + tool=default:sword_steel : digsound=failure
- result_of {snappy = 1, choppy = 3} + tool=default:sword_stone : digsound=N/A (could not dig)
- result_of {snappy = 1, choppy = 3} + tool=default:sword_diamond : digsound=failure
- result_of {snappy = 1, choppy = 3} + tool=default:sword_mese : digsound=failure
- result_of {snappy = 1, choppy = 3} + tool=default:shovel_stone : digsound=N/A (could not dig)
- result_of {snappy = 1, choppy = 3} + tool=default:shovel_steel : digsound=N/A (could not dig)
- result_of {snappy = 1, choppy = 3} + tool=default:shovel_diamond : digsound=N/A (could not dig)
- result_of {snappy = 1, choppy = 3} + tool=default:shovel_mese : digsound=N/A (could not dig)
- result_of {snappy = 1, choppy = 3} + tool=default:pick_stone : digsound=N/A (could not dig)
- result_of {snappy = 1, choppy = 3} + tool=default:pick_steel : digsound=N/A (could not dig)
- result_of {snappy = 1, choppy = 3} + tool=default:pick_diamond : digsound=N/A (could not dig)
- result_of {snappy = 1, choppy = 3} + tool=default:pick_mese : digsound=N/A (could not dig)
- --= Tests of Tools Against Modified Groups (A) =--
- result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:pick_stone : digsound=N/A (could not dig)
- result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:pick_steel : digsound=success
- result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:pick_diamond : digsound=success
- result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:pick_mese : digsound=success
- result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:axe_stone : digsound=success
- result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:axe_steel : digsound=success
- result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:axe_diamond : digsound=success
- result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:axe_mese : digsound=success
- result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:shovel_stone : digsound=N/A (could not dig)
- result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:shovel_steel : digsound=N/A (could not dig)
- result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:shovel_diamond : digsound=N/A (could not dig)
- result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:shovel_mese : digsound=N/A (could not dig)
- result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:sword_stone : digsound=N/A (could not dig)
- result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:sword_steel : digsound=failure
- result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:sword_diamond : digsound=failure
- result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:sword_mese : digsound=failure
- --= Tests of Tools Against Modified Groups (B) =--
- result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:pick_stone : digsound=N/A (could not dig)
- result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:pick_steel : digsound=success
- result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:pick_diamond : digsound=success
- result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:pick_mese : digsound=success
- result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:axe_stone : digsound=success
- result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:axe_steel : digsound=success
- result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:axe_diamond : digsound=success
- result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:axe_mese : digsound=success
- result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:shovel_stone : digsound=success
- result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:shovel_steel : digsound=success
- result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:shovel_diamond : digsound=success
- result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:shovel_mese : digsound=success
- result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:sword_stone : digsound=N/A (could not dig)
- result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:sword_steel : digsound=failure
- result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:sword_diamond : digsound=failure
- result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:sword_mese : digsound=failure
- --= Tests of Swords Against Modified Groups (C) =--
- result_of {snappy = 1} + tool=default:sword_stone : digsound=N/A (could not dig)
- result_of {snappy = 1} + tool=default:sword_steel : digsound=failure
- result_of {snappy = 1} + tool=default:sword_diamond : digsound=failure
- result_of {snappy = 1} + tool=default:sword_mese : digsound=failure
- --]]
- minetest.register_node("default:papyrus", {
- description = "Papyrus",
- drawtype = "plantlike",
- tiles = {"default_papyrus.png"},
- inventory_image = "default_papyrus.png",
- wield_image = "default_papyrus.png",
- paramtype = "light",
- sunlight_propagates = true,
- walkable = false,
- selection_box = {
- type = "fixed",
- fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
- },
- groups = utility.dig_groups("plant", {flammable = 2}),
- sounds = default.node_sound_leaves_defaults(),
- movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
- on_construct = function(...)
- return papyrus.on_construct(...)
- end,
- on_destruct = function(...)
- return papyrus.on_destruct(...)
- end,
- on_timer = function(...)
- return papyrus.on_timer(...)
- end,
- after_dig_node = function(...)
- return papyrus.after_dig_node(...)
- end,
- })
- minetest.register_node("default:dry_shrub", {
- description = "Dry Shrub",
- drawtype = "plantlike",
- waving = 1,
- --visual_scale = 1.0,
- tiles = {"default_dry_shrub.png"},
- inventory_image = "default_dry_shrub.png",
- wield_image = "default_dry_shrub.png",
- paramtype = "light",
- sunlight_propagates = true,
- walkable = false,
- buildable_to = true,
- groups = utility.dig_groups("plant", {flammable = 3, attached_node = 1, dry_grass = 1}),
- sounds = default.node_sound_leaves_defaults(),
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
- },
- movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
- -- Drop 1 or 2 sticks.
- drop = {
- max_items = 1,
- items = {
- {items = {'default:stick 2'}, rarity = 2},
- {items = {'default:stick'}},
- }
- },
- shears_drop = true,
- flowerpot_drop = "default:dry_shrub",
- })
- minetest.register_node("default:junglegrass", {
- description = "Jungle Grass",
- drawtype = "plantlike",
- waving = 1,
- visual_scale = 1.69,
- tiles = {"default_junglegrass.png"},
- inventory_image = "default_junglegrass.png",
- wield_image = "default_junglegrass.png",
- paramtype = "light",
- paramtype2 = "meshoptions",
- place_param2 = 2,
- sunlight_propagates = true,
- walkable = false,
- buildable_to = true,
- -- Default drops are defined in farming mod.
- flowerpot_drop = "default:junglegrass",
- groups = utility.dig_groups("plant", {flora = 1, attached_node = 1, grass = 1, junglegrass = 1, flammable = 1}),
- sounds = default.node_sound_leaves_defaults(),
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
- },
- movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
- on_construct = function(...)
- return flowers.on_flora_construct(...)
- end,
- on_destruct = function(...)
- return flowers.on_flora_destruct(...)
- end,
- on_timer = function(...)
- return flowers.on_flora_timer(...)
- end,
- on_punch = function(...)
- return flowers.on_flora_punch(...)
- end,
- })
- minetest.register_node("default:coarsegrass", {
- description = "Coarse Grass",
- drawtype = "plantlike",
- waving = 1,
- visual_scale = 1.0,
- tiles = {"default_junglegrass_newstyle.png"},
- inventory_image = "default_junglegrass_newstyle.png",
- wield_image = "default_junglegrass_newstyle.png",
- paramtype = "light",
- paramtype2 = "meshoptions",
- place_param2 = 2,
- sunlight_propagates = true,
- walkable = false,
- buildable_to = true,
- drop = "default:stick",
- shears_drop = true,
- flowerpot_drop = "default:coarsegrass",
- groups = utility.dig_groups("plant", {flora = 1, attached_node = 1, grass = 1, junglegrass = 1, flammable = 1}),
- sounds = default.node_sound_leaves_defaults(),
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
- },
- movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
- on_construct = function(...)
- return flowers.on_flora_construct(...)
- end,
- on_destruct = function(...)
- return flowers.on_flora_destruct(...)
- end,
- on_timer = function(...)
- return flowers.on_flora_timer(...)
- end,
- on_punch = function(...)
- return flowers.on_flora_punch(...)
- end,
- })
- -- This node is not meant to be placed in the world.
- -- Instead, placing it causes 1 of several other nodetypes to be placed instead.
- minetest.register_node("default:grass_dummy", {
- description = "Wild Grass\n\nA common field plant, sometimes containing seeds.\nCan be hung upside down like some herbs.",
- drawtype = "plantlike",
- waving = 1,
- tiles = {"default_grass_1.png"},
- -- Use texture of a taller grass stage in inventory
- inventory_image = "default_grass_3.png",
- wield_image = "default_grass_3.png",
- paramtype = "light",
- paramtype2 = "meshoptions",
- place_param2 = 2,
- sounds = default.node_sound_leaves_defaults(),
- movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
- flowerpot_insert = {"default:grass_1", "default:grass_2", "default:grass_3", "default:grass_4", "default:grass_5"},
- -- Zero-width selection box.
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -0.5, 0.5},
- },
- on_place = function(itemstack, placer, pt)
- -- place a random grass node
- -- If pointing to the ceiling place hanging grass.
- --minetest.chat_send_all(dump(pt))
- if pt.type == "node" then
- --minetest.chat_send_all("1: " .. minetest.pos_to_string(pt.under) .. ".")
- --minetest.chat_send_all("2: " .. minetest.pos_to_string(pt.above) .. ".")
- if pt.under.y-1 == pt.above.y then
- --minetest.chat_send_all("hanging!")
- local stack = ItemStack("default:grass_" .. math_random(1,5) .. "_hanging")
- local ret = minetest.item_place(stack, placer, pt)
- return ItemStack("default:grass_dummy " .. itemstack:get_count() - (1 - ret:get_count()))
- end
- end
- local stack = ItemStack("default:grass_" .. math_random(1,5))
- local ret = minetest.item_place(stack, placer, pt)
- return ItemStack("default:grass_dummy " .. itemstack:get_count() - (1 - ret:get_count()))
- end,
- })
- for i = 1, 5 do
- minetest.register_node("default:grass_" .. i, {
- description = "Grass",
- drawtype = "plantlike",
- waving = 1,
- tiles = {"default_grass_" .. i .. ".png"},
- inventory_image = "default_grass_3.png",
- wield_image = "default_grass_3.png",
- paramtype = "light",
- paramtype2 = "meshoptions",
- place_param2 = 2,
- sunlight_propagates = true,
- walkable = false,
- buildable_to = true,
- -- Default drops are defined in farming mod.
- flowerpot_drop = "default:grass_dummy",
- groups = utility.dig_groups("plant", {flora = 1, attached_node = 1, not_in_creative_inventory = 1, grass = 1, flammable = 1}),
- sounds = default.node_sound_leaves_defaults(),
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
- },
- movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
- on_construct = function(...)
- return flowers.on_flora_construct(...)
- end,
- on_destruct = function(...)
- return flowers.on_flora_destruct(...)
- end,
- on_timer = function(...)
- return flowers.on_flora_timer(...)
- end,
- on_punch = function(...)
- return flowers.on_flora_punch(...)
- end,
- })
- end
- for i = 1, 5 do
- minetest.register_node("default:grass_" .. i .. "_hanging", {
- description = "Hanging Grass",
- drawtype = "plantlike",
- -- Waving hanging nodes look ugly.
- --waving = 1,
- tiles = {"default_grass_" .. i .. ".png^[transformFY"},
- inventory_image = "default_grass_3.png",
- wield_image = "default_grass_3.png",
- paramtype = "light",
- paramtype2 = "meshoptions",
- place_param2 = 2,
- sunlight_propagates = true,
- walkable = false,
- buildable_to = true,
- -- Default drops are defined in farming mod.
- flowerpot_drop = "default:grass_dummy",
- groups = utility.dig_groups("plant", {hanging_node = 1, not_in_creative_inventory = 1, grass = 1, flammable = 1}),
- sounds = default.node_sound_leaves_defaults(),
- selection_box = {
- type = "fixed",
- fixed = {-0.5, 0.5, -0.5, 0.5, 5/16, 0.5},
- },
- movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
- })
- end
- minetest.register_node("default:dry_grass_dummy", {
- description = "Dry Grass",
- drawtype = "plantlike",
- waving = 1,
- tiles = {"default_dry_grass_1.png"},
- inventory_image = "default_dry_grass_3.png",
- wield_image = "default_dry_grass_3.png",
- paramtype = "light",
- paramtype2 = "meshoptions",
- place_param2 = 2,
- sounds = default.node_sound_leaves_defaults(),
- movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
- flowerpot_insert = {"default:dry_grass_1", "default:dry_grass_2", "default:dry_grass_3", "default:dry_grass_4", "default:dry_grass_5"},
- -- Zero-width selection box.
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -0.5, 0.5},
- },
- on_place = function(itemstack, placer, pt)
- -- place a random dry grass node
- -- If pointing to the ceiling place hanging grass.
- --minetest.chat_send_all(dump(pt))
- if pt.type == "node" then
- --minetest.chat_send_all("1: " .. minetest.pos_to_string(pt.under) .. ".")
- --minetest.chat_send_all("2: " .. minetest.pos_to_string(pt.above) .. ".")
- if pt.under.y-1 == pt.above.y then
- --minetest.chat_send_all("hanging!")
- local stack = ItemStack("default:dry_grass_" .. math_random(1,5) .. "_hanging")
- local ret = minetest.item_place(stack, placer, pt)
- return ItemStack("default:dry_grass_dummy " .. itemstack:get_count() - (1 - ret:get_count()))
- end
- end
- local stack = ItemStack("default:dry_grass_" .. math_random(1, 5))
- local ret = minetest.item_place(stack, placer, pt)
- return ItemStack("default:dry_grass_dummy " .. itemstack:get_count() - (1 - ret:get_count()))
- end,
- })
- for i = 1, 5 do
- minetest.register_node("default:dry_grass_" .. i, {
- description = "Dry Grass",
- drawtype = "plantlike",
- waving = 1,
- tiles = {"default_dry_grass_" .. i .. ".png"},
- inventory_image = "default_dry_grass_3.png",
- wield_image = "default_dry_grass_3.png",
- paramtype = "light",
- paramtype2 = "meshoptions",
- place_param2 = 2,
- sunlight_propagates = true,
- walkable = false,
- buildable_to = true,
- groups = utility.dig_groups("plant", {flammable = 3, flora = 1, attached_node = 1,
- not_in_creative_inventory=1, dry_grass = 1}),
- drop = "",
- shears_drop = "default:dry_grass_dummy",
- flowerpot_drop = "default:dry_grass_dummy",
- sounds = default.node_sound_leaves_defaults(),
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
- },
- movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
- on_construct = function(...)
- return flowers.on_flora_construct(...)
- end,
- on_destruct = function(...)
- return flowers.on_flora_destruct(...)
- end,
- on_timer = function(...)
- return flowers.on_flora_timer(...)
- end,
- on_punch = function(...)
- return flowers.on_flora_punch(...)
- end,
- })
- end
- for i = 1, 5 do
- minetest.register_node("default:dry_grass_" .. i .. "_hanging", {
- description = "Dry Grass",
- drawtype = "plantlike",
- -- Waving hanging grass looks silly.
- --waving = 1,
- tiles = {"default_dry_grass_" .. i .. ".png^[transformFY"},
- inventory_image = "default_dry_grass_3.png",
- wield_image = "default_dry_grass_3.png",
- paramtype = "light",
- paramtype2 = "meshoptions",
- place_param2 = 2,
- sunlight_propagates = true,
- walkable = false,
- buildable_to = true,
- -- Not in flora group, since it does not need to spread.
- groups = utility.dig_groups("plant", {flammable = 3, hanging_node = 1,
- not_in_creative_inventory=1, dry_grass = 1}),
- drop = "",
- shears_drop = "default:dry_grass_dummy",
- flowerpot_drop = "default:dry_grass_dummy",
- sounds = default.node_sound_leaves_defaults(),
- selection_box = {
- type = "fixed",
- fixed = {-0.5, 0.5, -0.5, 0.5, 5/16, 0.5},
- },
- movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
- })
- end
- minetest.register_node("default:dry_grass2_dummy", {
- description = "Dry Grass",
- drawtype = "plantlike",
- waving = 1,
- tiles = {"default_dry_grass2_1.png"},
- inventory_image = "default_dry_grass2_3.png",
- wield_image = "default_dry_grass2_3.png",
- paramtype = "light",
- paramtype2 = "meshoptions",
- place_param2 = 2,
- sounds = default.node_sound_leaves_defaults(),
- movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
- flowerpot_insert = {"default:dry_grass2_1", "default:dry_grass2_2", "default:dry_grass2_3", "default:dry_grass2_4", "default:dry_grass2_5"},
- -- Zero-width selection box.
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -0.5, 0.5},
- },
- on_place = function(itemstack, placer, pt)
- -- place a random dry grass node
- -- If pointing to the ceiling place hanging grass.
- --minetest.chat_send_all(dump(pt))
- if pt.type == "node" then
- --minetest.chat_send_all("1: " .. minetest.pos_to_string(pt.under) .. ".")
- --minetest.chat_send_all("2: " .. minetest.pos_to_string(pt.above) .. ".")
- if pt.under.y-1 == pt.above.y then
- --minetest.chat_send_all("hanging!")
- local stack = ItemStack("default:dry_grass2_" .. math_random(1,5) .. "_hanging")
- local ret = minetest.item_place(stack, placer, pt)
- return ItemStack("default:dry_grass2_dummy " .. itemstack:get_count() - (1 - ret:get_count()))
- end
- end
- local stack = ItemStack("default:dry_grass2_" .. math_random(1, 5))
- local ret = minetest.item_place(stack, placer, pt)
- return ItemStack("default:dry_grass2_dummy " .. itemstack:get_count() - (1 - ret:get_count()))
- end,
- })
- for i = 1, 5 do
- minetest.register_node("default:dry_grass2_" .. i, {
- description = "Dry Grass",
- drawtype = "plantlike",
- waving = 1,
- tiles = {"default_dry_grass2_" .. i .. ".png"},
- inventory_image = "default_dry_grass2_3.png",
- wield_image = "default_dry_grass2_3.png",
- paramtype = "light",
- paramtype2 = "meshoptions",
- place_param2 = 2,
- sunlight_propagates = true,
- walkable = false,
- buildable_to = true,
- groups = utility.dig_groups("plant", {flammable = 3, flora = 1, attached_node = 1,
- not_in_creative_inventory=1, dry_grass = 1}),
- drop = "",
- shears_drop = "default:dry_grass2_dummy",
- flowerpot_drop = "default:dry_grass2_dummy",
- sounds = default.node_sound_leaves_defaults(),
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
- },
- movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
- on_construct = function(...)
- return flowers.on_flora_construct(...)
- end,
- on_destruct = function(...)
- return flowers.on_flora_destruct(...)
- end,
- on_timer = function(...)
- return flowers.on_flora_timer(...)
- end,
- on_punch = function(...)
- return flowers.on_flora_punch(...)
- end,
- })
- end
- for i = 1, 5 do
- minetest.register_node("default:dry_grass2_" .. i .. "_hanging", {
- description = "Dry Grass",
- drawtype = "plantlike",
- -- Waving hanging grass looks silly.
- --waving = 1,
- tiles = {"default_dry_grass2_" .. i .. ".png^[transformFY"},
- inventory_image = "default_dry_grass2_3.png",
- wield_image = "default_dry_grass2_3.png",
- paramtype = "light",
- paramtype2 = "meshoptions",
- place_param2 = 2,
- sunlight_propagates = true,
- walkable = false,
- buildable_to = true,
- -- Not in flora group, since it does not need to spread.
- groups = utility.dig_groups("plant", {flammable = 3, hanging_node = 1,
- not_in_creative_inventory=1, dry_grass = 1}),
- drop = "",
- shears_drop = "default:dry_grass2_dummy",
- flowerpot_drop = "default:dry_grass2_dummy",
- sounds = default.node_sound_leaves_defaults(),
- selection_box = {
- type = "fixed",
- fixed = {-0.5, 0.5, -0.5, 0.5, 5/16, 0.5},
- },
- movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
- })
- end
- --
- -- Liquids
- --
- minetest.register_node("default:water_source", {
- description = "Water Source",
- drawtype = "liquid",
- tiles = {
- {
- name = "default_water_source_animated.png",
- animation = {
- type = "vertical_frames",
- aspect_w = 16,
- aspect_h = 16,
- length = 2.0,
- },
- },
- },
- special_tiles = {
- -- New-style water source material (mostly unused)
- {
- name = "default_water_source_animated.png",
- animation = {
- type = "vertical_frames",
- aspect_w = 16,
- aspect_h = 16,
- length = 2.0,
- },
- backface_culling = false,
- },
- },
- alpha = 160,
- paramtype = "light",
- walkable = false,
- pointable = false,
- diggable = false,
- buildable_to = true,
- is_ground_content = false,
- drop = "",
- drowning = 4,
- liquidtype = "source",
- liquid_alternative_flowing = "default:water_flowing",
- liquid_alternative_source = "default:water_source",
- liquid_viscosity = 1,
- post_effect_color = {a = 103, r = 30, g = 60, b = 90},
- groups = {water = 3, liquid = 3, puts_out_fire = 1},
- sounds = default.node_sound_water_defaults(),
- -- Water turns to fire in the nether.
- -- Note: this is not called if water-source is created by the engine due to liquid-flow mechanic.
- on_construct = function(pos)
- farming.notify_soil(pos)
- if minetest.find_node_near(pos, 10, "griefer:grieferstone") then
- minetest.add_node(pos, {name="fire:basic_flame"})
- return
- end
- if rc.current_realm_at_pos(pos) == "channelwood" then
- minetest.swap_node(pos, {name="cw:water_source"})
- return
- end
- if pos.y < -25000 then
- minetest.add_node(pos, {name="fire:basic_flame"})
- end
- end,
- on_destruct = function(pos)
- farming.notify_soil(pos)
- end,
- on_collapse_to_entity = function(pos, node)
- -- Do not allow player to obtain the node itself.
- end,
- })
- minetest.register_node("default:water_flowing", {
- description = "Flowing Water",
- drawtype = "flowingliquid",
- tiles = {"default_water.png"},
- special_tiles = {
- {
- name = "default_water_flowing_animated.png",
- backface_culling = false,
- animation = {
- type = "vertical_frames",
- aspect_w = 16,
- aspect_h = 16,
- length = 0.8,
- },
- },
- {
- name = "default_water_flowing_animated.png",
- backface_culling = true,
- animation = {
- type = "vertical_frames",
- aspect_w = 16,
- aspect_h = 16,
- length = 0.8,
- },
- },
- },
- alpha = 160,
- paramtype = "light",
- paramtype2 = "flowingliquid",
- walkable = false,
- pointable = false,
- diggable = false,
- buildable_to = true,
- is_ground_content = false,
- drop = "",
- drowning = 4,
- liquidtype = "flowing",
- liquid_alternative_flowing = "default:water_flowing",
- liquid_alternative_source = "default:water_source",
- liquid_viscosity = 1,
- post_effect_color = {a = 103, r = 30, g = 60, b = 90},
- groups = {water = 3, liquid = 3, puts_out_fire = 1, not_in_creative_inventory = 1},
- sounds = default.node_sound_water_defaults(),
- on_collapse_to_entity = function(pos, node)
- -- Do not allow player to obtain the node itself.
- end,
- on_construct = function(pos)
- if minetest.find_node_near(pos, 10, "griefer:grieferstone") then
- minetest.add_node(pos, {name="fire:basic_flame"})
- return
- end
- if rc.current_realm_at_pos(pos) == "channelwood" then
- minetest.swap_node(pos, {name="cw:water_flowing"})
- return
- end
- if pos.y < -25000 then
- minetest.add_node(pos, {name="fire:basic_flame"})
- end
- end,
- })
- minetest.register_node("default:river_water_source", {
- description = "Salt Water Source",
- drawtype = "liquid",
- tiles = {
- {
- name = "default_river_water_source_animated.png",
- animation = {
- type = "vertical_frames",
- aspect_w = 16,
- aspect_h = 16,
- length = 2.0,
- },
- },
- },
- special_tiles = {
- {
- name = "default_river_water_source_animated.png",
- animation = {
- type = "vertical_frames",
- aspect_w = 16,
- aspect_h = 16,
- length = 2.0,
- },
- backface_culling = false,
- },
- },
- alpha = 160,
- paramtype = "light",
- walkable = false,
- pointable = false,
- diggable = false,
- buildable_to = true,
- is_ground_content = false,
- drop = "",
- drowning = 4,
- liquidtype = "source",
- liquid_alternative_flowing = "default:river_water_flowing",
- liquid_alternative_source = "default:river_water_source",
- liquid_viscosity = 1,
- -- River water can be placed above ground, so liquid must NOT be renewable!
- liquid_renewable = false,
- liquid_range = 2,
- post_effect_color = {a = 103, r = 30, g = 76, b = 90},
- groups = {water = 3, liquid = 3, puts_out_fire = 1},
- sounds = default.node_sound_water_defaults(),
- -- Water turns to fire in the nether.
- -- Note: this is not called if water-source is created by the engine due to liquid-flow mechanic.
- on_construct = function(pos)
- farming.notify_soil(pos)
- if minetest.find_node_near(pos, 10, "griefer:grieferstone") then
- minetest.add_node(pos, {name="fire:basic_flame"})
- return
- end
- if pos.y < -25000 then
- minetest.add_node(pos, {name="fire:basic_flame"})
- end
- end,
- on_destruct = function(pos)
- farming.notify_soil(pos)
- end,
- on_collapse_to_entity = function(pos, node)
- -- Do not allow player to obtain the node itself.
- end,
- })
- minetest.register_node("default:river_water_flowing", {
- description = "Flowing Salt Water",
- drawtype = "flowingliquid",
- tiles = {"default_river_water.png"},
- special_tiles = {
- {
- name = "default_river_water_flowing_animated.png",
- backface_culling = false,
- animation = {
- type = "vertical_frames",
- aspect_w = 16,
- aspect_h = 16,
- length = 0.8,
- },
- },
- {
- name = "default_river_water_flowing_animated.png",
- backface_culling = true,
- animation = {
- type = "vertical_frames",
- aspect_w = 16,
- aspect_h = 16,
- length = 0.8,
- },
- },
- },
- alpha = 160,
- paramtype = "light",
- paramtype2 = "flowingliquid",
- walkable = false,
- pointable = false,
- diggable = false,
- buildable_to = true,
- is_ground_content = false,
- drop = "",
- drowning = 4,
- liquidtype = "flowing",
- liquid_alternative_flowing = "default:river_water_flowing",
- liquid_alternative_source = "default:river_water_source",
- liquid_viscosity = 1,
- -- River water can be placed above ground, so liquid must NOT be renewable!
- liquid_renewable = false,
- liquid_range = 2,
- post_effect_color = {a = 103, r = 30, g = 76, b = 90},
- groups = {water = 3, liquid = 3, puts_out_fire = 1, not_in_creative_inventory = 1},
- sounds = default.node_sound_water_defaults(),
- on_collapse_to_entity = function(pos, node)
- -- Do not allow player to obtain the node itself.
- end,
- on_construct = function(pos)
- if minetest.find_node_near(pos, 10, "griefer:grieferstone") then
- minetest.set_node(pos, {name="fire:basic_flame"})
- return
- end
- if pos.y < -25000 then
- minetest.set_node(pos, {name="fire:basic_flame"})
- end
- end,
- })
- --
- -- Tools / "Advanced" crafting / Non-"natural"
- --
- minetest.register_node("default:ladder_wood", {
- description = "Wooden Ladder",
- drawtype = "signlike",
- tiles = {"default_ladder_wood.png"},
- inventory_image = "default_ladder_wood.png",
- wield_image = "default_ladder_wood.png",
- paramtype = "light",
- paramtype2 = "wallmounted",
- sunlight_propagates = true,
- walkable = false,
- climbable = true,
- is_ground_content = false,
- selection_box = {
- type = "wallmounted",
- --wall_top = = <default>
- --wall_bottom = = <default>
- --wall_side = = <default>
- },
- groups = utility.dig_groups("bigitem", {flammable = 2, ladder=1}),
- legacy_wallmounted = true,
- sounds = default.node_sound_wood_defaults(),
- -- Lava burns wood ladders instantly.
- -- Water rots wood (instantly too, I guess).
- -- Gameplay rational: make it important to use trapdoors, etc. to block flow.
- floodable = true,
- })
- minetest.register_node("default:ladder_steel", {
- description = "Wrought Iron Ladder",
- drawtype = "signlike",
- tiles = {"default_ladder_steel.png"},
- inventory_image = "default_ladder_steel.png",
- wield_image = "default_ladder_steel.png",
- paramtype = "light",
- paramtype2 = "wallmounted",
- sunlight_propagates = true,
- walkable = false,
- climbable = true,
- is_ground_content = false,
- selection_box = {
- type = "wallmounted",
- --wall_top = = <default>
- --wall_bottom = = <default>
- --wall_side = = <default>
- },
- groups = utility.dig_groups("bigitem", {ladder=1}),
- sounds = default.node_sound_metal_defaults(),
- -- Lava melts metal ladders quickly.
- -- Water rusts them (quickly too, I guess).
- -- Gameplay rational: make it important to use trapdoors, etc. to block flow.
- floodable = true,
- })
- minetest.register_node(":defauIt:ladder_wood", {
- description = "Wooden Trap Ladder",
- drawtype = "signlike",
- tiles = {"default_ladder_wood.png"},
- inventory_image = "default_ladder_wood.png",
- wield_image = "default_ladder_wood.png",
- paramtype = "light",
- paramtype2 = "wallmounted",
- sunlight_propagates = true,
- walkable = false,
- climbable = false, -- Player drops through.
- is_ground_content = false,
- selection_box = {
- type = "wallmounted",
- --wall_top = = <default>
- --wall_bottom = = <default>
- --wall_side = = <default>
- },
- groups = utility.dig_groups("bigitem", {flammable = 2}),
- sounds = default.node_sound_wood_defaults(),
- -- Lava burns wood ladders instantly.
- -- Water rots wood (instantly too, I guess).
- -- Gameplay rational: make it important to use trapdoors, etc. to block flow.
- floodable = true,
- })
- minetest.register_node(":defauIt:ladder_steel", {
- description = "Wrought Iron Trap Ladder",
- drawtype = "signlike",
- tiles = {"default_ladder_steel.png"},
- inventory_image = "default_ladder_steel.png",
- wield_image = "default_ladder_steel.png",
- paramtype = "light",
- paramtype2 = "wallmounted",
- sunlight_propagates = true,
- walkable = false,
- climbable = false, -- Player drops through.
- is_ground_content = false,
- selection_box = {
- type = "wallmounted",
- --wall_top = = <default>
- --wall_bottom = = <default>
- --wall_side = = <default>
- },
- groups = utility.dig_groups("bigitem"),
- sounds = default.node_sound_metal_defaults(),
- -- Lava melts metal ladders quickly.
- -- Water rusts them (quickly too, I guess).
- -- Gameplay rational: make it important to use trapdoors, etc. to block flow.
- floodable = true,
- })
- default.register_fence("default:fence_iron", {
- description = "Wrought Iron Fence",
- texture = "default_fence_iron.png",
- inventory_image = "default_fence_overlay.png^default_fence_iron.png^default_fence_overlay.png^[makealpha:255,126,126",
- wield_image = "default_fence_overlay.png^default_fence_iron.png^default_fence_overlay.png^[makealpha:255,126,126",
- material = "default:steel_ingot",
- groups = utility.dig_groups("fence_metal", {fence = 1}),
- sounds = default.node_sound_metal_defaults()
- })
- default.register_fence("default:fence_bronze", {
- description = "Bronze Fence",
- texture = "default_fence_bronze.png",
- inventory_image = "default_fence_overlay.png^default_fence_bronze.png^default_fence_overlay.png^[makealpha:255,126,126",
- wield_image = "default_fence_overlay.png^default_fence_bronze.png^default_fence_overlay.png^[makealpha:255,126,126",
- material = "default:bronze_ingot",
- groups = utility.dig_groups("fence_metal", {fence = 1}),
- sounds = default.node_sound_metal_defaults()
- })
- default.register_fence("default:fence_wood", {
- description = "Wooden Fence",
- texture = "default_fence_wood.png",
- inventory_image = "default_fence_overlay.png^default_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
- wield_image = "default_fence_overlay.png^default_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
- material = "default:wood",
- groups = utility.dig_groups("fence_wood", {flammable = 2, fence = 1}),
- sounds = default.node_sound_wood_defaults()
- })
- default.register_fence("default:fence_acacia_wood", {
- description = "Acacia Wood Fence",
- texture = "default_fence_acacia_wood.png",
- inventory_image = "default_fence_overlay.png^default_acacia_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
- wield_image = "default_fence_overlay.png^default_acacia_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
- material = "default:acacia_wood",
- groups = utility.dig_groups("fence_wood", {flammable = 2, fence = 1}),
- sounds = default.node_sound_wood_defaults()
- })
- default.register_fence("default:fence_junglewood", {
- description = "Jungle Wood Fence",
- texture = "default_fence_junglewood.png",
- inventory_image = "default_fence_overlay.png^default_junglewood.png^default_fence_overlay.png^[makealpha:255,126,126",
- wield_image = "default_fence_overlay.png^default_junglewood.png^default_fence_overlay.png^[makealpha:255,126,126",
- material = "default:junglewood",
- groups = utility.dig_groups("fence_wood", {flammable = 2, fence = 1}),
- sounds = default.node_sound_wood_defaults()
- })
- default.register_fence("default:fence_pine_wood", {
- description = "Pine Wood Fence",
- texture = "default_fence_pine_wood.png",
- inventory_image = "default_fence_overlay.png^default_pine_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
- wield_image = "default_fence_overlay.png^default_pine_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
- material = "default:pine_wood",
- groups = utility.dig_groups("fence_wood", {flammable = 2, fence = 1}),
- sounds = default.node_sound_wood_defaults()
- })
- default.register_fence("default:fence_aspen_wood", {
- description = "Aspen Wood Fence",
- texture = "default_fence_aspen_wood.png",
- inventory_image = "default_fence_overlay.png^default_aspen_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
- wield_image = "default_fence_overlay.png^default_aspen_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
- material = "default:aspen_wood",
- groups = utility.dig_groups("fence_wood", {flammable = 2, fence = 1}),
- sounds = default.node_sound_wood_defaults()
- })
- minetest.register_node("default:glass", {
- description = "Glass",
- drawtype = "glasslike_framed_optional",
- tiles = {"default_glass.png", "default_glass_detail.png"},
- paramtype = "light",
- sunlight_propagates = true,
- is_ground_content = false,
- groups = utility.dig_groups("glass", {glass=1}),
- sounds = default.node_sound_glass_defaults(),
- drop = "vessels:glass_fragments",
- silverpick_drop = true,
- })
- minetest.register_node("default:obsidian_glass", {
- description = "Obsidian Glass",
- drawtype = "glasslike_framed_optional",
- tiles = {"default_obsidian_glass.png", "default_obsidian_glass_detail.png"},
- paramtype = "light",
- is_ground_content = false,
- sunlight_propagates = true,
- sounds = default.node_sound_glass_defaults(),
- groups = utility.dig_groups("glass", {glass=1}),
- drop = "default:obsidian_shard",
- silverpick_drop = true,
- })
- minetest.register_node("default:brick", {
- description = "Brick Block",
- paramtype2 = "facedir",
- place_param2 = 0,
- tiles = {"default_brick.png"},
- is_ground_content = false,
- groups = utility.dig_groups("brick", {brick = 1}),
- sounds = default.node_sound_stone_defaults(),
- })
- minetest.register_node("default:meselamp", {
- description = "Mese Lamp",
- drawtype = "glasslike",
- tiles = {"default_meselamp.png"},
- paramtype = "light",
- sunlight_propagates = true,
- is_ground_content = false,
- groups = utility.dig_groups("glass"),
- sounds = default.node_sound_glass_defaults(),
- light_source = default.LIGHT_MAX-1,
- })
- minetest.register_node("default:lightbox", {
- description = "Light Box",
- drawtype = "glasslike",
- tiles = {"default_lightbox.png"},
- paramtype = "light",
- sunlight_propagates = true,
- is_ground_content = false,
- groups = utility.dig_groups("glass"),
- sounds = default.node_sound_glass_defaults(),
- light_source = default.LIGHT_MAX - 2,
- })
|