mirror of
https://github.com/moparisthebest/minetest
synced 2024-11-16 06:15:06 -05:00
minetest.get_node_group(name, group)
This commit is contained in:
parent
e29a5b11e4
commit
2b4d21160f
@ -55,4 +55,11 @@ function minetest.hash_node_position(pos)
|
|||||||
return (pos.z+32768)*65536*65536 + (pos.y+32768)*65536 + pos.x+32768
|
return (pos.z+32768)*65536*65536 + (pos.y+32768)*65536 + pos.x+32768
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function minetest.get_node_group(name, group)
|
||||||
|
if not minetest.registered_nodes[name] or not
|
||||||
|
minetest.registered_nodes[name].groups[group] then
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
return minetest.registered_nodes[name].groups[group]
|
||||||
|
end
|
||||||
|
|
||||||
|
@ -615,6 +615,8 @@ Random:
|
|||||||
minetest.get_connected_players() -> list of ObjectRefs
|
minetest.get_connected_players() -> list of ObjectRefs
|
||||||
minetest.hash_node_position({x=,y=,z=}) -> 48-bit integer
|
minetest.hash_node_position({x=,y=,z=}) -> 48-bit integer
|
||||||
^ Gives a unique hash number for a node position (16+16+16=48bit)
|
^ Gives a unique hash number for a node position (16+16+16=48bit)
|
||||||
|
minetest.get_node_group(name, group) -> rating
|
||||||
|
^ Get rating of a group of a node. (0 = not in group)
|
||||||
|
|
||||||
Global objects:
|
Global objects:
|
||||||
minetest.env - environment reference
|
minetest.env - environment reference
|
||||||
|
Loading…
Reference in New Issue
Block a user