util: Merge nested if statements

This commit is contained in:
sdburns1998
2019-07-08 17:26:41 +02:00
parent d0b69a41d6
commit 647829a4e6

View File

@@ -50,12 +50,9 @@ public class MiscUtils
//v underground //v above ground
int wildernessLevel = clamp(y > 6400 ? ((y - 9920) / 8) + 1 : ((y - 3520) / 8) + 1, 0, 56);
if (point.getPlane() > 0)
if (point.getPlane() > 0 && y < 9920)
{
if (y < 9920)
{
wildernessLevel = 0;
}
wildernessLevel = 0;
}
if (client.getWorldType().stream().anyMatch(worldType -> worldType == WorldType.PVP || worldType == WorldType.HIGH_RISK))