public void notifyDataManagerChange(DataParameter<?> key) { super.notifyDataManagerChange(key); if (HAND_STATES.equals(key)) { boolean flag = (((Byte)this.dataManager.get(HAND_STATES)).byteValue() & 1) > 0; EnumHand enumhand = (((Byte)this.dataManager.get(HAND_STATES)).byteValue() & 2) > 0 ? EnumHand.OFF_HAND : EnumHand.MAIN_HAND; if (flag && !this.handActive) { this.setActiveHand(enumhand); } else if (!flag && this.handActive) { this.resetActiveHand(); } } if (FLAGS.equals(key) && this.isElytraFlying() && !this.wasFallFlying) { this.mc.getSoundHandler().playSound(new ElytraSound(this)); } }
public void notifyDataManagerChange(DataParameter<?> key) { super.notifyDataManagerChange(key); if (HAND_STATES.equals(key)) { boolean flag = (((Byte)this.dataManager.get(HAND_STATES)).byteValue() & 1) > 0; EnumHand enumhand = (((Byte)this.dataManager.get(HAND_STATES)).byteValue() & 2) > 0 ? EnumHand.OFF_HAND : EnumHand.MAIN_HAND; if (flag && !this.handActive) { this.setActiveHand(enumhand); } else if (!flag && this.handActive) { this.resetActiveHand(); } } if (FLAGS.equals(key) && this.isElytraFlying() && !this.field_189813_ct) { this.mc.getSoundHandler().playSound(new ElytraSound(this)); } }