public static void setCharging(EntityLivingBase entity, boolean flag) { if (flag) { BuffableType.MELEE.setBonus(entity, BonusType.CHARGE, 2); } else { BuffableType.MELEE.clearBonus(entity, BonusType.CHARGE); } DataWatcherFlag.IS_CHARGING.set(entity, flag); }
public static boolean isCharging(EntityLivingBase entity) { return DataWatcherFlag.IS_CHARGING.get(entity); }