Simple Auto-Mining Block?
Hi my name is JWINCH and I am a 15 year old programmer that loves my RPi, Linux and computing.
A question I have is about making a simple mod for personal development with the minetest API. I want to make a simple block that automatically mines a set area. Here is some pseudo code:
Does the air interfere with the gravity function or does it allow mine block to fall into the position below replaced by air and could someone give me an example of how I can run the loop within the minetest.register_abm function.
Please realize that I am only starting with minetest and so all help would be great. I haven't really used LUA for a lot at all. I have come from learning python, java and now C++ for desktop applications.
I am only experimenting at the moment as I need a project to keep me busy and this might be it but that depends on the support.
A question I have is about making a simple mod for personal development with the minetest API. I want to make a simple block that automatically mines a set area. Here is some pseudo code:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
If minetest.register_abm = true
For loop < 100:
posArray = [posY = current.y - 1, posXP = current.x + 1, posXN = current.x - 1, posZP = current.z + 1, posZN = current.z - 1]
set node(posArray) to node(default:air)
End For
End If
Does the air interfere with the gravity function or does it allow mine block to fall into the position below replaced by air and could someone give me an example of how I can run the loop within the minetest.register_abm function.
Please realize that I am only starting with minetest and so all help would be great. I haven't really used LUA for a lot at all. I have come from learning python, java and now C++ for desktop applications.
I am only experimenting at the moment as I need a project to keep me busy and this might be it but that depends on the support.