Detection of certain things

Post Reply
User avatar
v-rob
Developer
Posts: 971
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Detection of certain things

by v-rob » Post

How do I detect these things:

> When the player is fully submerged in water
> Which biome the player is in (in mapgen v6, v7/v5, and valleys)
> When the player falls and impacts water
> What the temperature and humidity is in a biome that the player is in
> When the player is below y=(insert number here) or above y=(insert number here)
> What time it is

I am almost sure that biomes are impossible to detect, but if they are, then great.

Thanks.

EDIT: Also, is it possible to detect which map generator you're using?
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Detection of certain things

by azekill_DIABLO » Post

1. Simple check of node at playerpos.
2. Impossible. The best you can do is detecting the surface nodes.
3. No idea how to do that one may be hard and laggy.
4. There's a temperature mod somewhere, it does that job just fine.
5. check of player pos
6. minetest.get_time_of_day()

7. I saw it was possible, idk how though.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Detection of certain things

by paramat » Post

'Get temperature / humidity at point' and 'get biome at point' are coming (my jobs).

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Detection of certain things

by azekill_DIABLO » Post

Good luck. You'll need that.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests