Sign in to follow this  
LordOfAwesomnia

Check if tile is underwater

Recommended Posts

Hi all!

 

I'm working on my first mod (server, with modlauncher) and I'm a bit stuck on something. How do I check whether a tile is underwater (and by how much), if all I have are tileX and tileY coordinates?

 

Thanks!

Edited by LordOfAwesomnia

Share this post


Link to post
Share on other sites

I've found a partial solution:

Terraforming.isAllCornersInsideHeightRange(tileX, tileY, surfaced, maxHeight, minHeight);

Unfortunately this only tells me whether the center of the tile is below a certain level, not if all 4 corners of that tile are. Also, it doesn't return the actual height of the tile or its corners.

 

Anyone who can give me an idea where to look for what I need?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this