Check for falling node

Post Reply
User avatar
Extex
Member
Posts: 190
Joined: Wed Mar 14, 2018 23:14
GitHub: Extex101
In-game: Extex

Check for falling node

by Extex » Post

Is there a way to check if a space is occupied by a falling node?
Player of PK, RIP. Creator of the light_tool and motorbike mods. Working on another mod which should be coming soon!

User avatar
Yvanhoe
Member
Posts: 138
Joined: Fri Jul 05, 2019 03:18
Location: Japan

Re: Check for falling node

by Yvanhoe » Post

Check if a node belongs to the 'falling_node' group.

The API reference document (https://github.com/minetest/minetest/bl ... ua_api.txt) is a really useful resource to answer these questions.

User avatar
Extex
Member
Posts: 190
Joined: Wed Mar 14, 2018 23:14
GitHub: Extex101
In-game: Extex

Re: Check for falling node

by Extex » Post

No how to check if an empty space contains a falling block entity
Player of PK, RIP. Creator of the light_tool and motorbike mods. Working on another mod which should be coming soon!

User avatar
AiTechEye
Member
Posts: 842
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: ¯\_(ツ)_/¯

Re: Check for falling node

by AiTechEye » Post

"__builtin:falling_node"

for i, ob in pairs(minetest.get_objects_inside_radius(pos, 1)) do
local en = ob:get_luaentity()
if en and en.name == "__builtin:falling_node" then
...
end
end

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest