1
0
Fork 0

Add hardness to anvils, bookshoelves, cakes, chests, cocoas

This commit is contained in:
Wuzzy 2017-02-27 01:13:03 +01:00
parent 0efb479c1e
commit 4da0723146
5 changed files with 32 additions and 19 deletions

View File

@ -1,5 +1,5 @@
local anvildef = {
groups = {cracky=1, falling_node=1, deco_block=1, anvil=1},
groups = {pickaxey=1, falling_node=1, deco_block=1, anvil=1},
tiles = {"mcl_anvils_anvil_top_damaged_0.png^[transformR90", "mcl_anvils_anvil_base.png"},
paramtype = "light",
sunlight_propagates = true,
@ -16,6 +16,7 @@ local anvildef = {
},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6000,
_mcl_hardness = 5,
}
local anvildef0 = table.copy(anvildef)

View File

@ -154,10 +154,11 @@ minetest.register_node("mcl_books:bookshelf", {
tiles = {"default_wood.png", "default_wood.png", "default_bookshelf.png"},
stack_max = 64,
is_ground_content = false,
groups = {choppy=3,oddly_breakable_by_hand=2,flammable=3,building_block=1},
groups = {handy=1,axey=1, flammable=3,building_block=1},
drop = "mcl_books:book 3",
sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 7.5,
_mcl_hardness = 1.5,
})
minetest.register_craft({

View File

@ -42,7 +42,7 @@ minetest.register_node("mcl_cake:cake", {
fixed = slice_6
},
stack_max = 1,
groups = {food=2,crumbly=3,attached_node=1},
groups = {handy=1, food=2,attached_node=1},
drop = '',
on_rightclick = function(pos, node, clicker, itemstack)
minetest.do_item_eat(2, ItemStack("mcl_cake:cake_5"), ItemStack("mcl_cake:cake"), clicker, {type="nothing"})
@ -51,7 +51,8 @@ minetest.register_node("mcl_cake:cake", {
sounds = mcl_sounds.node_sound_leaves_defaults(),
_food_particles = false,
_mcl_blast_resistance = 2.5
_mcl_blast_resistance = 2.5,
_mcl_hardness = 5,
})
minetest.register_node("mcl_cake:cake_5", {
description = "Cake (5 Slices Left)",
@ -67,7 +68,7 @@ minetest.register_node("mcl_cake:cake_5", {
type = "fixed",
fixed = slice_5
},
groups = {food=2,crumbly=3,attached_node=1,not_in_creative_inventory=1},
groups = {handy=1, food=2,attached_node=1,not_in_creative_inventory=1},
drop = '',
on_rightclick = function(pos, node, clicker, itemstack)
minetest.do_item_eat(2, ItemStack("mcl_cake:cake_4"), ItemStack("mcl_cake:cake_5"), clicker, {type="nothing"})
@ -91,7 +92,7 @@ minetest.register_node("mcl_cake:cake_4", {
type = "fixed",
fixed = slice_4
},
groups = {food=2,crumbly=3,attached_node=1,not_in_creative_inventory=1},
groups = {handy=1, food=2,attached_node=1,not_in_creative_inventory=1},
drop = '',
on_rightclick = function(pos, node, clicker, itemstack)
minetest.do_item_eat(2, ItemStack("mcl_cake:cake_3"), ItemStack("mcl_cake:cake_4"), clicker, {type="nothing"})
@ -100,7 +101,8 @@ minetest.register_node("mcl_cake:cake_4", {
sounds = mcl_sounds.node_sound_leaves_defaults(),
_food_particles = false,
_mcl_blast_resistance = 2.5
_mcl_blast_resistance = 2.5,
_mcl_hardness = 5,
})
minetest.register_node("mcl_cake:cake_3", {
description = "Cake (3 Slices Left)",
@ -116,7 +118,7 @@ minetest.register_node("mcl_cake:cake_3", {
type = "fixed",
fixed = slice_3
},
groups = {food=2,crumbly=3,attached_node=1,not_in_creative_inventory=1},
groups = {handy=1, food=2,attached_node=1,not_in_creative_inventory=1},
drop = '',
on_rightclick = function(pos, node, clicker, itemstack)
minetest.do_item_eat(2, ItemStack("mcl_cake:cake_2"), ItemStack("mcl_cake:cake_3"), clicker, {type="nothing"})
@ -125,7 +127,8 @@ minetest.register_node("mcl_cake:cake_3", {
sounds = mcl_sounds.node_sound_leaves_defaults(),
_food_particles = false,
_mcl_blast_resistance = 2.5
_mcl_blast_resistance = 2.5,
_mcl_hardness = 5,
})
minetest.register_node("mcl_cake:cake_2", {
description = "Cake (2 Slices Left)",
@ -141,7 +144,7 @@ minetest.register_node("mcl_cake:cake_2", {
type = "fixed",
fixed = slice_2
},
groups = {food=2,crumbly=3,attached_node=1,not_in_creative_inventory=1},
groups = {handy=1, food=2,attached_node=1,not_in_creative_inventory=1},
drop = '',
on_rightclick = function(pos, node, clicker, itemstack)
minetest.do_item_eat(2, ItemStack("mcl_cake:cake_1"), ItemStack("mcl_cake:cake_2"), clicker, {type="nothing"})
@ -150,7 +153,8 @@ minetest.register_node("mcl_cake:cake_2", {
sounds = mcl_sounds.node_sound_leaves_defaults(),
_food_particles = false,
_mcl_blast_resistance = 2.5
_mcl_blast_resistance = 2.5,
_mcl_hardness = 5,
})
minetest.register_node("mcl_cake:cake_1", {
description = "Cake (1 Slice Left)",
@ -166,7 +170,7 @@ minetest.register_node("mcl_cake:cake_1", {
type = "fixed",
fixed = slice_1
},
groups = {food=2,crumbly=3,attached_node=1,not_in_creative_inventory=1},
groups = {handy=1, food=2,attached_node=1,not_in_creative_inventory=1},
drop = '',
on_rightclick = function(pos, node, clicker, itemstack)
minetest.do_item_eat(2, ItemStack("mcl:cake:cake 0"), ItemStack("mcl_cake:cake_1"), clicker, {type="nothing"})
@ -175,5 +179,6 @@ minetest.register_node("mcl_cake:cake_1", {
sounds = mcl_sounds.node_sound_leaves_defaults(),
_food_particles = false,
_mcl_blast_resistance = 2.5
_mcl_blast_resistance = 2.5,
_mcl_hardness = 5,
})

View File

@ -28,7 +28,7 @@ minetest.register_node("mcl_chests:chest", {
"default_chest_side.png", "default_chest_side.png", "default_chest_front.png"},
paramtype2 = "facedir",
stack_max = 64,
groups = {choppy=2,container=2,oddly_breakable_by_hand=2, deco_block=1},
groups = {handy=1,axey=1, container=2, deco_block=1},
is_ground_content = false,
sounds = mcl_sounds.node_sound_wood_defaults(),
on_construct = function(pos)
@ -134,13 +134,14 @@ minetest.register_node("mcl_chests:chest", {
" takes stuff from chest at "..minetest.pos_to_string(pos))
end,
_mcl_blast_resistance = 2.5,
_mcl_hardness = 2.5,
})
minetest.register_node("mcl_chests:chest_left", {
tiles = {"default_chest_top_big.png", "default_chest_top_big.png", "default_chest_side.png",
"default_chest_side.png", "default_chest_side_big.png^[transformFX", "default_chest_front_big.png"},
paramtype2 = "facedir",
groups = {choppy=2,container=2,oddly_breakable_by_hand=2,not_in_creative_inventory=1},
groups = {handy=1,axey=1, container=2,not_in_creative_inventory=1},
drop = "mcl_chests:chest",
is_ground_content = false,
sounds = mcl_sounds.node_sound_wood_defaults(),
@ -194,13 +195,14 @@ minetest.register_node("mcl_chests:chest_left", {
" takes stuff from chest at "..minetest.pos_to_string(pos))
end,
_mcl_blast_resistance = 2.5,
_mcl_hardness = 2.5,
})
minetest.register_node("mcl_chests:chest_right", {
tiles = {"default_chest_top_big.png^[transformFX", "default_chest_top_big.png^[transformFX", "default_chest_side.png",
"default_chest_side.png", "default_chest_side_big.png", "default_chest_front_big.png^[transformFX"},
paramtype2 = "facedir",
groups = {choppy=2,container=2,oddly_breakable_by_hand=2,not_in_creative_inventory=1},
groups = {handy=1,axey=1, container=2,not_in_creative_inventory=1},
drop = "mcl_chests:chest",
is_ground_content = false,
sounds = mcl_sounds.node_sound_wood_defaults(),
@ -254,6 +256,7 @@ minetest.register_node("mcl_chests:chest_right", {
" takes stuff from chest at "..minetest.pos_to_string(pos))
end,
_mcl_blast_resistance = 2.5,
_mcl_hardness = 2.5,
})
minetest.register_craft({
@ -278,7 +281,7 @@ minetest.register_node("mcl_chests:ender_chest", {
"mcl_chests_ender_chest_back.png", "mcl_chests_ender_chest_front.png"},
-- Note: The “container” group is missing here because the ender chest does not
-- have an inventory on its own
groups = {cracky=1, deco_block=1},
groups = {pickaxey=1, deco_block=1},
is_ground_content = false,
paramtype = "light",
light_source = 7,
@ -299,6 +302,7 @@ minetest.register_node("mcl_chests:ender_chest", {
"listring[current_player;main]")
end,
_mcl_blast_resistance = 3000,
_mcl_hardness = 22.5,
})
minetest.register_on_joinplayer(function(player)
@ -341,7 +345,7 @@ for color, desc in pairs(boxtypes) do
tiles = {"mcl_chests_"..color.."_shulker_box_top.png", "mcl_chests_"..color.."_shulker_box_bottom.png",
"mcl_chests_"..color.."_shulker_box_side.png", "mcl_chests_"..color.."_shulker_box_side.png",
"mcl_chests_"..color.."_shulker_box_side.png", "mcl_chests_"..color.."_shulker_box_side.png"},
groups = {cracky=2, container=3, deco_block=1, shulker_box=1},
groups = {handy=1,pickaxey=1, container=3, deco_block=1, shulker_box=1},
is_ground_content = false,
sounds = mcl_sounds.node_sound_stone_defaults(),
stack_max = 1,
@ -409,6 +413,7 @@ for color, desc in pairs(boxtypes) do
end
end,
_mcl_blast_resistance = 30,
_mcl_hardness = 6,
})
minetest.register_craft({

View File

@ -108,10 +108,11 @@ local crop_def = {
},
},
groups = {
cocoa=1, choppy=3, oddly_breakable_by_hand=3, not_in_creative_inventory=1, dig_by_water=1,
handy=1,axey=1, cocoa=1, oddly_breakable_by_hand=3, not_in_creative_inventory=1, dig_by_water=1,
},
sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 15,
_mcl_hardness = 0.2,
}
-- 2nd stage