From 7ae19cefd706e3c40e3207acebf367e5d749a4bf Mon Sep 17 00:00:00 2001 From: JoseDouglas26 Date: Sun, 9 Jun 2024 20:14:09 -0300 Subject: [PATCH] New ornamental blocks --- mods/blocks/building/ornamental.lua | 56 ++++++++++++++++++- textures/building/building_bookshelf.png | Bin 0 -> 471 bytes textures/building/building_bookshelf_top.png | Bin 0 -> 333 bytes 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 textures/building/building_bookshelf.png create mode 100644 textures/building/building_bookshelf_top.png diff --git a/mods/blocks/building/ornamental.lua b/mods/blocks/building/ornamental.lua index 2587c184e..b8bc40e01 100644 --- a/mods/blocks/building/ornamental.lua +++ b/mods/blocks/building/ornamental.lua @@ -1,4 +1,21 @@ local common_defs = { + carpet = { + _mcl_blast_resistance = 0.1, + _mcl_hardness = 0.1, + drawtype = "nodebox", + groups = { + attached_node = 3, colored_blocks = 1, fire_encouragement = 60, + fire_flammability = 20, fuel = 3, handy = 1, wool_carpets = 1 + }, + node_box = { + fixed = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5}, + type = "fixed" + }, + paramtype = "light", + sounds = mcl_sounds.node_sound_wool_defaults(), + sunlight_propagates = true, + wield_scale = {x = 1, y = 1, z = 0.5} + }, glass = { _mcl_blast_resistance = 0.3, _mcl_hardness = 0.3, @@ -38,7 +55,16 @@ local common_defs = { } for _, color in pairs(voxelibre.colors) do - local identifier = color.."_stained_glass" + local identifier = color.."_carpet" + local image_name = "building_"..color.."_wool.png" + + common_defs.carpet.inventory_image = image_name + common_defs.carpet.tiles = {image_name} + common_defs.carpet.wield_image = image_name + + voxelibre.register_block(identifier, table.copy(common_defs.carpet)) + + identifier = color.."_stained_glass" voxelibre.register_block(identifier, table.copy(common_defs.glass)) @@ -50,3 +76,31 @@ for _, color in pairs(voxelibre.colors) do voxelibre.register_block(identifier, table.copy(common_defs.wool)) end + +local blocks = { + ["bamboo_mosaic"] = { + _mcl_blast_resistance = 3, + _mcl_hardness = 2, + groups = { + axey = 1, building_blocks = 1, fire_encouragement = 5, + fire_flammability = 20, fuel = 15, handy = 1 + }, + sounds = mcl_sounds.node_sound_wood_defaults() + }, + ["bookshelf"] = { + _mcl_blast_resistance = 1.5, + _mcl_hardness = 1.5, + _mcl_silk_touch_drop = true, + drop = "items:book 3", + groups = {axey = 1, building_blocks = 1, fire_encouragement = 30, + fire_flammability = 20, fuel = 15, handy = 1 + }, + sounds = mcl_sounds.node_sound_wood_defaults(), + tiles = {type = "loglike"} + }, + +} + +for identifier, definitions in pairs(blocks) do + voxelibre.register_block(identifier, definitions) +end diff --git a/textures/building/building_bookshelf.png b/textures/building/building_bookshelf.png new file mode 100644 index 0000000000000000000000000000000000000000..548d3561a30719c75677e0827e928847546ef845 GIT binary patch literal 471 zcmV;|0Vw{7P)<{97<5HgbW?9;ba!ELWdLwtX>N2bZe?^J zG%hhNHDpIvQUCw}RY^oaR5(v%kxfeiVGzgnTl4~kQjmKIk|<;gQORD^ve-kd)MX)j z13?O-gMrXZyma!?rO(h;@N@Nh_%BaSE)2`e?EIdY|BUxoFJr^7CQ~STYMokB=B5&O zuhIGTR^~e@&YFebu)UYB5Mq9q%ak_d#}9Ymbpr>+`-mGG>ubyB6PUB=xOFw>2bp3& z57YN|?sM7qmjMh(TKxlf9)Pa}J`Z+bEI_dt3Gb&D0Pr?VFdPBXf)6n2#RBHtX3_xw z4b<^G0ABz!05B2&8WO-2je|+LL`#DeO|b`rEk?I8g>KRf*?V#aEjxV;_XybE9n@MQ zrH$D%q3J*`)M$O0o)Du>!tklq(u@XeNdQNHAv}uS_Afg+jtiJO2++PQP?~(f=s2r@ z4yS!{0RhK@nFW|l02<6l!lvI6;>1s;*b z3=Dh+K$tP>S|=w^P@=>&q9iy!t)x7$D3zfgF*C13FE6!3!9>qc&osq70%Y=OPZ!4! z3;*1Sd$|rd2()~T3*!=WY}E)8%WP?wn(&nS#;xDm&VAB7TqIYcvfX~O^>m*8(_(Sg zW5vxKIPPtCejAWs_dVIRJ>lN^Qlb0LcRB?{C``-bX^dM?-0ZE!((^^a=imD!Q_5Gc z&6@oqPl=V~#FrG7L}QOKwws$CUrr0noYbNyaF3a5cZ