From 94f66c77edc3650b3461c7c17242c19e1212c6cd Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 27 Feb 2017 01:21:46 +0100 Subject: [PATCH] Add hardness for colored blocks and End blocks --- mods/ITEMS/mcl_colorblocks/init.lua | 15 ++++++++++----- mods/ITEMS/mcl_end/init.lua | 24 ++++++++++++++++-------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/mods/ITEMS/mcl_colorblocks/init.lua b/mods/ITEMS/mcl_colorblocks/init.lua index c50461fd7..962ee5776 100644 --- a/mods/ITEMS/mcl_colorblocks/init.lua +++ b/mods/ITEMS/mcl_colorblocks/init.lua @@ -25,9 +25,10 @@ minetest.register_node("mcl_colorblocks:hardened_clay", { description = "Hardened Clay", tiles = {"hardened_clay.png"}, stack_max = 64, - groups = {cracky=3,hardened_clay=1,building_block=1}, + groups = {pickaxey=1, hardened_clay=1,building_block=1}, sounds = mcl_sounds.node_sound_stone_defaults(), _mcl_blast_resistance = 21, + _mcl_hardness = 1.25, }) minetest.register_craft({ @@ -48,16 +49,17 @@ for _, row in ipairs(block.dyes) do minetest.register_node("mcl_colorblocks:hardened_clay_"..name, { description = desc.." Hardened Clay", tiles = {"hardened_clay_stained_"..name..".png"}, - groups = {cracky=3,hardened_clay=1,building_block=1}, + groups = {pickaxey=1, hardened_clay=1,building_block=1}, stack_max = 64, sounds = mcl_sounds.node_sound_stone_defaults(), _mcl_blast_resistance = 21, + _mcl_hardness = 1.25, }) minetest.register_node("mcl_colorblocks:concrete_powder_"..name, { description = desc.." Concrete Powder", tiles = {"mcl_colorblocks_concrete_powder_"..name..".png"}, - groups = {crumbly=3,concrete_powder=1,building_block=1,falling_node=1}, + groups = {handy=1,shovely=1, concrete_powder=1,building_block=1,falling_node=1}, stack_max = 64, is_ground_content = false, sounds = mcl_sounds.node_sound_sand_defaults(), @@ -65,16 +67,18 @@ for _, row in ipairs(block.dyes) do -- Specify the node to which this node will convert after getting in contact with water _mcl_colorblocks_harden_to = "mcl_colorblocks:concrete_"..name, _mcl_blast_resistance = 2.5, + _mcl_hardness = 0.5, }) minetest.register_node("mcl_colorblocks:concrete_"..name, { description = desc.." Concrete", tiles = {"mcl_colorblocks_concrete_"..name..".png"}, - groups = {cracky=3,concrete=1,building_block=1}, + groups = {handy=1,pickaxey=1, concrete=1,building_block=1}, stack_max = 64, is_ground_content = false, sounds = mcl_sounds.node_sound_stone_defaults(), _mcl_blast_resistance = 9, + _mcl_hardness = 1.8, }) if terracotta then @@ -83,12 +87,13 @@ for _, row in ipairs(block.dyes) do minetest.register_node("mcl_colorblocks:glazed_terracotta_"..name, { description = desc.." Glazed Terracotta", tiles = texes, - groups = {cracky=3,glazed_terracotta=1,building_block=1}, + groups = {handy=1,pickaxey=1, cracky=3,glazed_terracotta=1,building_block=1}, paramtype2 = "facedir", stack_max = 64, is_ground_content = false, sounds = mcl_sounds.node_sound_stone_defaults(), _mcl_blast_resistance = 7, + _mcl_hardness = 1.4, }) end diff --git a/mods/ITEMS/mcl_end/init.lua b/mods/ITEMS/mcl_end/init.lua index 802284e8c..cc82cdaec 100644 --- a/mods/ITEMS/mcl_end/init.lua +++ b/mods/ITEMS/mcl_end/init.lua @@ -3,9 +3,10 @@ minetest.register_node("mcl_end:end_stone", { description = "End Stone", tiles = {"mcl_end_end_stone.png"}, stack_max = 64, - groups = {cracky=2,building_block=1}, + groups = {pickaxey=1, building_block=1}, sounds = mcl_sounds.node_sound_stone_defaults(), _mcl_blast_resistance = 45, + _mcl_hardness = 3, }) minetest.register_node("mcl_end:end_bricks", { @@ -13,9 +14,10 @@ minetest.register_node("mcl_end:end_bricks", { tiles = {"mcl_end_end_bricks.png"}, is_ground_content = false, stack_max = 64, - groups = {cracky=3,building_block=1}, + groups = {pickaxey=1, building_block=1}, sounds = mcl_sounds.node_sound_stone_defaults(), _mcl_blast_resistance = 4, + _mcl_hardness = 0.8, }) minetest.register_node("mcl_end:purpur_block", { @@ -23,9 +25,10 @@ minetest.register_node("mcl_end:purpur_block", { tiles = {"mcl_end_purpur_block.png"}, is_ground_content = false, stack_max = 64, - groups = {cracky=3,building_block=1}, + groups = {pickaxey=1, building_block=1}, sounds = mcl_sounds.node_sound_stone_defaults(), _mcl_blast_resistance = 30, + _mcl_hardness = 1.5, }) minetest.register_node("mcl_end:purpur_pillar", { @@ -35,9 +38,10 @@ minetest.register_node("mcl_end:purpur_pillar", { is_ground_content = false, on_place = mcl_util.rotate_axis, tiles = {"mcl_end_purpur_pillar_top.png", "mcl_end_purpur_pillar_top.png", "mcl_end_purpur_pillar.png"}, - groups = {cracky=3,building_block=1}, + groups = {pickaxey=1, building_block=1}, sounds = mcl_sounds.node_sound_stone_defaults(), _mcl_blast_resistance = 30, + _mcl_hardness = 1.5, }) local rod_box = { @@ -108,9 +112,10 @@ minetest.register_node("mcl_end:dragon_egg", { selection_box = { type = "regular", }, - groups = { oddly_breakable_by_hand = 3, falling_node = 1, deco_block = 1, not_in_creative_inventory = 1 }, + groups = {handy=1, falling_node = 1, deco_block = 1, not_in_creative_inventory = 1 }, sounds = mcl_sounds.node_sound_stone_defaults(), _mcl_blast_resistance = 45, + _mcl_hardness = 3, -- TODO: Make dragon egg teleport on punching }) @@ -140,8 +145,9 @@ minetest.register_node("mcl_end:chorus_flower", { node_box = chorus_flower_box, selection_box = { type = "regular" }, sounds = mcl_sounds.node_sound_wood_defaults(), - groups = { oddly_breakable_by_hand = 3, choppy = 3, deco_block = 1 }, + groups = {handy=1,axey=1, deco_block = 1 }, _mcl_blast_resistance = 2, + _mcl_hardness = 0.4, }) minetest.register_node("mcl_end:chorus_flower_dead", { @@ -160,8 +166,9 @@ minetest.register_node("mcl_end:chorus_flower_dead", { selection_box = { type = "regular" }, sounds = mcl_sounds.node_sound_wood_defaults(), drop = "mcl_end:chorus_flower", - groups = { oddly_breakable_by_hand = 3, choppy = 3, deco_block = 1}, + groups = {handy=1,axey=1, deco_block = 1}, _mcl_blast_resistance = 2, + _mcl_hardness = 0.4, }) minetest.register_node("mcl_end:chorus_plant", { @@ -192,8 +199,9 @@ minetest.register_node("mcl_end:chorus_plant", { sounds = mcl_sounds.node_sound_wood_defaults(), -- TODO: Check drop probability drop = { items = { {items = { "mcl_end:chorus_fruit", rarity = 4 } } } }, - groups = { oddly_breakable_by_hand = 3, choppy = 3, not_in_creative_inventory = 1,}, + groups = {handy=1,axey=1, not_in_creative_inventory = 1,}, _mcl_blast_resistance = 2, + _mcl_hardness = 0.4, }) -- Craftitems