mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 18:41:09 +01:00
Add mud block
This commit is contained in:
parent
b0da96611e
commit
24ab7ff825
3 changed files with 50 additions and 0 deletions
|
@ -457,6 +457,19 @@ minetest.register_node("mcl_core:podzol", {
|
|||
})
|
||||
mcl_core.register_snowed_node("mcl_core:podzol_snow", "mcl_core:podzol", nil, nil, false, S("Podzol with Snow"))
|
||||
|
||||
minetest.register_node("mcl_core:mud", {
|
||||
description = S("Mud"),
|
||||
_doc_items_longdesc = S("Mud is a decorative block found in mangrove swamps. Mud can be obtained by using a watter bottle on a dirt or coarse dirt block."),
|
||||
_doc_items_hidden = false,
|
||||
tiles = {"mcl_core_mud.png"},
|
||||
is_ground_content = true,
|
||||
stack_max = 64,
|
||||
groups = {handy=1, shovely=1, enderman_takable=1, building_block=1},
|
||||
sounds = mcl_sounds.node_sound_dirt_defaults(),
|
||||
_mcl_blast_resistance = 0.5,
|
||||
_mcl_hardness = 0.5,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_core:dirt", {
|
||||
description = S("Dirt"),
|
||||
_doc_items_longdesc = S("Dirt acts as a soil for a few plants. When in light, this block may grow a grass or mycelium cover if such blocks are nearby."),
|
||||
|
|
BIN
mods/ITEMS/mcl_core/textures/mcl_core_mud.png
Normal file
BIN
mods/ITEMS/mcl_core/textures/mcl_core_mud.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 509 B |
|
@ -214,6 +214,25 @@ minetest.register_craftitem("mcl_potions:water", {
|
|||
else
|
||||
return "mcl_potions:glass_bottle"
|
||||
end
|
||||
|
||||
-- convert dirt to mud
|
||||
elseif node.name == "mcl_core:dirt" or node.name == "mcl_core:coarse_dirt" then
|
||||
|
||||
local pname = placer:get_player_name()
|
||||
if minetest.is_protected(pointed_thing.under, pname) then
|
||||
minetest.record_protection_violation(pointed_thing.under, pname)
|
||||
return itemstack
|
||||
end
|
||||
|
||||
-- set the node to mud
|
||||
minetest.set_node(pointed_thing.under, {name="mcl_core:mud"})
|
||||
minetest.sound_play("mcl_potions_bottle_pour", {pos=pointed_thing.under, gain=0.5, max_hear_range=16}, true)
|
||||
|
||||
if minetest.is_creative_enabled(placer:get_player_name()) then
|
||||
return itemstack
|
||||
else
|
||||
return "mcl_potions:glass_bottle"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -256,6 +275,24 @@ minetest.register_craftitem("mcl_potions:river_water", {
|
|||
-- Increase water level of cauldron by 1
|
||||
minetest.set_node(pointed_thing.under, {name=cauldron})
|
||||
minetest.sound_play("mcl_potions_bottle_pour", {pos=pointed_thing.under, gain=0.5, max_hear_range=16}, true)
|
||||
if minetest.is_creative_enabled(placer:get_player_name()) then
|
||||
return itemstack
|
||||
else
|
||||
return "mcl_potions:glass_bottle"
|
||||
end
|
||||
-- convert dirt to mud
|
||||
elseif node.name == "mcl_core:dirt" or node.name == "mcl_core:coarse_dirt" then
|
||||
|
||||
local pname = placer:get_player_name()
|
||||
if minetest.is_protected(pointed_thing.under, pname) then
|
||||
minetest.record_protection_violation(pointed_thing.under, pname)
|
||||
return itemstack
|
||||
end
|
||||
|
||||
-- set the node to mud
|
||||
minetest.set_node(pointed_thing.under, {name="mcl_core:mud"})
|
||||
minetest.sound_play("mcl_potions_bottle_pour", {pos=pointed_thing.under, gain=0.5, max_hear_range=16}, true)
|
||||
|
||||
if minetest.is_creative_enabled(placer:get_player_name()) then
|
||||
return itemstack
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue