From e82c12282233113774e6f55f459fb89a457a981c Mon Sep 17 00:00:00 2001 From: jojoa1997 Date: Sun, 10 Mar 2013 17:01:58 -0400 Subject: [PATCH] Add obsidian --- mods/default/README.txt | 5 ++ mods/default/init.lua | 50 +++++++++++++++++- mods/default/textures/default_obsidian.png | Bin 0 -> 322 bytes .../textures/default_obsidian_glass.png | Bin 0 -> 431 bytes .../textures/default_obsidian_shard.png | Bin 0 -> 242 bytes 5 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 mods/default/textures/default_obsidian.png create mode 100644 mods/default/textures/default_obsidian_glass.png create mode 100644 mods/default/textures/default_obsidian_shard.png diff --git a/mods/default/README.txt b/mods/default/README.txt index e4227b95..ce82282b 100644 --- a/mods/default/README.txt +++ b/mods/default/README.txt @@ -93,6 +93,11 @@ PilzAdam (WTFPL): default_jungleleaves.png default_junglesapling.png default_junglewood.png + default_obsidian_glass.png + default_obsidian_shard.png + +jojoa1997 (WTFPL): + default_obsidian.png Glass breaking sounds (CC BY 3.0): 1: http://www.freesound.org/people/cmusounddesign/sounds/71947/ diff --git a/mods/default/init.lua b/mods/default/init.lua index b0329413..5453d2d5 100644 --- a/mods/default/init.lua +++ b/mods/default/init.lua @@ -516,6 +516,21 @@ minetest.register_craft({ } }) +minetest.register_craft({ + output = 'default:obsidian_shard 9', + recipe = { + {'default:obsidian'} + } +}) + +minetest.register_craft({ + output = 'default:obsidian', + recipe = { + {'default:obsidian_shard', 'default:obsidian_shard', 'default:obsidian_shard'}, + {'default:obsidian_shard', 'default:obsidian_shard', 'default:obsidian_shard'}, + {'default:obsidian_shard', 'default:obsidian_shard', 'default:obsidian_shard'}, + } +}) -- -- Crafting (tool repair) -- @@ -534,6 +549,12 @@ minetest.register_craft({ recipe = "group:sand", }) +minetest.register_craft({ + type = "cooking", + output = "default:obsidian_glass", + recipe = "default:obsidian_shard", +}) + minetest.register_craft({ type = "cooking", output = "default:stone", @@ -1641,6 +1662,26 @@ minetest.register_node("default:mese", { }) minetest.register_alias("default:mese_block", "default:mese") + +minetest.register_node("default:obsidian_glass", { + description = "Obsidian Glass", + drawtype = "glasslike", + tiles = {"default_obsidian_glass.png"}, + is_ground_content = true, + paramtype = "light", + sunlight_propagates = true, + sounds = default.node_sound_glass_defaults(), + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, +}) + +minetest.register_node("default:obsidian", { + description = "Obsidian", + tiles = {"default_obsidian.png"}, + is_ground_content = true, + sounds = default.node_sound_stone_defaults(), + groups = {cracky=1,level=2}, +}) + minetest.register_node("default:nyancat", { description = "Nyan Cat", tiles = {"default_nc_side.png", "default_nc_side.png", "default_nc_side.png", @@ -1769,6 +1810,11 @@ minetest.register_craftitem("default:scorched_stuff", { inventory_image = "default_scorched_stuff.png", }) +minetest.register_craftitem("default:obsidian_shard", { + description = "Obsidian Shard", + inventory_image = "default_obsidian_shard.png", +}) + -- Support old code function default.spawn_falling_node(p, nodename) spawn_falling_node(p, nodename) @@ -1814,11 +1860,11 @@ minetest.register_on_punchnode(on_punchnode) -- default.cool_lava_source = function(pos) - minetest.env:set_node(pos, {name="default:stone"}) + minetest.env:set_node(pos, {name="default:obsidian"}) end default.cool_lava_flowing = function(pos) - minetest.env:set_node(pos, {name="default:cobble"}) + minetest.env:set_node(pos, {name="default:stone"}) end minetest.register_abm({ diff --git a/mods/default/textures/default_obsidian.png b/mods/default/textures/default_obsidian.png new file mode 100644 index 0000000000000000000000000000000000000000..60a0456921ff120a22107b0f87f6aa39a1a57ae9 GIT binary patch literal 322 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPa2fKg~d-mRRJ)qEePZ!4!i_=Sk_HrFEkl1sqEI>z7 zvdP(D)0A~~4)^~n$}~Ml5>OOj35;g<^zibC-m7`I(Eh&a>Qz|`3{D&j3*J}jIQs2m zVUSqsu=B|0ynq~yo-l?6UE#hxr?`)AK9SQTQZv~wjdO{^vY6!)d=gx})Ev4@&pdsR z6`+^6#p#%Y^t3p;h=sSVR_vEM*!bti((O*=*1NYq{a@lDJ-_JZf3BY~?(*06?w+@g zGl}KmmUYE%m|fF*IDgJv%=G)0!4jF8j%B>p45C^^j|HC-{8!z|&mW$k_(yf)LZH_e NJYD@<);T3K0RVZ}cV++p literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_obsidian_glass.png b/mods/default/textures/default_obsidian_glass.png new file mode 100644 index 0000000000000000000000000000000000000000..49a1c96b15c99d3b5656394bbf606118946eeca7 GIT binary patch literal 431 zcmV;g0Z{&lP)J%TWTFH-=(_h(69 zp9j#m^TWymKww{{xPN}7bF(RM_qhJMc)qN0ySn^m5T|df*%Y)X$?{pc&8DzsV_PZD z)M{SVH0NffH~iAj)Vhe5@PY^QUmqkx&p57>1`hzBV0i-oLI^trLmTyrcuD=S+gp!! z)w|;QV47&k8Z1U)vVdz7lPsUOY`SmyWU{3guX*7nVi>I0)5}@`U@jm$9Z0j5=&~Ez zN_l;|#jY;lnt1H?@MUVn=@xwlbJ`|x)+NHzVUmWYH|j0gFn4Q`=4B literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_obsidian_shard.png b/mods/default/textures/default_obsidian_shard.png new file mode 100644 index 0000000000000000000000000000000000000000..e2e2586f47a7bf6cd4b84dff1dc6a13a6dc9cc8c GIT binary patch literal 242 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4PvY7B;DZyQ~JBAf*t zk;M!Q+`=Ht$S`Y;1W=H@#M9T6{VubhfQ%07kJ_z3A&wH)h!W@g+}zZ>5{7SQrtJrc zWqZ0fhFF|VPLTN2FmVEtEcgBY2H&O%&o;cWSs?lJ^KyR)5MW_p`B(qr1LIKvHK%Qd zO&&A(9QpP2@#^0^FSb4AWlp(Wn5lM(^@qvhue