Fix Bat watcher

This commit is contained in:
Andrew 2013-07-23 06:38:16 +12:00
parent 2ca0dbbc28
commit bc08c933ca

View file

@ -14,8 +14,8 @@ public class BatWatcher extends LivingWatcher {
}
public void setFlying(boolean flying) {
if ((Byte) getValue(16, (byte) 1) != (flying ? 1 : 0)) {
setValue(16, (byte) (flying ? 1 : 0));
if (isFlying() != flying) {
setValue(16, (byte) (flying ? 0 : 1));
sendData(16);
}
}