Fix Frost Barrier not activating

Negative yaw values are considered valid in minecraft.
UtilShapes doesn't correctly handle negative yaw values
(throws an ArrayIndexOutOfBoundsException) so whenever
a player is facing east they're unable to activate Frost
Barrier.

This commit fixes the issue by allowing UtilShapes to take
negative values.
This commit is contained in:
Nate Mortensen 2016-11-22 20:29:55 -07:00 committed by cnr
parent 5c363d27fd
commit a0beeab5ec

View File

@ -97,6 +97,10 @@ public class UtilShapes
public static BlockFace getFacing(float yaw)
{
while (yaw < 0)
{
yaw += 360;
}
return radial[Math.round(yaw / 45f) % 8];
}