UjEdwin wrote:1: How can i see if a node is unbreakable or have no drops?
node= minetest.get_node(pos)
node.?
The first part is a bit tricky, because you have to set a couple of variables in the node definition to make a block truly unbreakable.
Checking against the group “immortal” might suffice in most of the cases, but be aware that this only means the block cannot be broken by digging. It could still be possible that the block can be destroyed by other circumstances, for example, explosions.
If you just want to check whether the block cannot be dug, you are probably already done by checking against “immortal”. But to be sure, you also might to check against “diggable” (should be false).
I have written about unbreakable (at least in normal gameplay) blocks here:
viewtopic.php?f=3&t=11401&hilit=unbreakable#p172046If you want to check whether the block in question is “unbreakable” in some other aspect, just ask.
Because I using much minetest.node dig, then i have to make people can't use craftable tools to break into everywhere.
The normal way to remove a single block reliably is by using minetest.remove_node. However, I do not recommend using this function for uses other than just testing and debugging. I recommend against using it for normal gameplay. You must ask yourself the question: Do you
really want a craftable tool which breaks every block, including those which may come from mods, including blocks which are normally not supposed to be broken at all, i.e.
bedrock?
Just tell us what you
actually want to achieve, then I may try to help.