Further fix...

This commit is contained in:
fullwall 2019-09-23 21:30:12 +08:00
parent 023ab5e8a6
commit 03f3d1a713

View File

@ -142,10 +142,10 @@ public class LookClose extends Trait implements Toggleable, CommandConfigurable
if (!enabled || !npc.isSpawned() || npc.getNavigator().isNavigating())
return;
// TODO: remove in a later version, defaults weren't saving properly
if (randomPitchRange == null) {
if (randomPitchRange == null || randomPitchRange.length != 2) {
randomPitchRange = new float[] { -10, 0 };
}
if (randomYawRange == null) {
if (randomYawRange == null || randomYawRange.length != 2) {
randomYawRange = new float[] { 0, 360 };
}
npc.getEntity().getLocation(NPC_LOCATION);