mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-26 03:07:32 +01:00
Merge pull request 'Merge mcla kelp growing' (#4474) from WillConker/VoxeLibre:kelp_make_source into master
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4474 Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com> Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
This commit is contained in:
commit
d0e8b4141d
@ -221,7 +221,7 @@ local wlroots = {
|
|||||||
liquids_pointable = true,
|
liquids_pointable = true,
|
||||||
drop = "mcl_mangrove:mangrove_roots",
|
drop = "mcl_mangrove:mangrove_roots",
|
||||||
groups = {
|
groups = {
|
||||||
handy = 1, hoey = 1, water=3, liquid=3, puts_out_fire=1, dig_by_piston = 1, deco_block = 1, waterlogged = 1, not_in_creative_inventory=1 },
|
handy = 1, hoey = 1, water=4, liquid=3, puts_out_fire=1, dig_by_piston = 1, deco_block = 1, not_in_creative_inventory=1 },
|
||||||
_mcl_blast_resistance = 100,
|
_mcl_blast_resistance = 100,
|
||||||
_mcl_hardness = -1, -- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
|
_mcl_hardness = -1, -- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
|
@ -81,7 +81,8 @@ end
|
|||||||
-- Is this water?
|
-- Is this water?
|
||||||
-- Returns the liquidtype, if indeed water.
|
-- Returns the liquidtype, if indeed water.
|
||||||
function kelp.is_submerged(node)
|
function kelp.is_submerged(node)
|
||||||
if mt_get_item_group(node.name, "water") ~= 0 then
|
local g = mt_get_item_group(node.name, "water")
|
||||||
|
if g > 0 and g <= 3 then
|
||||||
-- Expected only "source" and "flowing" from water liquids
|
-- Expected only "source" and "flowing" from water liquids
|
||||||
return mt_registered_nodes[node.name].liquidtype
|
return mt_registered_nodes[node.name].liquidtype
|
||||||
end
|
end
|
||||||
@ -267,8 +268,7 @@ function kelp.next_height(pos, node, pos_tip, node_tip, submerged, downward_flow
|
|||||||
-- Flowing liquid: Grow 1 step, but also turn the tip node into a liquid source.
|
-- Flowing liquid: Grow 1 step, but also turn the tip node into a liquid source.
|
||||||
if downward_flowing then
|
if downward_flowing then
|
||||||
local alt_liq = mt_registered_nodes[node_tip.name].liquid_alternative_source
|
local alt_liq = mt_registered_nodes[node_tip.name].liquid_alternative_source
|
||||||
local alt_liq_accessible = mt_get_item_group(node_tip.name,"waterlogged") -- returns 0 if it isn't waterlogged.
|
if alt_liq and mt_registered_nodes[alt_liq] then
|
||||||
if alt_liq and not alt_liq_accessible then
|
|
||||||
mt_set_node(pos_tip, {name=alt_liq})
|
mt_set_node(pos_tip, {name=alt_liq})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -155,7 +155,7 @@ minetest.register_node("mcl_sponges:sponge_wet", {
|
|||||||
buildable_to = false,
|
buildable_to = false,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
sounds = mcl_sounds.node_sound_dirt_defaults(),
|
sounds = mcl_sounds.node_sound_dirt_defaults(),
|
||||||
groups = {handy=1, hoey=1, waterlogged = 1, building_block=1},
|
groups = {handy=1, hoey=1, building_block=1},
|
||||||
on_place = place_wet_sponge,
|
on_place = place_wet_sponge,
|
||||||
_mcl_blast_resistance = 0.6,
|
_mcl_blast_resistance = 0.6,
|
||||||
_mcl_hardness = 0.6,
|
_mcl_hardness = 0.6,
|
||||||
@ -175,7 +175,7 @@ if minetest.get_modpath("mclx_core") then
|
|||||||
buildable_to = false,
|
buildable_to = false,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
sounds = mcl_sounds.node_sound_dirt_defaults(),
|
sounds = mcl_sounds.node_sound_dirt_defaults(),
|
||||||
groups = {handy=1, waterlogged = 1, building_block=1},
|
groups = {handy=1, building_block=1},
|
||||||
on_place = place_wet_sponge,
|
on_place = place_wet_sponge,
|
||||||
_mcl_blast_resistance = 0.6,
|
_mcl_blast_resistance = 0.6,
|
||||||
_mcl_hardness = 0.6,
|
_mcl_hardness = 0.6,
|
||||||
|
Loading…
Reference in New Issue
Block a user