12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702 |
- -- 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",
- _is_bulk_mapgen_stone = true,
- -- 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",
- _is_bulk_mapgen_stone = true,
- -- 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,
- -- 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",
- _is_bulk_mapgen_stone = true,
- -- 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(),
- _is_bulk_mapgen_stone = true,
- })
- 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(),
- _is_bulk_mapgen_stone = true,
- -- 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(),
- _is_bulk_mapgen_stone = true,
- })
- 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(),
- _is_bulk_mapgen_stone = true,
- -- 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(),
- _is_bulk_mapgen_stone = true,
- -- 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,
- _is_bulk_mapgen_stone = true,
- })
- 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,
- _is_bulk_mapgen_stone = true,
- })
- 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,
- node_dig_prediction = "",
- -- Callbacks are overridden in flameportal mod!
- crushing_damage = 5000,
- })
- 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.
- crushing_damage = 5000,
- node_dig_prediction = "",
- })
- 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.
- crushing_damage = 5000,
- node_dig_prediction = "",
- })
- --
- -- 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,
- on_collapse_to_entity = function(pos, node)
- minetest.add_item(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,
- on_collapse_to_entity = function(pos, node)
- minetest.add_item(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,
- on_collapse_to_entity = function(pos, node)
- minetest.add_item(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,
- on_collapse_to_entity = function(pos, node)
- minetest.add_item(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,
- on_collapse_to_entity = function(pos, node)
- minetest.add_item(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,
- on_collapse_to_entity = function(pos, node)
- minetest.add_item(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,
- on_collapse_to_entity = function(pos, node)
- minetest.add_item(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,
- on_collapse_to_entity = function(pos, node)
- minetest.add_item(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,
- on_collapse_to_entity = function(pos, node)
- minetest.add_item(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,
- on_collapse_to_entity = function(pos, node)
- minetest.add_item(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,
- on_collapse_to_entity = function(pos, node)
- minetest.add_item(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,
- on_collapse_to_entity = function(pos, node)
- minetest.add_item(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,
- on_collapse_to_entity = function(pos, node)
- minetest.add_item(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,
- on_collapse_to_entity = function(pos, node)
- minetest.add_item(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,
- on_collapse_to_entity = function(pos, node)
- minetest.add_item(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, soil = 1}),
- 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*500,
- 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,
- _is_bulk_mapgen_stone = 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',
- _tnt_drop = 'default:iron_lump 2',
- 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',
- _tnt_drop = 'default:copper_lump 2',
- 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',
- _tnt_drop = 'default:copper_lump 2',
- 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',
- _tnt_drop = 'default:iron_lump 2',
- 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',
- _tnt_drop = {
- 'default:diamond',
- 'dusts:diamond_shard 3',
- },
- 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 = {
- max_items = 2,
- items = {
- {items = {'mobs:flame_bolt'}, rarity = 32},
- {items = {'default:mese_crystal'}}
- }
- },
- _tnt_drop = "default:mese_crystal_fragment",
- 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,
- on_blast = function(pos)
- minetest.remove_node(pos)
- if math.random(1, 20) > 1 then
- return
- end
- minetest.after(math.random(1, 20) / 10, function()
- tnt.boom(pos, {
- radius = 10,
- ignore_protection = false,
- ignore_on_blast = true,
- 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",
- _tnt_drop = {
- 'default:gold_lump',
- 'dusts:gold 3',
- },
- 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",
- _tnt_drop = {
- 'default:diamond',
- 'dusts:diamond_shard 3',
- },
- 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(),
- })
- -- 'default_adamant.png' texture by 'WintersKnight94', CC0 1.0 Universal
- -- world-align version by MustTest.
- minetest.register_node("default:adamant", {
- description = "Adamant",
- tiles = {{name="default_adamant_32x32.png", align_style="world", scale=2}},
- is_ground_content = false,
- groups = {}, -- No valid digging groups for this node.
- sounds = default.node_sound_stone_defaults(),
- drop = "default:adamant_shard",
- light_source = 6,
- node_dig_prediction = "",
- disallow_teleport = true,
- -- Note: NOT blast resistant. May be TNT mined.
- on_blast = function(pos)
- local obsidian = minetest.find_node_near(pos, 1, "cavestuff:dark_obsidian")
- if obsidian then
- if math.random(1, 500) == 1 then
- if utility.do_something_nasty then
- minetest.after(math.random(1, 30), function()
- utility.do_something_nasty(pos, "severe")
- end)
- end
- end
- minetest.remove_node(obsidian)
- minetest.remove_node(pos)
- -- The obsidian block is broken up.
- return {"default:adamant_brittle", "default:obsidian_shard 4"}
- end
- end,
- -- This is needed to fix a potential griefing vector re: dropping adamant on
- -- protected properties. Otherwise dropped adamant would be impossible to
- -- remove without causing damage to the property.
- on_finish_collapse = function(pos, node)
- minetest.swap_node(pos, {name = "default:adamant_brittle"})
- end,
- })
- minetest.register_node("default:adamant_brittle", {
- description = "Cracked Adamant",
- tiles = {{name="default_adamant_cracked_32x32.png", align_style="world", scale=2}},
- is_ground_content = false,
- groups = utility.dig_groups("hardmineral"),
- sounds = default.node_sound_stone_defaults(),
- drop = "default:adamant_shard",
- silverpick_drop = true,
- light_source = 4,
- })
- --
- -- 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*500,
- _damage_per_second_type = "fleshy",
- _death_message = "They impaled themself on a cactus.",
- 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
- utility.damage_player(puncher, "fleshy", 1*500, "sharp")
- end
- end,
- on_player_walk_over = function(pos, player)
- utility.damage_player(player, "fleshy", 1*500, "ground")
- 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}
- },
- drop = "default:papyrus",
- groups = utility.dig_groups("plant", {flammable = 2, standing_node = 1}),
- sounds = default.node_sound_leaves_defaults(),
- movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
- on_place = function(...)
- return papyrus.on_place(...)
- end,
- 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,
- })
- -- Hanging version.
- minetest.register_node("default:papyrus2", {
- description = "Hanging Papyrus (You Hacker)",
- 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}
- },
- drop = "default:papyrus",
- groups = utility.dig_groups("plant", {flammable = 2, hanging_node = 1}),
- sounds = default.node_sound_leaves_defaults(),
- movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
- -- Note: NOT climbable. Should behave like normal papyrus as close as possible.
- on_collapse_to_entity = function(pos, node)
- return {ItemStack("default:papyrus")}
- end,
- on_finish_collapse = function(pos, node)
- minetest.set_node(pos, {name="default:papyrus"})
- end,
- after_dig_node = function(...)
- return papyrus.after_dig_node_hanging(...)
- end,
- })
- minetest.register_node("default:dry_shrub", {
- description = "Dry Shrub",
- drawtype = "plantlike",
- waving = 1,
- 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, dry_shrub = 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:dry_shrub2", {
- description = "Dead Bush",
- drawtype = "plantlike",
- waving = 1,
- tiles = {"default_dry_shrub2.png"},
- inventory_image = "default_dry_shrub2.png",
- wield_image = "default_dry_shrub2.png",
- paramtype = "light",
- paramtype2 = "meshoptions",
- place_param2 = 4,
- sunlight_propagates = true,
- walkable = false,
- buildable_to = true,
- groups = utility.dig_groups("plant", {
- flammable = 3, attached_node = 1, dry_grass = 1, dry_shrub = 1,
- }),
- sounds = default.node_sound_leaves_defaults(),
- selection_box = {
- type = "fixed",
- fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 4 / 16, 6 / 16},
- },
- movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
- drop = {
- max_items = 1,
- items = {
- {items = {'default:stick 2'}, rarity = 2},
- {items = {'default:stick'}},
- }
- },
- shears_drop = true,
- flowerpot_drop = "default:dry_shrub2",
- })
- 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,
- 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
- --
- local function add_steam_particles(p)
- minetest.add_particlespawner({
- amount = 15,
- time = 0.3,
- minpos = {x = p.x - 0.5, y = p.y + 0.5, z = p.z - 0.5 },
- maxpos = {x = p.x + 0.5, y = p.y + 0.5, z = p.z + 0.5 },
- minvel = {x = -0.2, y = 0.3, z = -0.2},
- maxvel = {x = 0.2, y = 0.4, z = 0.2},
- minacc = {x = -0.15, y = -0.02, z = -0.15},
- maxacc = {x = 0.15, y = -0.01, z = 0.15},
- minexptime = 4,
- maxexptime = 6,
- minsize = 3,
- maxsize = 5,
- collisiondetection = true,
- texture = "default_item_smoke.png"
- })
- end
- 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,
- },
- },
- use_texture_alpha = "blend",
- 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 or rc.current_realm_at_pos(pos) == "naraxen" then
- ambiance.sound_play("default_cool_lava", pos, 2.0, 16)
- add_steam_particles(pos)
- 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,
- },
- },
- },
- use_texture_alpha = "blend",
- 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 or rc.current_realm_at_pos(pos) == "naraxen" then
- ambiance.sound_play("default_cool_lava", pos, 2.0, 16)
- add_steam_particles(pos)
- 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,
- },
- },
- use_texture_alpha = "blend",
- 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 or rc.current_realm_at_pos(pos) == "naraxen" then
- ambiance.sound_play("default_cool_lava", pos, 2.0, 16)
- add_steam_particles(pos)
- 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,
- },
- },
- },
- use_texture_alpha = "blend",
- 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 or rc.current_realm_at_pos(pos) == "naraxen" then
- ambiance.sound_play("default_cool_lava", pos, 2.0, 16)
- add_steam_particles(pos)
- minetest.add_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,
- node_dig_prediction = "",
- })
- 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,
- })
|