mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 18:41:09 +01:00
Make item flowing work for all liquids
This commit is contained in:
parent
515343b0df
commit
af78e4f3f0
1 changed files with 2 additions and 1 deletions
|
@ -385,8 +385,9 @@ core.register_entity(":__builtin:item", {
|
||||||
for _, p in pairs(posses) do
|
for _, p in pairs(posses) do
|
||||||
local realpos = vector.add(pos, p)
|
local realpos = vector.add(pos, p)
|
||||||
local name = minetest.get_node(realpos).name
|
local name = minetest.get_node(realpos).name
|
||||||
|
local def = minetest.registered_nodes[name]
|
||||||
local par2 = minetest.get_node(realpos).param2
|
local par2 = minetest.get_node(realpos).param2
|
||||||
if name == "mcl_core:water_source" or (name == "mcl_core:water_flowing" and par2 > param2) then
|
if def.liquidtype == "source" or (def.liquidtype == "flowing" and par2 > param2) then
|
||||||
-- Node found! Since we looked upwards, the flowing
|
-- Node found! Since we looked upwards, the flowing
|
||||||
-- direction is the *opposite* of what we've found
|
-- direction is the *opposite* of what we've found
|
||||||
return vector.multiply(p, -1)
|
return vector.multiply(p, -1)
|
||||||
|
|
Loading…
Reference in a new issue